@byline/host-tanstack-start 3.10.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/admin-shell/admin-activity/list.d.ts +10 -0
  2. package/dist/admin-shell/admin-activity/list.js +228 -0
  3. package/dist/admin-shell/admin-activity/list.module.js +12 -0
  4. package/dist/admin-shell/admin-activity/list_module.css +45 -0
  5. package/dist/admin-shell/chrome/menu-drawer.js +23 -6
  6. package/dist/admin-shell/chrome/preview-toggle.js +11 -6
  7. package/dist/routes/create-admin-activity-route.d.ts +8 -0
  8. package/dist/routes/create-admin-activity-route.js +71 -0
  9. package/dist/routes/index.d.ts +1 -0
  10. package/dist/routes/index.js +1 -0
  11. package/dist/server-fns/admin-account/change-password.js +1 -1
  12. package/dist/server-fns/admin-account/get.js +1 -1
  13. package/dist/server-fns/admin-account/update.js +1 -1
  14. package/dist/server-fns/admin-activity/get.d.ts +50 -0
  15. package/dist/server-fns/admin-activity/get.js +71 -0
  16. package/dist/server-fns/admin-activity/index.d.ts +15 -0
  17. package/dist/server-fns/admin-activity/index.js +1 -0
  18. package/dist/server-fns/admin-permissions/get-role-abilities.js +1 -1
  19. package/dist/server-fns/admin-permissions/list-registered.d.ts +2 -2
  20. package/dist/server-fns/admin-permissions/set-role-abilities.js +1 -1
  21. package/dist/server-fns/admin-permissions/who-has.js +1 -1
  22. package/dist/server-fns/admin-roles/create.js +1 -1
  23. package/dist/server-fns/admin-roles/delete.js +1 -1
  24. package/dist/server-fns/admin-roles/get.js +1 -1
  25. package/dist/server-fns/admin-roles/reorder.js +1 -1
  26. package/dist/server-fns/admin-roles/update.js +1 -1
  27. package/dist/server-fns/admin-users/create.js +1 -1
  28. package/dist/server-fns/admin-users/delete.js +1 -1
  29. package/dist/server-fns/admin-users/disable.js +1 -1
  30. package/dist/server-fns/admin-users/enable.js +1 -1
  31. package/dist/server-fns/admin-users/get-user-roles.js +1 -1
  32. package/dist/server-fns/admin-users/get.js +1 -1
  33. package/dist/server-fns/admin-users/list.d.ts +1 -1
  34. package/dist/server-fns/admin-users/list.js +1 -1
  35. package/dist/server-fns/admin-users/set-password.js +1 -1
  36. package/dist/server-fns/admin-users/set-user-roles.js +1 -1
  37. package/dist/server-fns/admin-users/update.js +1 -1
  38. package/dist/server-fns/ai/execute.js +1 -1
  39. package/dist/server-fns/auth/sign-in.js +1 -1
  40. package/dist/server-fns/collections/audit.js +1 -1
  41. package/dist/server-fns/collections/copy-to-locale.js +1 -1
  42. package/dist/server-fns/collections/create.js +1 -1
  43. package/dist/server-fns/collections/delete-locale.js +1 -1
  44. package/dist/server-fns/collections/delete.js +1 -1
  45. package/dist/server-fns/collections/duplicate.js +1 -1
  46. package/dist/server-fns/collections/get.js +2 -2
  47. package/dist/server-fns/collections/history.js +1 -1
  48. package/dist/server-fns/collections/list.js +1 -1
  49. package/dist/server-fns/collections/reorder.js +1 -1
  50. package/dist/server-fns/collections/restore-version.js +1 -1
  51. package/dist/server-fns/collections/stats.js +1 -1
  52. package/dist/server-fns/collections/status.js +2 -2
  53. package/dist/server-fns/collections/update.js +2 -2
  54. package/dist/server-fns/collections/upload.js +1 -1
  55. package/dist/server-fns/i18n/set-locale.js +1 -1
  56. package/package.json +14 -10
  57. package/src/admin-shell/admin-activity/list.module.css +69 -0
  58. package/src/admin-shell/admin-activity/list.tsx +242 -0
  59. package/src/admin-shell/chrome/menu-drawer.tsx +34 -3
  60. package/src/admin-shell/chrome/preview-toggle.tsx +14 -3
  61. package/src/routes/create-admin-activity-route.tsx +76 -0
  62. package/src/routes/index.ts +1 -0
  63. package/src/server-fns/admin-account/change-password.ts +1 -1
  64. package/src/server-fns/admin-account/get.ts +1 -1
  65. package/src/server-fns/admin-account/update.ts +1 -1
  66. package/src/server-fns/admin-activity/get.ts +139 -0
  67. package/src/server-fns/admin-activity/index.ts +23 -0
  68. package/src/server-fns/admin-permissions/get-role-abilities.ts +1 -1
  69. package/src/server-fns/admin-permissions/set-role-abilities.ts +1 -1
  70. package/src/server-fns/admin-permissions/who-has.ts +1 -1
  71. package/src/server-fns/admin-roles/create.ts +1 -1
  72. package/src/server-fns/admin-roles/delete.ts +1 -1
  73. package/src/server-fns/admin-roles/get.ts +1 -1
  74. package/src/server-fns/admin-roles/reorder.ts +1 -1
  75. package/src/server-fns/admin-roles/update.ts +1 -1
  76. package/src/server-fns/admin-users/create.ts +1 -1
  77. package/src/server-fns/admin-users/delete.ts +1 -1
  78. package/src/server-fns/admin-users/disable.ts +1 -1
  79. package/src/server-fns/admin-users/enable.ts +1 -1
  80. package/src/server-fns/admin-users/get-user-roles.ts +1 -1
  81. package/src/server-fns/admin-users/get.ts +1 -1
  82. package/src/server-fns/admin-users/list.ts +1 -1
  83. package/src/server-fns/admin-users/set-password.ts +1 -1
  84. package/src/server-fns/admin-users/set-user-roles.ts +1 -1
  85. package/src/server-fns/admin-users/update.ts +1 -1
  86. package/src/server-fns/ai/execute.ts +1 -1
  87. package/src/server-fns/auth/sign-in.ts +1 -1
  88. package/src/server-fns/collections/audit.ts +1 -3
  89. package/src/server-fns/collections/copy-to-locale.ts +1 -1
  90. package/src/server-fns/collections/create.ts +1 -1
  91. package/src/server-fns/collections/delete-locale.ts +1 -1
  92. package/src/server-fns/collections/delete.ts +1 -1
  93. package/src/server-fns/collections/duplicate.ts +1 -1
  94. package/src/server-fns/collections/get.ts +2 -2
  95. package/src/server-fns/collections/history.ts +1 -1
  96. package/src/server-fns/collections/list.ts +1 -1
  97. package/src/server-fns/collections/reorder.ts +1 -1
  98. package/src/server-fns/collections/restore-version.ts +1 -1
  99. package/src/server-fns/collections/stats.ts +1 -1
  100. package/src/server-fns/collections/status.ts +2 -2
  101. package/src/server-fns/collections/update.ts +2 -2
  102. package/src/server-fns/collections/upload.ts +1 -1
  103. package/src/server-fns/i18n/set-locale.ts +1 -1
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This Source Code is subject to the terms of the Mozilla Public
3
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
+ *
6
+ * Copyright (c) Infonomic Company Limited
7
+ */
8
+ /**
9
+ * Admin-activity server fns (docs/AUDIT.md — Workstream 4) — the
10
+ * system-wide activity report. Reads the adapter's audit queries directly
11
+ * (cross-collection, includes admin-realm rows) behind the
12
+ * `admin.activity.read` gate, rather than routing through a per-document
13
+ * read like the collections audit fn.
14
+ */
15
+ export { type ActivityCollectionInfo, type ActivityCollectionMap, getSystemActivityLog, type SystemActivityResponse, type SystemActivitySearchParams, } from './get.js';
@@ -0,0 +1 @@
1
+ export { getSystemActivityLog } from "./get.js";
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const getRoleAbilities = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return getRoleAbilitiesCommand(context, data, {
10
10
  store: bylineCore().adminStore,
@@ -16,7 +16,7 @@ export declare const listRegisteredAbilities: import("@tanstack/react-start").Op
16
16
  label: string;
17
17
  description: string | null;
18
18
  group: string;
19
- source: "admin" | "collection" | "plugin" | "core" | null;
19
+ source: "collection" | "admin" | "plugin" | "core" | null;
20
20
  }[];
21
21
  groups: {
22
22
  group: string;
@@ -25,7 +25,7 @@ export declare const listRegisteredAbilities: import("@tanstack/react-start").Op
25
25
  label: string;
26
26
  description: string | null;
27
27
  group: string;
28
- source: "admin" | "collection" | "plugin" | "core" | null;
28
+ source: "collection" | "admin" | "plugin" | "core" | null;
29
29
  }[];
30
30
  }[];
31
31
  total: number;
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const setRoleAbilities = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return setRoleAbilitiesCommand(context, data, {
10
10
  store: bylineCore().adminStore,
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const whoHasAbility = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return whoHasAbilityCommand(context, data, {
10
10
  store: bylineCore().adminStore,
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const createAdminRole = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return createAdminRoleCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const deleteAdminRole = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return deleteAdminRoleCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const getAdminRole = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return getAdminRoleCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const reorderAdminRoles = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return reorderAdminRolesCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const updateAdminRole = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return updateAdminRoleCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const createAdminUser = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return createAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const deleteAdminUser = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return deleteAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const disableAdminUser = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return disableAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const enableAdminUser = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return enableAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const getUserRoles = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return getRolesForUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const getAdminUser = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return getAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -45,7 +45,7 @@ export declare const listAdminUsers: import("@tanstack/react-start").RequiredFet
45
45
  page: number;
46
46
  page_size: number;
47
47
  query: string;
48
- order: "created_at" | "updated_at" | "email" | "given_name" | "family_name" | "username";
48
+ order: "email" | "created_at" | "updated_at" | "given_name" | "family_name" | "username";
49
49
  desc: boolean;
50
50
  };
51
51
  }>>;
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const listAdminUsers = createServerFn({
6
6
  method: 'GET'
7
- }).inputValidator((input)=>input ?? {}).handler(async ({ data })=>{
7
+ }).validator((input)=>input ?? {}).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return listAdminUsersCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const setAdminUserPassword = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return setAdminUserPasswordCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const setUserRoles = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return setRolesForUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { bylineCore } from "../../integrations/byline-core.js";
5
5
  const updateAdminUser = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data })=>{
7
+ }).validator((input)=>input).handler(async ({ data })=>{
8
8
  const context = await getAdminRequestContext();
9
9
  return updateAdminUserCommand(context, data, {
10
10
  store: bylineCore().adminStore
@@ -3,7 +3,7 @@ import { executeInstruction, executeInstructionStreaming } from "@byline/ai/serv
3
3
  import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  const executeAiInstruction = createServerFn({
5
5
  method: 'POST'
6
- }).inputValidator((input)=>input).handler(async ({ data })=>{
6
+ }).validator((input)=>input).handler(async ({ data })=>{
7
7
  await getAdminRequestContext();
8
8
  if (data.options?.streaming) {
9
9
  const streamResult = executeInstructionStreaming(data.params, data.options);
@@ -6,7 +6,7 @@ import { readAdminLocaleCookie } from "../../i18n/locale-cookie.js";
6
6
  import { bylineCore } from "../../integrations/byline-core.js";
7
7
  const adminSignIn = createServerFn({
8
8
  method: 'POST'
9
- }).inputValidator((input)=>{
9
+ }).validator((input)=>{
10
10
  if ('string' != typeof input?.email || 0 === input.email.length) throw new Error('email is required');
11
11
  if ('string' != typeof input?.password || 0 === input.password.length) throw new Error('password is required');
12
12
  return {
@@ -5,7 +5,7 @@ import { getAdminBylineClient } from "../../integrations/byline-client.js";
5
5
  import { resolveActorLabels } from "./actors.js";
6
6
  const getCollectionDocumentAuditLog = createServerFn({
7
7
  method: 'GET'
8
- }).inputValidator((input)=>input).handler(async ({ data })=>{
8
+ }).validator((input)=>input).handler(async ({ data })=>{
9
9
  const { collection: path, id, params } = data;
10
10
  const config = await ensureCollection(path);
11
11
  if (!config) throw ERR_NOT_FOUND({
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const copyDocumentToLocale = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id, sourceLocale, targetLocale, overwrite } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const createCollectionDocument = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, data: documentData, locale, path: explicitPath, availableLocales } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const deleteDocumentLocale = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id, locale } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const delete_deleteDocument = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const duplicateCollectionDocument = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id: sourceDocumentId } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminBylineClient } from "../../integrations/byline-client.js";
5
5
  import { serialise } from "./utils.js";
6
6
  const getDocumentFn = createServerFn({
7
7
  method: 'GET'
8
- }).inputValidator((input)=>input).handler(async ({ data })=>{
8
+ }).validator((input)=>input).handler(async ({ data })=>{
9
9
  const { collection: path, id, locale, depth, populateRelations } = data;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -88,7 +88,7 @@ const getDocumentFn = createServerFn({
88
88
  });
89
89
  const getDocumentByVersionFn = createServerFn({
90
90
  method: 'GET'
91
- }).inputValidator((input)=>input).handler(async ({ data })=>{
91
+ }).validator((input)=>input).handler(async ({ data })=>{
92
92
  const { collection: path, versionId, locale } = data;
93
93
  const resolvedLocale = locale ?? 'all';
94
94
  const logger = getLogger();
@@ -6,7 +6,7 @@ import { resolveActorLabels } from "./actors.js";
6
6
  import { serialise } from "./utils.js";
7
7
  const getCollectionDocumentHistory = createServerFn({
8
8
  method: 'GET'
9
- }).inputValidator((input)=>input).handler(async ({ data })=>{
9
+ }).validator((input)=>input).handler(async ({ data })=>{
10
10
  const { collection: path, id, params } = data;
11
11
  const config = await ensureCollection(path);
12
12
  if (!config) throw ERR_NOT_FOUND({
@@ -5,7 +5,7 @@ import { getAdminBylineClient } from "../../integrations/byline-client.js";
5
5
  import { serialise } from "./utils.js";
6
6
  const getCollectionDocuments = createServerFn({
7
7
  method: 'GET'
8
- }).inputValidator((input)=>input).handler(async ({ data })=>{
8
+ }).validator((input)=>input).handler(async ({ data })=>{
9
9
  const { collection: path, params } = data;
10
10
  const config = await ensureCollection(path);
11
11
  if (!config) throw ERR_NOT_FOUND({
@@ -4,7 +4,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
4
4
  import { ensureCollection } from "../../integrations/api-utils.js";
5
5
  const reorderCollectionDocument = createServerFn({
6
6
  method: 'POST'
7
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
7
+ }).validator((input)=>input).handler(async ({ data: input })=>{
8
8
  const { collection: path, documentId, beforeDocumentId, afterDocumentId } = input;
9
9
  const logger = getLogger();
10
10
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const restore_version_restoreDocumentVersion = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id, versionId } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -3,7 +3,7 @@ import { ensureCollection } from "../../integrations/api-utils.js";
3
3
  import { getAdminBylineClient } from "../../integrations/byline-client.js";
4
4
  const getCollectionStatsFn = createServerFn({
5
5
  method: 'GET'
6
- }).inputValidator((input)=>input).handler(async ({ data })=>{
6
+ }).validator((input)=>input).handler(async ({ data })=>{
7
7
  const config = await ensureCollection(data.collection);
8
8
  if (!config) return {
9
9
  stats: []
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const updateDocumentStatus = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id, status: nextStatus } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -39,7 +39,7 @@ const updateDocumentStatus = createServerFn({
39
39
  });
40
40
  const status_unpublishDocument = createServerFn({
41
41
  method: 'POST'
42
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
42
+ }).validator((input)=>input).handler(async ({ data: input })=>{
43
43
  const { collection: path, id } = input;
44
44
  const logger = getLogger();
45
45
  const config = await ensureCollection(path);
@@ -5,7 +5,7 @@ import { getAdminRequestContext } from "../../auth/auth-context.js";
5
5
  import { ensureCollection } from "../../integrations/api-utils.js";
6
6
  const updateCollectionDocumentWithPatches = createServerFn({
7
7
  method: 'POST'
8
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
8
+ }).validator((input)=>input).handler(async ({ data: input })=>{
9
9
  const { collection: path, id, patches, versionId, locale } = input;
10
10
  const logger = getLogger();
11
11
  const config = await ensureCollection(path);
@@ -39,7 +39,7 @@ const updateCollectionDocumentWithPatches = createServerFn({
39
39
  });
40
40
  const updateCollectionDocumentSystemFields = createServerFn({
41
41
  method: 'POST'
42
- }).inputValidator((input)=>input).handler(async ({ data: input })=>{
42
+ }).validator((input)=>input).handler(async ({ data: input })=>{
43
43
  const { collection: path, id, locale, path: explicitPath, availableLocales } = input;
44
44
  const logger = getLogger();
45
45
  const config = await ensureCollection(path);
@@ -56,7 +56,7 @@ function resolveUploadFieldName(definition, collectionPath, requested) {
56
56
  }
57
57
  const uploadCollectionField = createServerFn({
58
58
  method: 'POST'
59
- }).inputValidator(parseUploadFormData).handler(async ({ data })=>{
59
+ }).validator(parseUploadFormData).handler(async ({ data })=>{
60
60
  const { collectionPath, shouldCreateDocument, fieldName, file, fields } = data;
61
61
  const logger = getLogger();
62
62
  return withLogContext({
@@ -6,7 +6,7 @@ import { clearAdminLocaleCookie, setAdminLocaleCookie } from "../../i18n/locale-
6
6
  import { bylineCore } from "../../integrations/byline-core.js";
7
7
  const setInterfaceLocaleFn = createServerFn({
8
8
  method: 'POST'
9
- }).inputValidator((input)=>input).handler(async ({ data })=>{
9
+ }).validator((input)=>input).handler(async ({ data })=>{
10
10
  const core = bylineCore();
11
11
  const locales = core.config.i18n.interface.locales;
12
12
  if (null != data.locale && !locales.includes(data.locale)) throw new Error(`[setInterfaceLocaleFn] locale '${data.locale}' is not in i18n.interface.locales [${locales.join(', ')}].`);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "3.10.0",
6
+ "version": "3.11.0",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -45,6 +45,10 @@
45
45
  "types": "./dist/server-fns/admin-account/index.d.ts",
46
46
  "import": "./dist/server-fns/admin-account/index.js"
47
47
  },
48
+ "./server-fns/admin-activity": {
49
+ "types": "./dist/server-fns/admin-activity/index.d.ts",
50
+ "import": "./dist/server-fns/admin-activity/index.js"
51
+ },
48
52
  "./server-fns/ai": {
49
53
  "types": "./dist/server-fns/ai/index.d.ts",
50
54
  "import": "./dist/server-fns/ai/index.js"
@@ -115,13 +119,13 @@
115
119
  "react-swipeable": "^7.0.2",
116
120
  "uuid": "^14.0.0",
117
121
  "zod": "^4.4.3",
118
- "@byline/admin": "3.10.0",
119
- "@byline/core": "3.10.0",
120
- "@byline/auth": "3.10.0",
121
- "@byline/client": "3.10.0",
122
- "@byline/ui": "3.10.0",
123
- "@byline/i18n": "3.10.0",
124
- "@byline/ai": "3.10.0"
122
+ "@byline/ai": "3.11.0",
123
+ "@byline/admin": "3.11.0",
124
+ "@byline/auth": "3.11.0",
125
+ "@byline/i18n": "3.11.0",
126
+ "@byline/ui": "3.11.0",
127
+ "@byline/core": "3.11.0",
128
+ "@byline/client": "3.11.0"
125
129
  },
126
130
  "peerDependencies": {
127
131
  "@tanstack/react-router": "^1.167.0",
@@ -133,8 +137,8 @@
133
137
  "@biomejs/biome": "2.4.15",
134
138
  "@rsbuild/plugin-react": "^2.0.0",
135
139
  "@rslib/core": "^0.21.5",
136
- "@tanstack/react-router": "^1.170.7",
137
- "@tanstack/react-start": "^1.168.10",
140
+ "@tanstack/react-router": "^1.170.15",
141
+ "@tanstack/react-start": "^1.168.25",
138
142
  "@types/node": "^25.9.1",
139
143
  "@types/react": "19.2.15",
140
144
  "@types/react-dom": "19.2.3",
@@ -0,0 +1,69 @@
1
+ /**
2
+ * ActivitySystemView — the system-wide activity report (docs/AUDIT.md — W4).
3
+ *
4
+ * Override handles:
5
+ * .byline-activity-head — title row
6
+ * .byline-activity-title — page title
7
+ * .byline-activity-options — filter + pager bar
8
+ * .byline-activity-empty — empty-state line
9
+ * .byline-activity-table-wrap — table container
10
+ * .byline-activity-when — timestamp cell
11
+ * .byline-activity-change — before → after cell
12
+ * .byline-activity-before — pre-change value
13
+ * .byline-activity-arrow — muted transition arrow
14
+ * .byline-activity-after — post-change value
15
+ */
16
+
17
+ .head,
18
+ :global(.byline-activity-head) {
19
+ margin-bottom: 0.5rem;
20
+ }
21
+
22
+ .title,
23
+ :global(.byline-activity-title) {
24
+ font-size: 1.25rem;
25
+ font-weight: 600;
26
+ }
27
+
28
+ .options,
29
+ :global(.byline-activity-options) {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 0.5rem;
33
+ flex-wrap: wrap;
34
+ margin: 0.75rem 0;
35
+ }
36
+
37
+ .empty,
38
+ :global(.byline-activity-empty) {
39
+ margin: 1.5rem 0;
40
+ color: var(--gray-500);
41
+ font-size: 0.875rem;
42
+ }
43
+
44
+ :is([data-theme="dark"], :global(.dark)) .empty,
45
+ :is([data-theme="dark"], :global(.dark)) :global(.byline-activity-empty) {
46
+ color: var(--gray-400);
47
+ }
48
+
49
+ .tableWrap,
50
+ :global(.byline-activity-table-wrap) {
51
+ margin-top: 0.5rem;
52
+ margin-bottom: 0.75rem;
53
+ }
54
+
55
+ .when,
56
+ :global(.byline-activity-when) {
57
+ white-space: nowrap;
58
+ font-variant-numeric: tabular-nums;
59
+ }
60
+
61
+ .change,
62
+ :global(.byline-activity-change) {
63
+ font-variant-numeric: tabular-nums;
64
+ }
65
+
66
+ .arrow,
67
+ :global(.byline-activity-arrow) {
68
+ color: var(--gray-400);
69
+ }