@flowselections/floriday-authenticatie-module 1.0.81 → 1.0.84
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-lib/components/floriday/FlorydayApiLogPage.d.ts.map +1 -1
- package/dist-lib/components/floriday/FlorydayApiLogPage.js +28 -2
- package/dist-lib/components/floriday/FlorydayWebhooksCard.d.ts.map +1 -1
- package/dist-lib/components/floriday/FlorydayWebhooksCard.js +1 -1
- package/dist-lib/components/floriday/TokenHealthCard.d.ts.map +1 -1
- package/dist-lib/components/floriday/TokenHealthCard.js +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +464 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/floriday-webhooks.functions.d.ts +1 -0
- package/dist-lib/lib/floriday-webhooks.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-webhooks.functions.js +8 -0
- package/dist-lib/lib/floriday.functions.d.ts +6 -1
- package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday.functions.js +72 -27
- package/dist-lib/lib/gateway/webhook-subscribe.js +1 -1
- package/dist-lib/lib/gateway/webhook.d.ts +5 -0
- package/dist-lib/lib/gateway/webhook.d.ts.map +1 -1
- package/dist-lib/lib/gateway/webhook.js +20 -0
- package/dist-lib/lib/module-version.d.ts +1 -1
- package/dist-lib/lib/module-version.js +1 -1
- package/dist-lib/lib/shell-routes.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlorydayApiLogPage.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayApiLogPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlorydayApiLogPage.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayApiLogPage.tsx"],"names":[],"mappings":"AA0FA,wBAAgB,kBAAkB,gCAyZjC"}
|
|
@@ -32,6 +32,32 @@ function describeKind(row) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
const POLL_KINDS = new Set(["poll-check", "poll-empty", "poll-changed"]);
|
|
35
|
+
/** Nederlandse naam voor de kolom Soort. */
|
|
36
|
+
const SOORT_NL = {
|
|
37
|
+
"sales-order": "Verkooporder",
|
|
38
|
+
"fulfillment-order": "Levering",
|
|
39
|
+
"delivery-order": "Leveropdracht",
|
|
40
|
+
"trade-item": "Artikel",
|
|
41
|
+
"supply-line": "Aanbod",
|
|
42
|
+
"base-supply": "Weekaanbod",
|
|
43
|
+
"clock-supply": "Klokaanbod",
|
|
44
|
+
customer: "Klant",
|
|
45
|
+
warehouse: "Magazijn",
|
|
46
|
+
"delivery-location": "Afleverlocatie",
|
|
47
|
+
connection: "Connectie",
|
|
48
|
+
"price-group": "Prijsgroep",
|
|
49
|
+
"catalog-price": "Catalogusprijs",
|
|
50
|
+
trip: "Rit",
|
|
51
|
+
packing: "Verpakking",
|
|
52
|
+
"logistic-label": "Verzendlabel",
|
|
53
|
+
"auction-letter": "Veilingbrief",
|
|
54
|
+
"customer-sticker": "Sticker",
|
|
55
|
+
};
|
|
56
|
+
function soortLabel(type, templateLabel) {
|
|
57
|
+
if (type && SOORT_NL[type])
|
|
58
|
+
return SOORT_NL[type];
|
|
59
|
+
return templateLabel ?? type ?? "—";
|
|
60
|
+
}
|
|
35
61
|
export function FlorydayApiLogPage() {
|
|
36
62
|
const [direction, setDirection] = useState("all");
|
|
37
63
|
const [onlyFailed, setOnlyFailed] = useState(false);
|
|
@@ -122,7 +148,7 @@ export function FlorydayApiLogPage() {
|
|
|
122
148
|
}, children: "Alleen wijzigingen" }), _jsx("input", { className: "h-9 min-w-[16rem] flex-1 rounded-md border border-input bg-background px-3 text-sm", placeholder: "Zoek op Floriday-referentie, ons kenmerk of pad", value: search, onChange: (e) => {
|
|
123
149
|
setSearch(e.target.value);
|
|
124
150
|
setPage(0);
|
|
125
|
-
} }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => logQuery.refetch(), children: "Vernieuwen" })] }), _jsx("div", { className: "
|
|
151
|
+
} }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => logQuery.refetch(), children: "Vernieuwen" })] }), _jsx("div", { className: "w-full", children: _jsxs("table", { className: "w-full table-fixed text-sm [&_td]:break-words [&_td]:[overflow-wrap:anywhere]", children: [_jsxs("colgroup", { children: [_jsx("col", { className: "w-[9%]" }), _jsx("col", { className: "w-[9%]" }), _jsx("col", { className: "w-[13%]" }), _jsx("col", { className: "w-[10%]" }), _jsx("col", { className: "w-[25%]" }), _jsx("col", { className: "w-[10%]" }), _jsx("col", { className: "w-[14%]" }), _jsx("col", { className: "w-[10%]" })] }), _jsx("thead", { className: "text-left text-muted-foreground", children: _jsxs("tr", { children: [_jsx("th", { className: "py-2 pr-3", children: "Tijd" }), _jsx("th", { className: "py-2 pr-3", children: "Richting" }), _jsx("th", { className: "py-2 pr-3", children: "Aard" }), _jsx("th", { className: "py-2 pr-3", children: "Soort" }), _jsx("th", { className: "py-2 pr-3", children: "Actie" }), _jsx("th", { className: "py-2 pr-3", children: "Status" }), _jsx("th", { className: "py-2 pr-3", children: "Floriday-referentie" }), _jsx("th", { className: "py-2 pr-3", children: "Ons item" })] }) }), _jsxs("tbody", { children: [rows.map((row) => {
|
|
126
152
|
const tpl = row.resource_type ? templateByType.get(row.resource_type) : undefined;
|
|
127
153
|
// Een ophaalronde zonder herkenbaar item blijft een "routineronde";
|
|
128
154
|
// zodra we er één order/artikel uit konden halen tonen we die gewoon.
|
|
@@ -137,7 +163,7 @@ export function FlorydayApiLogPage() {
|
|
|
137
163
|
const floridayHref = !isPoll && tpl?.floriday_url_template && row.floriday_id
|
|
138
164
|
? fillTemplate(tpl.floriday_url_template, row)
|
|
139
165
|
: null;
|
|
140
|
-
return (_jsxs("tr", { className: "border-t border-border align-top", children: [_jsx("td", { className: "py-2 pr-3
|
|
166
|
+
return (_jsxs("tr", { className: "border-t border-border align-top", children: [_jsx("td", { className: "py-2 pr-3", children: new Date(row.created_at).toLocaleString("nl-NL") }), _jsx("td", { className: "py-2 pr-3", children: _jsx(Badge, { variant: row.direction === "outbound" ? "default" : "secondary", children: row.direction === "outbound" ? "Versturen" : "Ophalen" }) }), _jsxs("td", { className: "py-2 pr-3", children: [_jsx("div", { children: kind.label }), kind.hint ? (_jsx("div", { className: "text-xs text-muted-foreground", children: kind.hint })) : null] }), _jsx("td", { className: "py-2 pr-3", children: soortLabel(row.resource_type, tpl?.label) }), _jsxs("td", { className: "py-2 pr-3", children: [_jsx("div", { children: row.action ?? `${row.method} ${row.path}` }), row.cursor_from != null ? (_jsxs("div", { className: "text-xs text-muted-foreground", children: ["vanaf volgnummer ", row.cursor_from] })) : null, row.error ? _jsx(FullErrorMessage, { error: row.error, response: row.response, createdAt: row.created_at }) : null] }), _jsx("td", { className: "py-2 pr-3", children: _jsxs(Badge, { variant: row.ok ? "secondary" : "destructive", children: [row.ok ? "Gelukt" : "Mislukt", " ", row.http_status || ""] }) }), _jsx("td", { className: "py-2 pr-3", children: isPoll ? null : floridayShown ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-mono text-xs", title: row.floriday_id ?? undefined, children: floridayShown }), _jsx(Button, { size: "sm", variant: "ghost", onClick: () => {
|
|
141
167
|
navigator.clipboard?.writeText(floridayShown);
|
|
142
168
|
toast.success("Referentie gekopieerd");
|
|
143
169
|
}, children: "Kopieer" }), floridayHref ? (_jsx("a", { className: "text-xs underline", href: floridayHref, target: "_blank", rel: "noreferrer", children: "Floriday" })) : null] })) : ("—") }), _jsx("td", { className: "py-2 pr-3", children: isPoll ? ("—") : localHref ? (_jsx("a", { href: localHref, className: "text-xs underline", title: localShown ?? undefined, children: localShown ?? "Openen" })) : localShown ? (_jsx("div", { className: "flex items-center gap-2", children: _jsx("span", { className: "font-mono text-xs", title: row.local_id ?? undefined, children: localShown }) })) : tpl?.local_url_template ? (_jsx("span", { className: "text-xs text-muted-foreground", children: "Nog niet in onze cache" })) : (_jsx("span", { className: "text-xs text-muted-foreground", title: "Geen pagina in deze module voor dit type", children: "\u2014" })) })] }, row.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlorydayWebhooksCard.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayWebhooksCard.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"FlorydayWebhooksCard.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayWebhooksCard.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,oBAAoB,gCAkJnC"}
|
|
@@ -61,5 +61,5 @@ export function FlorydayWebhooksCard() {
|
|
|
61
61
|
: ""] })] }), _jsx("button", { className: "shrink-0 rounded-md border px-3 py-1 hover:bg-accent disabled:opacity-50", disabled: staleMut.isPending, onClick: () => {
|
|
62
62
|
if (window.confirm(`Oude aanmelding afmelden bij Floriday?\n${s.callbackUrlMasked}`))
|
|
63
63
|
staleMut.mutate(s.key);
|
|
64
|
-
}, children: "Oude aanmelding afmelden" })] }, s.key))) })] })), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Laatste automatische controle: ", fmt(q.data?.lastEnsureAt)] }), message && _jsx("p", { className: "text-xs", children: message })] }));
|
|
64
|
+
}, children: "Oude aanmelding afmelden" })] }, s.key))) })] })), q.data?.lastProbeAt && (_jsxs("p", { className: "text-xs text-primary", children: ["Verbindingstest \u2713 \u00B7 ", fmt(q.data.lastProbeAt)] })), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Laatste automatische controle: ", fmt(q.data?.lastEnsureAt)] }), message && _jsx("p", { className: "text-xs", children: message })] }));
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenHealthCard.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/TokenHealthCard.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"TokenHealthCard.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/TokenHealthCard.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,eAAe,gCAoL9B"}
|
|
@@ -87,7 +87,7 @@ export function TokenHealthCard() {
|
|
|
87
87
|
const jobs = (cronStatus.data?.jobs ?? []);
|
|
88
88
|
const tokenJob = jobs.find((j) => j.jobname === "refresh-floriday-tokens-hourly");
|
|
89
89
|
const cronUrlMismatch = Boolean(expectedBase && tokenJob?.url && !tokenJob.url.startsWith(expectedBase));
|
|
90
|
-
return (_jsxs("div", { className: "rounded-lg border p-4 space-y-4", children: [_jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "font-semibold", children: "Token gezondheid" }), _jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "De
|
|
90
|
+
return (_jsxs("div", { className: "rounded-lg border p-4 space-y-4", children: [_jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "font-semibold", children: "Token gezondheid" }), _jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "De koppeling wordt elke 15 minuten automatisch vernieuwd." })] }), lastOk && (_jsxs("span", { className: "text-xs text-muted-foreground shrink-0", children: ["Laatste succesvolle refresh:", " ", new Date(lastOk.attempted_at).toLocaleString("nl-NL")] }))] }), conns.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Geen actieve koppelingen." })) : (_jsx("ul", { className: "space-y-2", children: conns.map((c) => {
|
|
91
91
|
const st = statusFromLog(recent.filter((r) => r.connection_id === c.id));
|
|
92
92
|
return (_jsxs("li", { className: "flex items-center justify-between gap-3 text-sm", children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [_jsx("span", { className: `inline-block h-2.5 w-2.5 rounded-full shrink-0 ${st.color}` }), _jsx("span", { className: "font-medium capitalize", children: c.environment }), _jsx("span", { className: st.bad ? "text-red-600" : "text-muted-foreground", title: st.error ?? undefined, children: st.label })] }), _jsx("button", { type: "button", onClick: () => refresh.mutate(c.environment), disabled: busyEnv === c.environment, className: "rounded-md border px-2.5 py-1 text-xs hover:bg-muted disabled:opacity-50 shrink-0", children: busyEnv === c.environment ? "Vernieuwen…" : "Nu vernieuwen" })] }, c.id));
|
|
93
93
|
}) })), _jsxs("div", { className: "border-t pt-3 space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("h3", { className: "text-sm font-medium", children: "Geplande cron-taken" }), _jsx("button", { type: "button", onClick: () => reinstallMutation.mutate(), disabled: reinstallMutation.isPending, className: "rounded-md border px-2.5 py-1 text-xs hover:bg-muted disabled:opacity-50", children: reinstallMutation.isPending ? "Installeren…" : "Cron opnieuw installeren" })] }), cronStatus.isLoading ? (_jsx("p", { className: "text-xs text-muted-foreground", children: "Status laden\u2026" })) : jobs.length === 0 ? (_jsx("p", { className: "text-xs text-amber-600", children: "Geen Floriday-cron jobs gevonden. Klik \"Cron opnieuw installeren\" om ze in te plannen." })) : (_jsx("ul", { className: "space-y-1 text-xs", children: jobs.map((j) => {
|