@cosmicdrift/kumiko-bundled-features 0.208.3 → 0.209.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/package.json +8 -8
  2. package/src/compliance-profiles/__tests__/profile-picker.boot.test.ts +10 -2
  3. package/src/compliance-profiles/__tests__/profile-picker.security.integration.test.ts +50 -0
  4. package/src/compliance-profiles/changes.json +8 -1
  5. package/src/compliance-profiles/constants.ts +5 -0
  6. package/src/compliance-profiles/feature.ts +28 -3
  7. package/src/compliance-profiles/i18n.ts +25 -0
  8. package/src/compliance-profiles/web/client-plugin.tsx +7 -4
  9. package/src/compliance-profiles/web/compliance-profile-catalog.tsx +55 -0
  10. package/src/compliance-profiles/web/i18n.ts +1 -7
  11. package/src/compliance-profiles/web/index.ts +1 -1
  12. package/src/delivery/__tests__/delivery-log-query.integration.test.ts +132 -0
  13. package/src/delivery/__tests__/delivery-pii-kms.integration.test.ts +5 -5
  14. package/src/delivery/__tests__/delivery-screens.boot.test.ts +2 -2
  15. package/src/delivery/__tests__/delivery.integration.test.ts +1 -1
  16. package/src/delivery/changes.json +6 -0
  17. package/src/delivery/constants.ts +1 -0
  18. package/src/delivery/feature.ts +28 -3
  19. package/src/delivery/handlers/log.query.ts +115 -18
  20. package/src/delivery/i18n.ts +4 -0
  21. package/src/delivery/public-names.ts +5 -0
  22. package/src/delivery/web/client-plugin.tsx +6 -7
  23. package/src/delivery/web/delivery-status-cell.tsx +26 -0
  24. package/src/delivery/web/index.ts +1 -1
  25. package/src/jobs/__tests__/jobs-events.integration.test.ts +65 -81
  26. package/src/jobs/__tests__/jobs-pii-kms.integration.test.ts +21 -18
  27. package/src/jobs/__tests__/jobs-retention.integration.test.ts +124 -0
  28. package/src/jobs/db/queries/retention.ts +44 -0
  29. package/src/jobs/events.ts +5 -8
  30. package/src/jobs/feature.ts +26 -146
  31. package/src/jobs/handlers/retention-cleanup.job.ts +21 -0
  32. package/src/jobs/index.ts +1 -1
  33. package/src/jobs/job-run-logger.ts +112 -59
  34. package/src/jobs/job-run-table.ts +36 -28
  35. package/src/sessions/__tests__/session-last-seen.integration.test.ts +165 -0
  36. package/src/sessions/changes.json +6 -0
  37. package/src/sessions/constants.ts +4 -0
  38. package/src/sessions/feature.ts +17 -1
  39. package/src/sessions/schema/user-session.ts +5 -0
  40. package/src/sessions/session-callbacks.ts +20 -1
  41. package/src/sessions/session-checker-fail-open.test.ts +38 -0
  42. package/src/user-data-rights/feature.ts +4 -4
  43. package/src/user-data-rights-defaults/__tests__/bundled-entities.userdata-hooks.integration.test.ts +1 -1
  44. package/src/compliance-profiles/web/compliance-profile-screen.tsx +0 -152
  45. package/src/delivery/web/delivery-log-screen.tsx +0 -103
  46. package/src/delivery/web/i18n.ts +0 -15
@@ -1,103 +0,0 @@
1
- // @runtime client
2
- import { useDispatcher, usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
3
- import { FormScreenShell } from "@cosmicdrift/kumiko-renderer-web";
4
- import { type ReactNode, useCallback, useEffect, useState } from "react";
5
- import { DeliveryQueries } from "../public-names";
6
-
7
- type DeliveryRow = {
8
- readonly id: string;
9
- readonly notificationType: string;
10
- readonly channel: string;
11
- readonly recipientAddress: string | null;
12
- readonly status: string;
13
- readonly error: string | null;
14
- };
15
-
16
- type DeliveryLogResponse = {
17
- readonly rows: readonly DeliveryRow[];
18
- };
19
-
20
- type State =
21
- | { readonly kind: "loading" }
22
- | { readonly kind: "error"; readonly message: string }
23
- | { readonly kind: "ready"; readonly rows: readonly DeliveryRow[] };
24
-
25
- export function DeliveryLogScreen(): ReactNode {
26
- const t = useTranslation();
27
- const { Banner, Card, DataTable, Heading, Text } = usePrimitives();
28
- const dispatcher = useDispatcher();
29
- const [state, setState] = useState<State>({ kind: "loading" });
30
-
31
- const load = useCallback(async (): Promise<void> => {
32
- setState({ kind: "loading" });
33
- const res = await dispatcher.query<DeliveryLogResponse>(DeliveryQueries.log, { limit: 50 });
34
- if (!res.isSuccess) {
35
- setState({ kind: "error", message: res.error.message });
36
- return;
37
- }
38
- setState({ kind: "ready", rows: res.data.rows });
39
- }, [dispatcher]);
40
-
41
- useEffect(() => {
42
- void load();
43
- }, [load]);
44
-
45
- if (state.kind === "loading") {
46
- return (
47
- <FormScreenShell testId="delivery-log-screen">
48
- <Text variant="small">{t("delivery.log.loading")}</Text>
49
- </FormScreenShell>
50
- );
51
- }
52
-
53
- if (state.kind === "error") {
54
- return (
55
- <FormScreenShell testId="delivery-log-screen">
56
- <Banner variant="error">{state.message}</Banner>
57
- </FormScreenShell>
58
- );
59
- }
60
-
61
- return (
62
- <FormScreenShell testId="delivery-log-screen" maxWidth="4xl" className="flex flex-col gap-6">
63
- <Heading variant="page">{t("delivery.log.title")}</Heading>
64
-
65
- <Card options={{ padded: false }}>
66
- <DataTable
67
- testId="delivery-log-table"
68
- columns={[
69
- { field: "type", label: t("delivery.log.col.type"), type: "string", sortable: false },
70
- {
71
- field: "channel",
72
- label: t("delivery.log.col.channel"),
73
- type: "string",
74
- sortable: false,
75
- },
76
- {
77
- field: "recipient",
78
- label: t("delivery.log.col.recipient"),
79
- type: "string",
80
- sortable: false,
81
- },
82
- {
83
- field: "status",
84
- label: t("delivery.log.col.status"),
85
- type: "string",
86
- sortable: false,
87
- },
88
- ]}
89
- rows={state.rows.map((row) => ({
90
- id: row.id,
91
- values: {
92
- type: row.notificationType,
93
- channel: row.channel,
94
- recipient: row.recipientAddress ?? "—",
95
- status: row.error ? `${row.status} (${row.error})` : row.status,
96
- },
97
- }))}
98
- emptyState={<Text variant="small">{t("delivery.log.empty")}</Text>}
99
- />
100
- </Card>
101
- </FormScreenShell>
102
- );
103
- }
@@ -1,15 +0,0 @@
1
- // @runtime client
2
- import type { TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
3
-
4
- export const defaultTranslations: TranslationsByLocale = {
5
- en: {
6
- "delivery.log.title": "Delivery log",
7
- "delivery.log.loading": "Loading delivery attempts…",
8
- "delivery.log.empty": "No delivery attempts.",
9
- "delivery.log.col.type": "Type",
10
- "delivery.log.col.channel": "Channel",
11
- "delivery.log.col.recipient": "Recipient",
12
- "delivery.log.col.status": "Status",
13
- "delivery:nav.deliveryLog": "Delivery",
14
- },
15
- };