@burdenoff/microfe-integrations 2026.1030.1 → 2026.1102.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 +5717 -1663
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +675 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +322 -76
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +77378 -31802
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +11 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.d.ts.map +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.js +13 -9
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsRoot.d.ts.map +1 -1
- package/dist/integrations/IntegrationsRoot.js +43 -36
- package/dist/integrations/IntegrationsRoot.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +20 -12
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts +16 -0
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +1 -0
- package/dist/integrations/components/ConnectorSubmissionCard.js +192 -0
- package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -0
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts +22 -0
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts.map +1 -0
- package/dist/integrations/components/ConnectorSubmissionPager.js +36 -0
- package/dist/integrations/components/ConnectorSubmissionPager.js.map +1 -0
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts +47 -0
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +1 -0
- package/dist/integrations/hooks/useConnectorSubmissions.js +80 -0
- package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -0
- package/dist/integrations/hooks/useMailbox.d.ts +123 -0
- package/dist/integrations/hooks/useMailbox.d.ts.map +1 -0
- package/dist/integrations/hooks/useMailbox.js +87 -0
- package/dist/integrations/hooks/useMailbox.js.map +1 -0
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts +7 -0
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +1 -0
- package/dist/integrations/pages/ConnectorReviewQueuePage.js +201 -0
- package/dist/integrations/pages/ConnectorReviewQueuePage.js.map +1 -0
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts +6 -0
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +1 -0
- package/dist/integrations/pages/ConnectorSubmissionsPage.js +576 -0
- package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -0
- package/dist/integrations/pages/MailboxInbox.d.ts +7 -0
- package/dist/integrations/pages/MailboxInbox.d.ts.map +1 -0
- package/dist/integrations/pages/MailboxInbox.js +550 -0
- package/dist/integrations/pages/MailboxInbox.js.map +1 -0
- package/dist/integrations/pages/ProviderCatalog.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +157 -145
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +15 -8
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/store/mailboxStore.d.ts +26 -0
- package/dist/integrations/store/mailboxStore.d.ts.map +1 -0
- package/dist/integrations/store/mailboxStore.js +52 -0
- package/dist/integrations/store/mailboxStore.js.map +1 -0
- package/dist/integrations/translations/en.d.ts +1 -0
- package/dist/integrations/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
|
+
import { ConnectorSubmissionStatus as n } from "../../generated/wspace-types.js";
|
|
4
|
+
import { useFormatDate as r } from "../hooks/useFormatDate.js";
|
|
5
|
+
import "../hooks/useConnectorSubmissions.js";
|
|
6
|
+
import { AlertTriangle as i, Clock as a, ExternalLink as o } from "lucide-react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
//#region src/integrations/components/ConnectorSubmissionCard.tsx
|
|
9
|
+
var l = {
|
|
10
|
+
[n.PendingReview]: "text-status-info-text bg-status-info-bg-subtle border-border-default",
|
|
11
|
+
[n.Approved]: "text-status-success-text bg-status-success-bg-subtle border-border-default",
|
|
12
|
+
[n.Rejected]: "text-status-error-text bg-status-error-bg-subtle border-border-default",
|
|
13
|
+
[n.Withdrawn]: "text-text-secondary bg-bg-sunken border-border-subtle"
|
|
14
|
+
}, u = {
|
|
15
|
+
[n.PendingReview]: ["integrations.connectorSubmissions.status.pendingReview", "In review"],
|
|
16
|
+
[n.Approved]: ["integrations.connectorSubmissions.status.approved", "Approved"],
|
|
17
|
+
[n.Rejected]: ["integrations.connectorSubmissions.status.rejected", "Rejected"],
|
|
18
|
+
[n.Withdrawn]: ["integrations.connectorSubmissions.status.withdrawn", "Withdrawn"]
|
|
19
|
+
};
|
|
20
|
+
function d({ status: n }) {
|
|
21
|
+
let r = e(), [i, a] = u[n];
|
|
22
|
+
return /* @__PURE__ */ s("span", {
|
|
23
|
+
className: t("inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium", l[n]),
|
|
24
|
+
children: r(i, a)
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function f({ submission: l, showPublisherContact: u = !1, actions: f }) {
|
|
28
|
+
let p = e(), m = r(), h = l.status === n.PendingReview;
|
|
29
|
+
return /* @__PURE__ */ c("article", {
|
|
30
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-5 space-y-3",
|
|
31
|
+
"data-testid": "connector-submission",
|
|
32
|
+
"aria-label": l.name,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ c("div", {
|
|
35
|
+
className: "flex flex-wrap items-start gap-3",
|
|
36
|
+
children: [/* @__PURE__ */ c("div", {
|
|
37
|
+
className: "min-w-0 flex-1",
|
|
38
|
+
children: [/* @__PURE__ */ c("div", {
|
|
39
|
+
className: "flex flex-wrap items-center gap-2",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ s("h3", {
|
|
42
|
+
className: "text-base font-semibold text-text-primary",
|
|
43
|
+
children: l.name
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ s(d, { status: l.status }),
|
|
46
|
+
l.isReviewOverdue && /* @__PURE__ */ c("span", {
|
|
47
|
+
className: "inline-flex items-center gap-1 rounded-full border border-border-default bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
|
|
48
|
+
children: [/* @__PURE__ */ s(i, { size: 12 }), p("integrations.connectorSubmissions.overdue", "Review overdue")]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}), /* @__PURE__ */ c("p", {
|
|
52
|
+
className: "mt-0.5 text-xs text-text-secondary font-mono break-all",
|
|
53
|
+
children: [
|
|
54
|
+
l.key,
|
|
55
|
+
" · v",
|
|
56
|
+
l.version,
|
|
57
|
+
" · ",
|
|
58
|
+
l.authType,
|
|
59
|
+
" · ",
|
|
60
|
+
l.category
|
|
61
|
+
]
|
|
62
|
+
})]
|
|
63
|
+
}), f && /* @__PURE__ */ s("div", {
|
|
64
|
+
className: "flex flex-wrap gap-2",
|
|
65
|
+
children: f
|
|
66
|
+
})]
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ s("p", {
|
|
69
|
+
className: "text-sm text-text-secondary whitespace-pre-line",
|
|
70
|
+
children: l.description
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ c("dl", {
|
|
73
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-1 text-xs",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ c("div", {
|
|
76
|
+
className: "flex gap-1 min-w-0",
|
|
77
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
78
|
+
className: "text-text-secondary",
|
|
79
|
+
children: [p("integrations.connectorSubmissions.fields.publisher", "Publisher"), ":"]
|
|
80
|
+
}), /* @__PURE__ */ s("dd", {
|
|
81
|
+
className: "text-text-primary truncate",
|
|
82
|
+
children: l.publisherName
|
|
83
|
+
})]
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ c("div", {
|
|
86
|
+
className: "flex gap-1 min-w-0",
|
|
87
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
88
|
+
className: "text-text-secondary",
|
|
89
|
+
children: [p("integrations.connectorSubmissions.fields.baseUrl", "API base URL"), ":"]
|
|
90
|
+
}), /* @__PURE__ */ s("dd", {
|
|
91
|
+
className: "text-text-primary font-mono truncate",
|
|
92
|
+
children: l.baseUrl
|
|
93
|
+
})]
|
|
94
|
+
}),
|
|
95
|
+
l.apiKeyName && /* @__PURE__ */ c("div", {
|
|
96
|
+
className: "flex gap-1 min-w-0",
|
|
97
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
98
|
+
className: "text-text-secondary",
|
|
99
|
+
children: [p("integrations.connectorSubmissions.fields.apiKey", "API key"), ":"]
|
|
100
|
+
}), /* @__PURE__ */ c("dd", {
|
|
101
|
+
className: "text-text-primary font-mono truncate",
|
|
102
|
+
children: [
|
|
103
|
+
l.apiKeyPlacement,
|
|
104
|
+
" ",
|
|
105
|
+
l.apiKeyName,
|
|
106
|
+
l.apiKeyPrefix ? ` (${l.apiKeyPrefix})` : ""
|
|
107
|
+
]
|
|
108
|
+
})]
|
|
109
|
+
}),
|
|
110
|
+
u && /* @__PURE__ */ c("div", {
|
|
111
|
+
className: "flex gap-1 min-w-0",
|
|
112
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
113
|
+
className: "text-text-secondary",
|
|
114
|
+
children: [p("integrations.connectorSubmissions.fields.supportEmail", "Support email"), ":"]
|
|
115
|
+
}), /* @__PURE__ */ s("dd", {
|
|
116
|
+
className: "text-text-primary truncate",
|
|
117
|
+
children: l.supportEmail
|
|
118
|
+
})]
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ c("div", {
|
|
121
|
+
className: "flex gap-1 min-w-0",
|
|
122
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
123
|
+
className: "text-text-secondary",
|
|
124
|
+
children: [p("integrations.connectorSubmissions.fields.submitted", "Submitted"), ":"]
|
|
125
|
+
}), /* @__PURE__ */ s("dd", {
|
|
126
|
+
className: "text-text-primary",
|
|
127
|
+
children: m(l.submittedAt)
|
|
128
|
+
})]
|
|
129
|
+
}),
|
|
130
|
+
h ? /* @__PURE__ */ c("div", {
|
|
131
|
+
className: "flex gap-1 min-w-0",
|
|
132
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
133
|
+
className: "inline-flex items-center gap-1 text-text-secondary",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ s(a, { size: 12 }),
|
|
136
|
+
p("integrations.connectorSubmissions.fields.reviewDue", "Review due"),
|
|
137
|
+
":"
|
|
138
|
+
]
|
|
139
|
+
}), /* @__PURE__ */ s("dd", {
|
|
140
|
+
className: "text-text-primary",
|
|
141
|
+
children: m(l.reviewDueAt)
|
|
142
|
+
})]
|
|
143
|
+
}) : /* @__PURE__ */ c("div", {
|
|
144
|
+
className: "flex gap-1 min-w-0",
|
|
145
|
+
children: [/* @__PURE__ */ c("dt", {
|
|
146
|
+
className: "text-text-secondary",
|
|
147
|
+
children: [p("integrations.connectorSubmissions.fields.reviewed", "Reviewed"), ":"]
|
|
148
|
+
}), /* @__PURE__ */ s("dd", {
|
|
149
|
+
className: "text-text-primary",
|
|
150
|
+
children: m(l.reviewedAt ?? null)
|
|
151
|
+
})]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ s("div", {
|
|
156
|
+
className: "flex flex-wrap gap-3 text-xs",
|
|
157
|
+
children: [
|
|
158
|
+
[l.website, p("integrations.connectorSubmissions.links.website", "Website")],
|
|
159
|
+
[l.docsUrl, p("integrations.connectorSubmissions.links.docs", "API docs")],
|
|
160
|
+
[l.privacyPolicyUrl, p("integrations.connectorSubmissions.links.privacy", "Privacy policy")],
|
|
161
|
+
[l.termsUrl, p("integrations.connectorSubmissions.links.terms", "Terms")],
|
|
162
|
+
[l.repositoryUrl, p("integrations.connectorSubmissions.links.repository", "Repository")]
|
|
163
|
+
].filter((e) => !!e[0]).map(([e, t]) => /* @__PURE__ */ c("a", {
|
|
164
|
+
href: e,
|
|
165
|
+
target: "_blank",
|
|
166
|
+
rel: "noopener noreferrer",
|
|
167
|
+
className: "inline-flex items-center gap-1 text-primary hover:underline",
|
|
168
|
+
children: [t, /* @__PURE__ */ s(o, { size: 12 })]
|
|
169
|
+
}, t))
|
|
170
|
+
}),
|
|
171
|
+
l.submitterNotes && u && /* @__PURE__ */ s("p", {
|
|
172
|
+
className: "rounded-lg bg-bg-sunken px-3 py-2 text-xs text-text-secondary whitespace-pre-line",
|
|
173
|
+
children: l.submitterNotes
|
|
174
|
+
}),
|
|
175
|
+
l.reviewNotes && /* @__PURE__ */ c("p", {
|
|
176
|
+
className: t("rounded-lg px-3 py-2 text-sm whitespace-pre-line", l.status === n.Rejected ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-secondary"),
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ c("span", {
|
|
179
|
+
className: "font-medium",
|
|
180
|
+
children: [p("integrations.connectorSubmissions.fields.reviewNotes", "Reviewer notes"), ":"]
|
|
181
|
+
}),
|
|
182
|
+
" ",
|
|
183
|
+
l.reviewNotes
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
export { f as ConnectorSubmissionCard };
|
|
191
|
+
|
|
192
|
+
//# sourceMappingURL=ConnectorSubmissionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorSubmissionCard.js","names":[],"sources":["../../../src/integrations/components/ConnectorSubmissionCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { AlertTriangle, Clock, ExternalLink } from 'lucide-react';\n\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\nimport { useFormatDate } from '../hooks/useFormatDate';\nimport {\n type ConnectorSubmission,\n ConnectorSubmissionStatus,\n} from '../hooks/useConnectorSubmissions';\n\nconst STATUS_CLASSES: Record<ConnectorSubmissionStatus, string> = {\n [ConnectorSubmissionStatus.PendingReview]:\n 'text-status-info-text bg-status-info-bg-subtle border-border-default',\n [ConnectorSubmissionStatus.Approved]:\n 'text-status-success-text bg-status-success-bg-subtle border-border-default',\n [ConnectorSubmissionStatus.Rejected]:\n 'text-status-error-text bg-status-error-bg-subtle border-border-default',\n [ConnectorSubmissionStatus.Withdrawn]: 'text-text-secondary bg-bg-sunken border-border-subtle',\n};\n\nconst STATUS_LABELS: Record<ConnectorSubmissionStatus, [string, string]> = {\n [ConnectorSubmissionStatus.PendingReview]: [\n 'integrations.connectorSubmissions.status.pendingReview',\n 'In review',\n ],\n [ConnectorSubmissionStatus.Approved]: [\n 'integrations.connectorSubmissions.status.approved',\n 'Approved',\n ],\n [ConnectorSubmissionStatus.Rejected]: [\n 'integrations.connectorSubmissions.status.rejected',\n 'Rejected',\n ],\n [ConnectorSubmissionStatus.Withdrawn]: [\n 'integrations.connectorSubmissions.status.withdrawn',\n 'Withdrawn',\n ],\n};\n\nexport function ConnectorSubmissionStatusBadge({ status }: { status: ConnectorSubmissionStatus }) {\n const tr = useTr();\n const [key, fallback] = STATUS_LABELS[status];\n return (\n <span\n className={cn(\n 'inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium',\n STATUS_CLASSES[status]\n )}\n >\n {tr(key, fallback)}\n </span>\n );\n}\n\ninterface ConnectorSubmissionCardProps {\n submission: ConnectorSubmission;\n /** Show the publisher contact details (reviewer view). */\n showPublisherContact?: boolean;\n actions?: ReactNode;\n}\n\n/** One connector submission: identity, auth, links, review state. */\nexport function ConnectorSubmissionCard({\n submission,\n showPublisherContact = false,\n actions,\n}: ConnectorSubmissionCardProps) {\n const tr = useTr();\n const formatDate = useFormatDate();\n const pending = submission.status === ConnectorSubmissionStatus.PendingReview;\n\n return (\n <article\n className=\"rounded-xl border border-border-seam bg-bg-surface p-5 space-y-3\"\n data-testid=\"connector-submission\"\n aria-label={submission.name}\n >\n <div className=\"flex flex-wrap items-start gap-3\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <h3 className=\"text-base font-semibold text-text-primary\">{submission.name}</h3>\n <ConnectorSubmissionStatusBadge status={submission.status} />\n {submission.isReviewOverdue && (\n <span className=\"inline-flex items-center gap-1 rounded-full border border-border-default bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text\">\n <AlertTriangle size={12} />\n {tr('integrations.connectorSubmissions.overdue', 'Review overdue')}\n </span>\n )}\n </div>\n <p className=\"mt-0.5 text-xs text-text-secondary font-mono break-all\">\n {submission.key} · v{submission.version} · {submission.authType} · {submission.category}\n </p>\n </div>\n {actions && <div className=\"flex flex-wrap gap-2\">{actions}</div>}\n </div>\n\n <p className=\"text-sm text-text-secondary whitespace-pre-line\">{submission.description}</p>\n\n <dl className=\"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-1 text-xs\">\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.publisher', 'Publisher')}:\n </dt>\n <dd className=\"text-text-primary truncate\">{submission.publisherName}</dd>\n </div>\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.baseUrl', 'API base URL')}:\n </dt>\n <dd className=\"text-text-primary font-mono truncate\">{submission.baseUrl}</dd>\n </div>\n {submission.apiKeyName && (\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.apiKey', 'API key')}:\n </dt>\n <dd className=\"text-text-primary font-mono truncate\">\n {submission.apiKeyPlacement} {submission.apiKeyName}\n {submission.apiKeyPrefix ? ` (${submission.apiKeyPrefix})` : ''}\n </dd>\n </div>\n )}\n {showPublisherContact && (\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.supportEmail', 'Support email')}:\n </dt>\n <dd className=\"text-text-primary truncate\">{submission.supportEmail}</dd>\n </div>\n )}\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.submitted', 'Submitted')}:\n </dt>\n <dd className=\"text-text-primary\">{formatDate(submission.submittedAt)}</dd>\n </div>\n {pending ? (\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"inline-flex items-center gap-1 text-text-secondary\">\n <Clock size={12} />\n {tr('integrations.connectorSubmissions.fields.reviewDue', 'Review due')}:\n </dt>\n <dd className=\"text-text-primary\">{formatDate(submission.reviewDueAt)}</dd>\n </div>\n ) : (\n <div className=\"flex gap-1 min-w-0\">\n <dt className=\"text-text-secondary\">\n {tr('integrations.connectorSubmissions.fields.reviewed', 'Reviewed')}:\n </dt>\n <dd className=\"text-text-primary\">{formatDate(submission.reviewedAt ?? null)}</dd>\n </div>\n )}\n </dl>\n\n <div className=\"flex flex-wrap gap-3 text-xs\">\n {[\n [submission.website, tr('integrations.connectorSubmissions.links.website', 'Website')],\n [submission.docsUrl, tr('integrations.connectorSubmissions.links.docs', 'API docs')],\n [\n submission.privacyPolicyUrl,\n tr('integrations.connectorSubmissions.links.privacy', 'Privacy policy'),\n ],\n [submission.termsUrl, tr('integrations.connectorSubmissions.links.terms', 'Terms')],\n [\n submission.repositoryUrl,\n tr('integrations.connectorSubmissions.links.repository', 'Repository'),\n ],\n ]\n .filter((entry): entry is [string, string] => Boolean(entry[0]))\n .map(([href, label]) => (\n <a\n key={label}\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-primary hover:underline\"\n >\n {label}\n <ExternalLink size={12} />\n </a>\n ))}\n </div>\n\n {submission.submitterNotes && showPublisherContact && (\n <p className=\"rounded-lg bg-bg-sunken px-3 py-2 text-xs text-text-secondary whitespace-pre-line\">\n {submission.submitterNotes}\n </p>\n )}\n\n {submission.reviewNotes && (\n <p\n className={cn(\n 'rounded-lg px-3 py-2 text-sm whitespace-pre-line',\n submission.status === ConnectorSubmissionStatus.Rejected\n ? 'bg-status-error-bg-subtle text-status-error-text'\n : 'bg-bg-sunken text-text-secondary'\n )}\n >\n <span className=\"font-medium\">\n {tr('integrations.connectorSubmissions.fields.reviewNotes', 'Reviewer notes')}:\n </span>{' '}\n {submission.reviewNotes}\n </p>\n )}\n </article>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface ConnectorSubmissionPagerProps {
|
|
2
|
+
/** Offset of the first row on this page. */
|
|
3
|
+
offset: number;
|
|
4
|
+
/** Rows on this page. */
|
|
5
|
+
count: number;
|
|
6
|
+
/** Rows across every page. */
|
|
7
|
+
total: number;
|
|
8
|
+
/** Whether the service holds rows after this page. */
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onOffsetChange: (offset: number) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Previous/next paging for connector submission lists (BOFF-4417). Renders
|
|
16
|
+
* nothing while everything fits on the first page. Previous stays available
|
|
17
|
+
* when a page empties (for example after the last pending row on it was
|
|
18
|
+
* withdrawn), so the list never strands the reader past its end.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ConnectorSubmissionPager({ offset, count, total, hasMore, pageSize, disabled, onOffsetChange, }: ConnectorSubmissionPagerProps): import("react").JSX.Element | null;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=ConnectorSubmissionPager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorSubmissionPager.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/ConnectorSubmissionPager.tsx"],"names":[],"mappings":"AAKA,UAAU,6BAA6B;IACrC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,cAAc,GACf,EAAE,6BAA6B,sCAwC/B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { Button as a } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
//#region src/integrations/components/ConnectorSubmissionPager.tsx
|
|
6
|
+
function o({ offset: o, count: s, total: c, hasMore: l, pageSize: u, disabled: d = !1, onOffsetChange: f }) {
|
|
7
|
+
let p = e();
|
|
8
|
+
return o === 0 && !l ? null : /* @__PURE__ */ i("nav", {
|
|
9
|
+
className: "flex flex-wrap items-center justify-between gap-3 text-sm text-text-secondary",
|
|
10
|
+
"aria-label": p("integrations.connectorSubmissions.pager.label", "Submission pages"),
|
|
11
|
+
children: [/* @__PURE__ */ r("span", { children: s > 0 ? p("integrations.connectorSubmissions.pager.range", "Showing {{first}}–{{last}} of {{total}}", {
|
|
12
|
+
first: o + 1,
|
|
13
|
+
last: o + s,
|
|
14
|
+
total: c
|
|
15
|
+
}) : p("integrations.connectorSubmissions.pager.pastEnd", "No rows on this page") }), /* @__PURE__ */ i("div", {
|
|
16
|
+
className: "flex gap-2",
|
|
17
|
+
children: [/* @__PURE__ */ i(a, {
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "sm",
|
|
20
|
+
disabled: d || o === 0,
|
|
21
|
+
onClick: () => f(Math.max(0, o - u)),
|
|
22
|
+
children: [/* @__PURE__ */ r(t, { size: 14 }), p("integrations.connectorSubmissions.pager.previous", "Previous")]
|
|
23
|
+
}), /* @__PURE__ */ i(a, {
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
size: "sm",
|
|
26
|
+
disabled: d || !l,
|
|
27
|
+
onClick: () => f(o + u),
|
|
28
|
+
children: [p("integrations.connectorSubmissions.pager.next", "Next"), /* @__PURE__ */ r(n, { size: 14 })]
|
|
29
|
+
})]
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { o as ConnectorSubmissionPager };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ConnectorSubmissionPager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorSubmissionPager.js","names":[],"sources":["../../../src/integrations/components/ConnectorSubmissionPager.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\nimport { useTr } from '../hooks/useTr';\n\ninterface ConnectorSubmissionPagerProps {\n /** Offset of the first row on this page. */\n offset: number;\n /** Rows on this page. */\n count: number;\n /** Rows across every page. */\n total: number;\n /** Whether the service holds rows after this page. */\n hasMore: boolean;\n pageSize: number;\n disabled?: boolean;\n onOffsetChange: (offset: number) => void;\n}\n\n/**\n * Previous/next paging for connector submission lists (BOFF-4417). Renders\n * nothing while everything fits on the first page. Previous stays available\n * when a page empties (for example after the last pending row on it was\n * withdrawn), so the list never strands the reader past its end.\n */\nexport function ConnectorSubmissionPager({\n offset,\n count,\n total,\n hasMore,\n pageSize,\n disabled = false,\n onOffsetChange,\n}: ConnectorSubmissionPagerProps) {\n const tr = useTr();\n if (offset === 0 && !hasMore) return null;\n\n return (\n <nav\n className=\"flex flex-wrap items-center justify-between gap-3 text-sm text-text-secondary\"\n aria-label={tr('integrations.connectorSubmissions.pager.label', 'Submission pages')}\n >\n <span>\n {count > 0\n ? tr(\n 'integrations.connectorSubmissions.pager.range',\n 'Showing {{first}}–{{last}} of {{total}}',\n { first: offset + 1, last: offset + count, total }\n )\n : tr('integrations.connectorSubmissions.pager.pastEnd', 'No rows on this page')}\n </span>\n <div className=\"flex gap-2\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n disabled={disabled || offset === 0}\n onClick={() => onOffsetChange(Math.max(0, offset - pageSize))}\n >\n <ChevronLeft size={14} />\n {tr('integrations.connectorSubmissions.pager.previous', 'Previous')}\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n disabled={disabled || !hasMore}\n onClick={() => onOffsetChange(offset + pageSize)}\n >\n {tr('integrations.connectorSubmissions.pager.next', 'Next')}\n <ChevronRight size={14} />\n </Button>\n </div>\n </nav>\n );\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAAyB,EACvC,WACA,UACA,UACA,YACA,aACA,cAAW,IACX,qBACgC;CAChC,IAAM,IAAK,GAAO;AAGlB,QAFI,MAAW,KAAK,CAAC,IAAgB,OAGnC,kBAAC,OAAD;EACE,WAAU;EACV,cAAY,EAAG,iDAAiD,mBAAmB;YAFrF,CAIE,kBAAC,QAAD,EAAA,UACG,IAAQ,IACL,EACE,iDACA,2CACA;GAAE,OAAO,IAAS;GAAG,MAAM,IAAS;GAAO;GAAO,CACnD,GACD,EAAG,mDAAmD,uBAAuB,EAC5E,CAAA,EACP,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,UAAU,KAAY,MAAW;IACjC,eAAe,EAAe,KAAK,IAAI,GAAG,IAAS,EAAS,CAAC;cAJ/D,CAME,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,EACxB,EAAG,oDAAoD,WAAW,CAC5D;OACT,kBAAC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,UAAU,KAAY,CAAC;IACvB,eAAe,EAAe,IAAS,EAAS;cAJlD,CAMG,EAAG,gDAAgD,OAAO,EAC3D,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA,CACnB;MACL;KACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ConnectorSubmissionFieldsFragment } from '../../generated/wspace-operations';
|
|
2
|
+
import { ConnectorSubmissionStatus, SubmitConnectorInput } from '../../generated/wspace-types';
|
|
3
|
+
|
|
4
|
+
export type ConnectorSubmission = ConnectorSubmissionFieldsFragment;
|
|
5
|
+
export type ConnectorSubmissionInput = SubmitConnectorInput;
|
|
6
|
+
export { ConnectorSubmissionStatus };
|
|
7
|
+
/** Rows per page. The service caps a page at 100. */
|
|
8
|
+
export declare const CONNECTOR_SUBMISSION_PAGE_SIZE = 25;
|
|
9
|
+
/** One page of the caller's own submissions, newest first. */
|
|
10
|
+
export declare function useMyConnectorSubmissions(offset?: number): {
|
|
11
|
+
submissions: ConnectorSubmissionFieldsFragment[];
|
|
12
|
+
total: any;
|
|
13
|
+
hasMore: any;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
16
|
+
refetch: (variables?: any) => Promise<{
|
|
17
|
+
data: any;
|
|
18
|
+
error?: import('@apollo/client').ErrorLike;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
/** One page of the review queue (oldest first) and its counters. Super admins only. */
|
|
22
|
+
export declare function useConnectorReviewQueue(status: ConnectorSubmissionStatus | null, offset?: number): {
|
|
23
|
+
submissions: ConnectorSubmissionFieldsFragment[];
|
|
24
|
+
total: any;
|
|
25
|
+
hasMore: any;
|
|
26
|
+
stats: any;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
29
|
+
refetch: (variables?: any) => Promise<{
|
|
30
|
+
data: any;
|
|
31
|
+
error?: import('@apollo/client').ErrorLike;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
export declare function useSubmitConnector(): {
|
|
35
|
+
submitConnector: (input: SubmitConnectorInput) => Promise<any>;
|
|
36
|
+
loading: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare function useWithdrawConnectorSubmission(): {
|
|
39
|
+
withdraw: (id: string) => Promise<any>;
|
|
40
|
+
loading: boolean;
|
|
41
|
+
};
|
|
42
|
+
export declare function useReviewConnectorSubmission(): {
|
|
43
|
+
approve: (id: string, notes: string | null) => Promise<any>;
|
|
44
|
+
reject: (id: string, reason: string) => Promise<any>;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useConnectorSubmissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnectorSubmissions.d.ts","sourceRoot":"","sources":["../../../src/integrations/hooks/useConnectorSubmissions.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,iCAAiC,EAOvC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpG,MAAM,MAAM,mBAAmB,GAAG,iCAAiC,CAAC;AACpE,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,qDAAqD;AACrD,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAOjD,8DAA8D;AAC9D,wBAAgB,yBAAyB,CAAC,MAAM,SAAI;;;;;;;;;;EAkBnD;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI,EAAE,MAAM,SAAI;;;;;;;;;;;EAiB3F;AAED,wBAAgB,kBAAkB;6BAGhB,oBAAoB;;EAOrC;AAED,wBAAgB,8BAA8B;mBAK/B,MAAM;;EAOpB;AAED,wBAAgB,4BAA4B;kBAQ7B,MAAM,SAAS,MAAM,GAAG,IAAI;iBAO5B,MAAM,UAAU,MAAM;;EAOpC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useApproveConnectorSubmissionMutation as e, useConnectorSubmissionsQuery as t, useMyConnectorSubmissionsQuery as n, useRejectConnectorSubmissionMutation as r, useSubmitConnectorMutation as i, useWithdrawConnectorSubmissionMutation as a } from "../../generated/wspace-operations.js";
|
|
2
|
+
import "../../generated/wspace-types.js";
|
|
3
|
+
import { useCallback as o } from "react";
|
|
4
|
+
var s = ["MyConnectorSubmissions", "ConnectorSubmissions"];
|
|
5
|
+
function c(e) {
|
|
6
|
+
return {
|
|
7
|
+
limit: 25,
|
|
8
|
+
offset: Math.max(0, Math.trunc(e))
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function l(e = 0) {
|
|
12
|
+
let { data: t, dataState: r, loading: i, error: a, refetch: o } = n({
|
|
13
|
+
variables: { pagination: c(e) },
|
|
14
|
+
fetchPolicy: "cache-and-network",
|
|
15
|
+
errorPolicy: "all"
|
|
16
|
+
}), s = r === "complete" ? t : null;
|
|
17
|
+
return {
|
|
18
|
+
submissions: s?.myConnectorSubmissions.items ?? [],
|
|
19
|
+
total: s?.myConnectorSubmissions.total ?? 0,
|
|
20
|
+
hasMore: s?.myConnectorSubmissions.hasMore ?? !1,
|
|
21
|
+
loading: i,
|
|
22
|
+
error: a,
|
|
23
|
+
refetch: o
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function u(e, n = 0) {
|
|
27
|
+
let { data: r, dataState: i, loading: a, error: o, refetch: s } = t({
|
|
28
|
+
variables: {
|
|
29
|
+
filter: e ? { status: e } : null,
|
|
30
|
+
pagination: c(n)
|
|
31
|
+
},
|
|
32
|
+
fetchPolicy: "cache-and-network",
|
|
33
|
+
errorPolicy: "all"
|
|
34
|
+
}), l = i === "complete" ? r : null;
|
|
35
|
+
return {
|
|
36
|
+
submissions: l?.connectorSubmissions.items ?? [],
|
|
37
|
+
total: l?.connectorSubmissions.total ?? 0,
|
|
38
|
+
hasMore: l?.connectorSubmissions.hasMore ?? !1,
|
|
39
|
+
stats: l?.connectorSubmissionReviewStats ?? null,
|
|
40
|
+
loading: a,
|
|
41
|
+
error: o,
|
|
42
|
+
refetch: s
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function d() {
|
|
46
|
+
let [e, { loading: t }] = i({ refetchQueries: s });
|
|
47
|
+
return {
|
|
48
|
+
submitConnector: o(async (t) => (await e({ variables: { input: t } })).data?.submitConnector ?? null, [e]),
|
|
49
|
+
loading: t
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function f() {
|
|
53
|
+
let [e, { loading: t }] = a({ refetchQueries: s });
|
|
54
|
+
return {
|
|
55
|
+
withdraw: o(async (t) => (await e({ variables: { id: t } })).data?.withdrawConnectorSubmission ?? null, [e]),
|
|
56
|
+
loading: t
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function p() {
|
|
60
|
+
let [t, { loading: n }] = e({ refetchQueries: [
|
|
61
|
+
...s,
|
|
62
|
+
"GetProviders",
|
|
63
|
+
"GetProviderCatalog"
|
|
64
|
+
] }), [i, { loading: a }] = r({ refetchQueries: s });
|
|
65
|
+
return {
|
|
66
|
+
approve: o(async (e, n) => (await t({ variables: {
|
|
67
|
+
id: e,
|
|
68
|
+
notes: n
|
|
69
|
+
} })).data?.approveConnectorSubmission ?? null, [t]),
|
|
70
|
+
reject: o(async (e, t) => (await i({ variables: {
|
|
71
|
+
id: e,
|
|
72
|
+
reason: t
|
|
73
|
+
} })).data?.rejectConnectorSubmission ?? null, [i]),
|
|
74
|
+
loading: n || a
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { u as useConnectorReviewQueue, l as useMyConnectorSubmissions, p as useReviewConnectorSubmission, d as useSubmitConnector, f as useWithdrawConnectorSubmission };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=useConnectorSubmissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnectorSubmissions.js","names":[],"sources":["../../../src/integrations/hooks/useConnectorSubmissions.ts"],"sourcesContent":["/**\n * Third-party connector submissions (BOFF-4417).\n *\n * Developers submit connectors for the integrations catalog and follow their\n * review; platform reviewers (super admins) work the review queue. The service\n * scopes the developer queries to the caller, so these hooks carry no ids.\n */\nimport { useCallback } from 'react';\n\nimport {\n type ConnectorSubmissionFieldsFragment,\n useApproveConnectorSubmissionMutation,\n useConnectorSubmissionsQuery,\n useMyConnectorSubmissionsQuery,\n useRejectConnectorSubmissionMutation,\n useSubmitConnectorMutation,\n useWithdrawConnectorSubmissionMutation,\n} from '../../generated/wspace-operations';\nimport { ConnectorSubmissionStatus, type SubmitConnectorInput } from '../../generated/wspace-types';\n\nexport type ConnectorSubmission = ConnectorSubmissionFieldsFragment;\nexport type ConnectorSubmissionInput = SubmitConnectorInput;\nexport { ConnectorSubmissionStatus };\n\n/** Rows per page. The service caps a page at 100. */\nexport const CONNECTOR_SUBMISSION_PAGE_SIZE = 25;\nconst REFETCH = ['MyConnectorSubmissions', 'ConnectorSubmissions'];\n\nfunction page(offset: number) {\n return { limit: CONNECTOR_SUBMISSION_PAGE_SIZE, offset: Math.max(0, Math.trunc(offset)) };\n}\n\n/** One page of the caller's own submissions, newest first. */\nexport function useMyConnectorSubmissions(offset = 0) {\n const { data, dataState, loading, error, refetch } = useMyConnectorSubmissionsQuery({\n variables: { pagination: page(offset) },\n fetchPolicy: 'cache-and-network',\n errorPolicy: 'all',\n });\n // Only a complete result carries fully typed rows; partial data (an error\n // with errorPolicy 'all') is treated as empty so the page shows the error.\n const complete = dataState === 'complete' ? data : null;\n const submissions: ConnectorSubmission[] = complete?.myConnectorSubmissions.items ?? [];\n return {\n submissions,\n total: complete?.myConnectorSubmissions.total ?? 0,\n hasMore: complete?.myConnectorSubmissions.hasMore ?? false,\n loading,\n error,\n refetch,\n };\n}\n\n/** One page of the review queue (oldest first) and its counters. Super admins only. */\nexport function useConnectorReviewQueue(status: ConnectorSubmissionStatus | null, offset = 0) {\n const { data, dataState, loading, error, refetch } = useConnectorSubmissionsQuery({\n variables: { filter: status ? { status } : null, pagination: page(offset) },\n fetchPolicy: 'cache-and-network',\n errorPolicy: 'all',\n });\n const complete = dataState === 'complete' ? data : null;\n const submissions: ConnectorSubmission[] = complete?.connectorSubmissions.items ?? [];\n return {\n submissions,\n total: complete?.connectorSubmissions.total ?? 0,\n hasMore: complete?.connectorSubmissions.hasMore ?? false,\n stats: complete?.connectorSubmissionReviewStats ?? null,\n loading,\n error,\n refetch,\n };\n}\n\nexport function useSubmitConnector() {\n const [mutate, { loading }] = useSubmitConnectorMutation({ refetchQueries: REFETCH });\n const submitConnector = useCallback(\n async (input: SubmitConnectorInput) => {\n const result = await mutate({ variables: { input } });\n return result.data?.submitConnector ?? null;\n },\n [mutate]\n );\n return { submitConnector, loading };\n}\n\nexport function useWithdrawConnectorSubmission() {\n const [mutate, { loading }] = useWithdrawConnectorSubmissionMutation({\n refetchQueries: REFETCH,\n });\n const withdraw = useCallback(\n async (id: string) => {\n const result = await mutate({ variables: { id } });\n return result.data?.withdrawConnectorSubmission ?? null;\n },\n [mutate]\n );\n return { withdraw, loading };\n}\n\nexport function useReviewConnectorSubmission() {\n const [approveMutation, { loading: approving }] = useApproveConnectorSubmissionMutation({\n refetchQueries: [...REFETCH, 'GetProviders', 'GetProviderCatalog'],\n });\n const [rejectMutation, { loading: rejecting }] = useRejectConnectorSubmissionMutation({\n refetchQueries: REFETCH,\n });\n const approve = useCallback(\n async (id: string, notes: string | null) => {\n const result = await approveMutation({ variables: { id, notes } });\n return result.data?.approveConnectorSubmission ?? null;\n },\n [approveMutation]\n );\n const reject = useCallback(\n async (id: string, reason: string) => {\n const result = await rejectMutation({ variables: { id, reason } });\n return result.data?.rejectConnectorSubmission ?? null;\n },\n [rejectMutation]\n );\n return { approve, reject, loading: approving || rejecting };\n}\n"],"mappings":";;;AA0BA,IAAM,IAAU,CAAC,0BAA0B,uBAAuB;AAElE,SAAS,EAAK,GAAgB;AAC5B,QAAO;EAAE,OAAA;EAAuC,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,EAAO,CAAC;EAAE;;AAI3F,SAAgB,EAA0B,IAAS,GAAG;CACpD,IAAM,EAAE,SAAM,cAAW,YAAS,UAAO,eAAY,EAA+B;EAClF,WAAW,EAAE,YAAY,EAAK,EAAO,EAAE;EACvC,aAAa;EACb,aAAa;EACd,CAAC,EAGI,IAAW,MAAc,aAAa,IAAO;AAEnD,QAAO;EACL,aAFyC,GAAU,uBAAuB,SAAS,EAAE;EAGrF,OAAO,GAAU,uBAAuB,SAAS;EACjD,SAAS,GAAU,uBAAuB,WAAW;EACrD;EACA;EACA;EACD;;AAIH,SAAgB,EAAwB,GAA0C,IAAS,GAAG;CAC5F,IAAM,EAAE,SAAM,cAAW,YAAS,UAAO,eAAY,EAA6B;EAChF,WAAW;GAAE,QAAQ,IAAS,EAAE,WAAQ,GAAG;GAAM,YAAY,EAAK,EAAO;GAAE;EAC3E,aAAa;EACb,aAAa;EACd,CAAC,EACI,IAAW,MAAc,aAAa,IAAO;AAEnD,QAAO;EACL,aAFyC,GAAU,qBAAqB,SAAS,EAAE;EAGnF,OAAO,GAAU,qBAAqB,SAAS;EAC/C,SAAS,GAAU,qBAAqB,WAAW;EACnD,OAAO,GAAU,kCAAkC;EACnD;EACA;EACA;EACD;;AAGH,SAAgB,IAAqB;CACnC,IAAM,CAAC,GAAQ,EAAE,gBAAa,EAA2B,EAAE,gBAAgB,GAAS,CAAC;AAQrF,QAAO;EAAE,iBAPe,EACtB,OAAO,OACU,MAAM,EAAO,EAAE,WAAW,EAAE,UAAO,EAAE,CAAC,EACvC,MAAM,mBAAmB,MAEzC,CAAC,EAAO,CACT;EACyB;EAAS;;AAGrC,SAAgB,IAAiC;CAC/C,IAAM,CAAC,GAAQ,EAAE,gBAAa,EAAuC,EACnE,gBAAgB,GACjB,CAAC;AAQF,QAAO;EAAE,UAPQ,EACf,OAAO,OACU,MAAM,EAAO,EAAE,WAAW,EAAE,OAAI,EAAE,CAAC,EACpC,MAAM,+BAA+B,MAErD,CAAC,EAAO,CACT;EACkB;EAAS;;AAG9B,SAAgB,IAA+B;CAC7C,IAAM,CAAC,GAAiB,EAAE,SAAS,OAAe,EAAsC,EACtF,gBAAgB;EAAC,GAAG;EAAS;EAAgB;EAAqB,EACnE,CAAC,EACI,CAAC,GAAgB,EAAE,SAAS,OAAe,EAAqC,EACpF,gBAAgB,GACjB,CAAC;AAeF,QAAO;EAAE,SAdO,EACd,OAAO,GAAY,OACF,MAAM,EAAgB,EAAE,WAAW;GAAE;GAAI;GAAO,EAAE,CAAC,EACpD,MAAM,8BAA8B,MAEpD,CAAC,EAAgB,CAClB;EAQiB,QAPH,EACb,OAAO,GAAY,OACF,MAAM,EAAe,EAAE,WAAW;GAAE;GAAI;GAAQ,EAAE,CAAC,EACpD,MAAM,6BAA6B,MAEnD,CAAC,EAAe,CACjB;EACyB,SAAS,KAAa;EAAW"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { MailboxFolder } from '../../generated/wspace-types';
|
|
2
|
+
import { MailboxAccountsQuery, MailboxMessagesQuery, MailboxThreadQuery, SendMailboxMessageMutation } from '../../generated/wspace-operations';
|
|
3
|
+
|
|
4
|
+
export { MailboxFolder };
|
|
5
|
+
export declare const MAILBOX_PAGE_SIZE = 25;
|
|
6
|
+
export type MailboxAccount = MailboxAccountsQuery['mailboxAccounts'][number];
|
|
7
|
+
export type MailboxMessageSummary = MailboxMessagesQuery['mailboxMessages']['messages'][number];
|
|
8
|
+
export type MailboxThread = NonNullable<MailboxThreadQuery['mailboxThread']>;
|
|
9
|
+
export type MailboxSendResult = SendMailboxMessageMutation['sendMailboxMessage'];
|
|
10
|
+
export declare function useMailboxAccounts(): {
|
|
11
|
+
accounts: {
|
|
12
|
+
__typename?: "MailboxAccount";
|
|
13
|
+
connectionId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
providerKey: string;
|
|
16
|
+
kind: import('../../generated/wspace-types').MailboxKind;
|
|
17
|
+
emailAddress?: string | null;
|
|
18
|
+
status: import('../../generated/wspace-types').ConnectionStatus;
|
|
19
|
+
}[];
|
|
20
|
+
answered: boolean;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
23
|
+
refetch: (variables?: any) => Promise<{
|
|
24
|
+
data: any;
|
|
25
|
+
error?: import('@apollo/client').ErrorLike;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
export declare function useMailboxMessages(options: {
|
|
29
|
+
connectionId: string | null;
|
|
30
|
+
folder: MailboxFolder;
|
|
31
|
+
query: string;
|
|
32
|
+
pageToken: string | null;
|
|
33
|
+
}): {
|
|
34
|
+
messages: {
|
|
35
|
+
__typename?: "MailboxMessageSummary";
|
|
36
|
+
id: string;
|
|
37
|
+
threadId: string;
|
|
38
|
+
subject: string;
|
|
39
|
+
snippet: string;
|
|
40
|
+
receivedAt?: string | null;
|
|
41
|
+
isUnread: boolean;
|
|
42
|
+
hasAttachments: boolean;
|
|
43
|
+
from?: {
|
|
44
|
+
__typename?: "MailboxAddress";
|
|
45
|
+
name?: string | null;
|
|
46
|
+
email: string;
|
|
47
|
+
} | null;
|
|
48
|
+
to: Array<{
|
|
49
|
+
__typename?: "MailboxAddress";
|
|
50
|
+
name?: string | null;
|
|
51
|
+
email: string;
|
|
52
|
+
}>;
|
|
53
|
+
}[];
|
|
54
|
+
nextPageToken: string | null;
|
|
55
|
+
loading: boolean;
|
|
56
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
57
|
+
refetch: (variables?: any) => Promise<{
|
|
58
|
+
data: any;
|
|
59
|
+
error?: import('@apollo/client').ErrorLike;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
export declare function useMailboxThread(connectionId: string | null, threadId: string | null): {
|
|
63
|
+
thread: {
|
|
64
|
+
__typename?: "MailboxThread";
|
|
65
|
+
id: string;
|
|
66
|
+
subject: string;
|
|
67
|
+
messages: Array<{
|
|
68
|
+
__typename?: "MailboxMessage";
|
|
69
|
+
id: string;
|
|
70
|
+
threadId: string;
|
|
71
|
+
subject: string;
|
|
72
|
+
receivedAt?: string | null;
|
|
73
|
+
isUnread: boolean;
|
|
74
|
+
hasAttachments: boolean;
|
|
75
|
+
bodyText: string;
|
|
76
|
+
from?: {
|
|
77
|
+
__typename?: "MailboxAddress";
|
|
78
|
+
name?: string | null;
|
|
79
|
+
email: string;
|
|
80
|
+
} | null;
|
|
81
|
+
to: Array<{
|
|
82
|
+
__typename?: "MailboxAddress";
|
|
83
|
+
name?: string | null;
|
|
84
|
+
email: string;
|
|
85
|
+
}>;
|
|
86
|
+
cc: Array<{
|
|
87
|
+
__typename?: "MailboxAddress";
|
|
88
|
+
name?: string | null;
|
|
89
|
+
email: string;
|
|
90
|
+
}>;
|
|
91
|
+
}>;
|
|
92
|
+
} | null;
|
|
93
|
+
loading: boolean;
|
|
94
|
+
error: import('@apollo/client').ErrorLike | undefined;
|
|
95
|
+
refetch: (variables?: any) => Promise<{
|
|
96
|
+
data: any;
|
|
97
|
+
error?: import('@apollo/client').ErrorLike;
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
export interface SendMailInput {
|
|
101
|
+
connectionId: string;
|
|
102
|
+
to: string[];
|
|
103
|
+
cc?: string[];
|
|
104
|
+
subject?: string;
|
|
105
|
+
bodyText: string;
|
|
106
|
+
replyToMessageId?: string;
|
|
107
|
+
}
|
|
108
|
+
export declare function useSendMail(): {
|
|
109
|
+
send: (input: SendMailInput) => Promise<{
|
|
110
|
+
__typename?: "MailboxSendResult";
|
|
111
|
+
messageId?: string | null;
|
|
112
|
+
threadId?: string | null;
|
|
113
|
+
} | null>;
|
|
114
|
+
sending: boolean;
|
|
115
|
+
};
|
|
116
|
+
export declare function useSetMailRead(): (connectionId: string, messageId: string, read: boolean) => Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Splits a recipient field on commas, semicolons and line breaks. Spaces are
|
|
119
|
+
* not separators, so a pasted entry stays whole and the service validates it
|
|
120
|
+
* as one address instead of receiving fragments of it.
|
|
121
|
+
*/
|
|
122
|
+
export declare function splitRecipients(value: string): string[];
|
|
123
|
+
//# sourceMappingURL=useMailbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMailbox.d.ts","sourceRoot":"","sources":["../../../src/integrations/hooks/useMailbox.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAQpC,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAChG,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;AAEjF,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;EAajC;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;;;;;;;;;;;sBA+F879B,CAAC;gBAAwB,CAAC;;;;sBAA+D,CAAC;gBAAwB,CAAC;;;;;;;;;;;EArEjj+B;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;;;;;;sBAmE+z+B,CAAC;;;;sBAA6E,CAAC;;;;gBAAmF,CAAC;0BAAc,CAAC;oBAAwB,CAAC;;;;0BAA+D,CAAC;oBAAwB,CAAC;;;;0BAAyD,CAAC;oBAAwB,CAAC;;;;;;;;;;;EAzD1w/B;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,WAAW;kBAGT,aAAa;;;;;;EAoB9B;AAED,wBAAgB,cAAc,mBAGL,MAAM,aAAa,MAAM,QAAQ,OAAO,mBAKhE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAKvD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
|
+
import { useMailboxAccountsQuery as t, useMailboxMessagesQuery as n, useMailboxThreadQuery as r, useSendMailboxMessageMutation as i, useSetMailboxMessageReadMutation as a } from "../../generated/wspace-operations.js";
|
|
3
|
+
import "../../generated/wspace-types.js";
|
|
4
|
+
import { useCallback as o } from "react";
|
|
5
|
+
function s() {
|
|
6
|
+
let { workspaceId: n } = e(), { data: r, loading: i, error: a, refetch: o } = t({
|
|
7
|
+
skip: !n,
|
|
8
|
+
errorPolicy: "all",
|
|
9
|
+
fetchPolicy: "cache-and-network"
|
|
10
|
+
}), s = r;
|
|
11
|
+
return {
|
|
12
|
+
accounts: s?.mailboxAccounts ?? [],
|
|
13
|
+
answered: s?.mailboxAccounts !== void 0,
|
|
14
|
+
loading: i,
|
|
15
|
+
error: a,
|
|
16
|
+
refetch: o
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function c(e) {
|
|
20
|
+
let { connectionId: t, folder: r, query: i, pageToken: a } = e, { data: o, loading: s, error: c, refetch: l } = n({
|
|
21
|
+
variables: { input: {
|
|
22
|
+
connectionId: t ?? "",
|
|
23
|
+
folder: r,
|
|
24
|
+
query: i || null,
|
|
25
|
+
pageToken: a,
|
|
26
|
+
limit: 25
|
|
27
|
+
} },
|
|
28
|
+
skip: !t,
|
|
29
|
+
errorPolicy: "none",
|
|
30
|
+
fetchPolicy: "network-only"
|
|
31
|
+
}), u = o;
|
|
32
|
+
return {
|
|
33
|
+
messages: u?.mailboxMessages.messages ?? [],
|
|
34
|
+
nextPageToken: u?.mailboxMessages.nextPageToken ?? null,
|
|
35
|
+
loading: s,
|
|
36
|
+
error: c,
|
|
37
|
+
refetch: l
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function l(e, t) {
|
|
41
|
+
let { data: n, loading: i, error: a, refetch: o } = r({
|
|
42
|
+
variables: {
|
|
43
|
+
connectionId: e ?? "",
|
|
44
|
+
threadId: t ?? ""
|
|
45
|
+
},
|
|
46
|
+
skip: !e || !t,
|
|
47
|
+
errorPolicy: "none",
|
|
48
|
+
fetchPolicy: "network-only"
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
thread: n?.mailboxThread ?? null,
|
|
52
|
+
loading: i,
|
|
53
|
+
error: a,
|
|
54
|
+
refetch: o
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function u() {
|
|
58
|
+
let [e, { loading: t }] = i();
|
|
59
|
+
return {
|
|
60
|
+
send: o(async (t) => (await e({ variables: { input: {
|
|
61
|
+
connectionId: t.connectionId,
|
|
62
|
+
to: t.to,
|
|
63
|
+
cc: t.cc ?? null,
|
|
64
|
+
subject: t.subject ?? null,
|
|
65
|
+
bodyText: t.bodyText,
|
|
66
|
+
replyToMessageId: t.replyToMessageId ?? null
|
|
67
|
+
} } })).data?.sendMailboxMessage ?? null, [e]),
|
|
68
|
+
sending: t
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function d() {
|
|
72
|
+
let [e] = a();
|
|
73
|
+
return o(async (t, n, r) => {
|
|
74
|
+
await e({ variables: {
|
|
75
|
+
connectionId: t,
|
|
76
|
+
messageId: n,
|
|
77
|
+
read: r
|
|
78
|
+
} });
|
|
79
|
+
}, [e]);
|
|
80
|
+
}
|
|
81
|
+
function f(e) {
|
|
82
|
+
return e.split(/[,;\r\n]+/).map((e) => e.trim()).filter(Boolean);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { f as splitRecipients, s as useMailboxAccounts, c as useMailboxMessages, l as useMailboxThread, u as useSendMail, d as useSetMailRead };
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=useMailbox.js.map
|