@byline/host-tanstack-start 0.9.3
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/LICENSE +373 -0
- package/README.md +48 -0
- package/dist/admin-shell/admin-roles/container.d.ts +34 -0
- package/dist/admin-shell/admin-roles/container.d.ts.map +1 -0
- package/dist/admin-shell/admin-roles/container.js +259 -0
- package/dist/admin-shell/admin-roles/container.module.js +17 -0
- package/dist/admin-shell/admin-roles/container_module.css +93 -0
- package/dist/admin-shell/admin-roles/delete.d.ts +9 -0
- package/dist/admin-shell/admin-roles/delete.d.ts.map +1 -0
- package/dist/admin-shell/admin-roles/delete.js +107 -0
- package/dist/admin-shell/admin-roles/delete.module.js +10 -0
- package/dist/admin-shell/admin-roles/delete_module.css +35 -0
- package/dist/admin-shell/admin-roles/list.d.ts +25 -0
- package/dist/admin-shell/admin-roles/list.d.ts.map +1 -0
- package/dist/admin-shell/admin-roles/list.js +292 -0
- package/dist/admin-shell/admin-roles/list.module.js +24 -0
- package/dist/admin-shell/admin-roles/list_module.css +113 -0
- package/dist/admin-shell/admin-users/container.d.ts +18 -0
- package/dist/admin-shell/admin-users/container.d.ts.map +1 -0
- package/dist/admin-shell/admin-users/container.js +418 -0
- package/dist/admin-shell/admin-users/container.module.js +22 -0
- package/dist/admin-shell/admin-users/container_module.css +136 -0
- package/dist/admin-shell/admin-users/delete.d.ts +9 -0
- package/dist/admin-shell/admin-users/delete.d.ts.map +1 -0
- package/dist/admin-shell/admin-users/delete.js +115 -0
- package/dist/admin-shell/admin-users/delete.module.js +10 -0
- package/dist/admin-shell/admin-users/delete_module.css +35 -0
- package/dist/admin-shell/admin-users/list.d.ts +13 -0
- package/dist/admin-shell/admin-users/list.d.ts.map +1 -0
- package/dist/admin-shell/admin-users/list.js +328 -0
- package/dist/admin-shell/admin-users/list.module.js +22 -0
- package/dist/admin-shell/admin-users/list_module.css +112 -0
- package/dist/admin-shell/chrome/admin-app-bar.d.ts +7 -0
- package/dist/admin-shell/chrome/admin-app-bar.d.ts.map +1 -0
- package/dist/admin-shell/chrome/admin-app-bar.js +71 -0
- package/dist/admin-shell/chrome/admin-app-bar.module.js +9 -0
- package/dist/admin-shell/chrome/admin-app-bar_module.css +54 -0
- package/dist/admin-shell/chrome/admin-layout.module.js +5 -0
- package/dist/admin-shell/chrome/admin-layout_module.css +8 -0
- package/dist/admin-shell/chrome/branding.d.ts +9 -0
- package/dist/admin-shell/chrome/branding.d.ts.map +1 -0
- package/dist/admin-shell/chrome/branding.js +17 -0
- package/dist/admin-shell/chrome/branding.module.js +6 -0
- package/dist/admin-shell/chrome/branding_module.css +11 -0
- package/dist/admin-shell/chrome/breadcrumbs/@types.d.ts +6 -0
- package/dist/admin-shell/chrome/breadcrumbs/@types.d.ts.map +1 -0
- package/dist/admin-shell/chrome/breadcrumbs/@types.js +1 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-client.d.ts +7 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-client.d.ts.map +1 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-client.js +20 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-provider.d.ts +24 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-provider.d.ts.map +1 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs-provider.js +23 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs.js +77 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs.module.js +12 -0
- package/dist/admin-shell/chrome/breadcrumbs/breadcrumbs_module.css +81 -0
- package/dist/admin-shell/chrome/byline-logo.d.ts +12 -0
- package/dist/admin-shell/chrome/byline-logo.d.ts.map +1 -0
- package/dist/admin-shell/chrome/byline-logo.js +178 -0
- package/dist/admin-shell/chrome/content.d.ts +24 -0
- package/dist/admin-shell/chrome/content.d.ts.map +1 -0
- package/dist/admin-shell/chrome/content.js +31 -0
- package/dist/admin-shell/chrome/content.module.js +5 -0
- package/dist/admin-shell/chrome/content_module.css +10 -0
- package/dist/admin-shell/chrome/dashboard.d.ts +14 -0
- package/dist/admin-shell/chrome/dashboard.d.ts.map +1 -0
- package/dist/admin-shell/chrome/dashboard.js +129 -0
- package/dist/admin-shell/chrome/dashboard.module.js +19 -0
- package/dist/admin-shell/chrome/dashboard_module.css +175 -0
- package/dist/admin-shell/chrome/drawer-toggle.d.ts +9 -0
- package/dist/admin-shell/chrome/drawer-toggle.d.ts.map +1 -0
- package/dist/admin-shell/chrome/drawer-toggle.js +57 -0
- package/dist/admin-shell/chrome/drawer-toggle.module.js +8 -0
- package/dist/admin-shell/chrome/drawer-toggle_module.css +21 -0
- package/dist/admin-shell/chrome/hamburger.d.ts +10 -0
- package/dist/admin-shell/chrome/hamburger.d.ts.map +1 -0
- package/dist/admin-shell/chrome/hamburger.js +30 -0
- package/dist/admin-shell/chrome/hamburger.module.js +5 -0
- package/dist/admin-shell/chrome/hamburger_module.css +7 -0
- package/dist/admin-shell/chrome/loose-router.d.ts +33 -0
- package/dist/admin-shell/chrome/loose-router.d.ts.map +1 -0
- package/dist/admin-shell/chrome/loose-router.js +6 -0
- package/dist/admin-shell/chrome/menu-drawer.d.ts +10 -0
- package/dist/admin-shell/chrome/menu-drawer.d.ts.map +1 -0
- package/dist/admin-shell/chrome/menu-drawer.js +141 -0
- package/dist/admin-shell/chrome/menu-drawer.module.js +12 -0
- package/dist/admin-shell/chrome/menu-drawer_module.css +137 -0
- package/dist/admin-shell/chrome/menu-provider.d.ts +21 -0
- package/dist/admin-shell/chrome/menu-provider.d.ts.map +1 -0
- package/dist/admin-shell/chrome/menu-provider.js +54 -0
- package/dist/admin-shell/chrome/preview-toggle.d.ts +13 -0
- package/dist/admin-shell/chrome/preview-toggle.d.ts.map +1 -0
- package/dist/admin-shell/chrome/preview-toggle.js +75 -0
- package/dist/admin-shell/chrome/route-error.d.ts +22 -0
- package/dist/admin-shell/chrome/route-error.d.ts.map +1 -0
- package/dist/admin-shell/chrome/route-error.js +119 -0
- package/dist/admin-shell/chrome/route-error.module.js +14 -0
- package/dist/admin-shell/chrome/route-error_module.css +94 -0
- package/dist/admin-shell/chrome/router-pager.d.ts +19 -0
- package/dist/admin-shell/chrome/router-pager.d.ts.map +1 -0
- package/dist/admin-shell/chrome/router-pager.js +91 -0
- package/dist/admin-shell/chrome/sign-in-page.d.ts +19 -0
- package/dist/admin-shell/chrome/sign-in-page.d.ts.map +1 -0
- package/dist/admin-shell/chrome/sign-in-page.js +20 -0
- package/dist/admin-shell/chrome/sign-in-page.module.js +6 -0
- package/dist/admin-shell/chrome/sign-in-page_module.css +22 -0
- package/dist/admin-shell/chrome/sort-icons.d.ts +10 -0
- package/dist/admin-shell/chrome/sort-icons.d.ts.map +1 -0
- package/dist/admin-shell/chrome/sort-icons.js +103 -0
- package/dist/admin-shell/chrome/th-sortable.d.ts +23 -0
- package/dist/admin-shell/chrome/th-sortable.d.ts.map +1 -0
- package/dist/admin-shell/chrome/th-sortable.js +75 -0
- package/dist/admin-shell/chrome/th-sortable.module.js +10 -0
- package/dist/admin-shell/chrome/th-sortable_module.css +37 -0
- package/dist/admin-shell/chrome/use-media-query.d.ts +9 -0
- package/dist/admin-shell/chrome/use-media-query.d.ts.map +1 -0
- package/dist/admin-shell/chrome/use-media-query.js +20 -0
- package/dist/admin-shell/chrome/utils.d.ts +12 -0
- package/dist/admin-shell/chrome/utils.d.ts.map +1 -0
- package/dist/admin-shell/chrome/utils.js +8 -0
- package/dist/admin-shell/collections/api.d.ts +28 -0
- package/dist/admin-shell/collections/api.d.ts.map +1 -0
- package/dist/admin-shell/collections/api.js +51 -0
- package/dist/admin-shell/collections/api.module.js +9 -0
- package/dist/admin-shell/collections/api_module.css +42 -0
- package/dist/admin-shell/collections/create.d.ts +14 -0
- package/dist/admin-shell/collections/create.d.ts.map +1 -0
- package/dist/admin-shell/collections/create.js +77 -0
- package/dist/admin-shell/collections/edit.d.ts +19 -0
- package/dist/admin-shell/collections/edit.d.ts.map +1 -0
- package/dist/admin-shell/collections/edit.js +279 -0
- package/dist/admin-shell/collections/history.d.ts +20 -0
- package/dist/admin-shell/collections/history.d.ts.map +1 -0
- package/dist/admin-shell/collections/history.js +252 -0
- package/dist/admin-shell/collections/history.module.js +18 -0
- package/dist/admin-shell/collections/history_module.css +121 -0
- package/dist/admin-shell/collections/list.d.ts +16 -0
- package/dist/admin-shell/collections/list.d.ts.map +1 -0
- package/dist/admin-shell/collections/list.js +253 -0
- package/dist/admin-shell/collections/list.module.js +16 -0
- package/dist/admin-shell/collections/list_module.css +88 -0
- package/dist/admin-shell/collections/preview-link.d.ts +32 -0
- package/dist/admin-shell/collections/preview-link.d.ts.map +1 -0
- package/dist/admin-shell/collections/preview-link.js +54 -0
- package/dist/admin-shell/collections/tanstack-navigation-guard.d.ts +16 -0
- package/dist/admin-shell/collections/tanstack-navigation-guard.d.ts.map +1 -0
- package/dist/admin-shell/collections/tanstack-navigation-guard.js +19 -0
- package/dist/admin-shell/collections/view-menu.d.ts +58 -0
- package/dist/admin-shell/collections/view-menu.d.ts.map +1 -0
- package/dist/admin-shell/collections/view-menu.js +203 -0
- package/dist/admin-shell/collections/view-menu.module.js +11 -0
- package/dist/admin-shell/collections/view-menu_module.css +43 -0
- package/dist/auth/auth-context.d.ts +38 -0
- package/dist/auth/auth-context.d.ts.map +1 -0
- package/dist/auth/auth-context.js +57 -0
- package/dist/auth/auth-cookies.d.ts +35 -0
- package/dist/auth/auth-cookies.d.ts.map +1 -0
- package/dist/auth/auth-cookies.js +46 -0
- package/dist/auth/preview-cookies.d.ts +20 -0
- package/dist/auth/preview-cookies.d.ts.map +1 -0
- package/dist/auth/preview-cookies.js +26 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/integrations/abilities.d.ts +67 -0
- package/dist/integrations/abilities.d.ts.map +1 -0
- package/dist/integrations/abilities.js +25 -0
- package/dist/integrations/api-utils.d.ts +34 -0
- package/dist/integrations/api-utils.d.ts.map +1 -0
- package/dist/integrations/api-utils.js +22 -0
- package/dist/integrations/byline-admin-services.d.ts +25 -0
- package/dist/integrations/byline-admin-services.d.ts.map +1 -0
- package/dist/integrations/byline-admin-services.js +26 -0
- package/dist/integrations/byline-client.d.ts +22 -0
- package/dist/integrations/byline-client.d.ts.map +1 -0
- package/dist/integrations/byline-client.js +13 -0
- package/dist/integrations/byline-core.d.ts +28 -0
- package/dist/integrations/byline-core.d.ts.map +1 -0
- package/dist/integrations/byline-core.js +5 -0
- package/dist/integrations/byline-field-services.d.ts +19 -0
- package/dist/integrations/byline-field-services.d.ts.map +1 -0
- package/dist/integrations/byline-field-services.js +14 -0
- package/dist/integrations/byline-public-client.d.ts +10 -0
- package/dist/integrations/byline-public-client.d.ts.map +1 -0
- package/dist/integrations/byline-public-client.js +15 -0
- package/dist/integrations/byline-viewer-client.d.ts +21 -0
- package/dist/integrations/byline-viewer-client.d.ts.map +1 -0
- package/dist/integrations/byline-viewer-client.js +39 -0
- package/dist/integrations/start-errors.d.ts +23 -0
- package/dist/integrations/start-errors.d.ts.map +1 -0
- package/dist/integrations/start-errors.js +32 -0
- package/dist/routes/create-admin-account-route.d.ts +9 -0
- package/dist/routes/create-admin-account-route.d.ts.map +1 -0
- package/dist/routes/create-admin-account-route.js +68 -0
- package/dist/routes/create-admin-dashboard-route.d.ts +9 -0
- package/dist/routes/create-admin-dashboard-route.d.ts.map +1 -0
- package/dist/routes/create-admin-dashboard-route.js +44 -0
- package/dist/routes/create-admin-layout-route.d.ts +14 -0
- package/dist/routes/create-admin-layout-route.d.ts.map +1 -0
- package/dist/routes/create-admin-layout-route.js +64 -0
- package/dist/routes/create-admin-permissions-route.d.ts +9 -0
- package/dist/routes/create-admin-permissions-route.d.ts.map +1 -0
- package/dist/routes/create-admin-permissions-route.js +39 -0
- package/dist/routes/create-admin-role-edit-route.d.ts +9 -0
- package/dist/routes/create-admin-role-edit-route.d.ts.map +1 -0
- package/dist/routes/create-admin-role-edit-route.js +79 -0
- package/dist/routes/create-admin-roles-list-route.d.ts +9 -0
- package/dist/routes/create-admin-roles-list-route.d.ts.map +1 -0
- package/dist/routes/create-admin-roles-list-route.js +39 -0
- package/dist/routes/create-admin-user-edit-route.d.ts +9 -0
- package/dist/routes/create-admin-user-edit-route.d.ts.map +1 -0
- package/dist/routes/create-admin-user-edit-route.js +86 -0
- package/dist/routes/create-admin-users-list-route.d.ts +9 -0
- package/dist/routes/create-admin-users-list-route.d.ts.map +1 -0
- package/dist/routes/create-admin-users-list-route.js +71 -0
- package/dist/routes/create-collection-api-route.d.ts +15 -0
- package/dist/routes/create-collection-api-route.d.ts.map +1 -0
- package/dist/routes/create-collection-api-route.js +71 -0
- package/dist/routes/create-collection-create-route.d.ts +9 -0
- package/dist/routes/create-collection-create-route.d.ts.map +1 -0
- package/dist/routes/create-collection-create-route.js +53 -0
- package/dist/routes/create-collection-edit-route.d.ts +15 -0
- package/dist/routes/create-collection-edit-route.d.ts.map +1 -0
- package/dist/routes/create-collection-edit-route.js +65 -0
- package/dist/routes/create-collection-history-route.d.ts +15 -0
- package/dist/routes/create-collection-history-route.d.ts.map +1 -0
- package/dist/routes/create-collection-history-route.js +94 -0
- package/dist/routes/create-collection-list-route.d.ts +9 -0
- package/dist/routes/create-collection-list-route.d.ts.map +1 -0
- package/dist/routes/create-collection-list-route.js +130 -0
- package/dist/routes/create-sign-in-route.d.ts +9 -0
- package/dist/routes/create-sign-in-route.d.ts.map +1 -0
- package/dist/routes/create-sign-in-route.js +21 -0
- package/dist/routes/index.d.ts +35 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +14 -0
- package/dist/server-fns/admin-account/change-password.d.ts +30 -0
- package/dist/server-fns/admin-account/change-password.d.ts.map +1 -0
- package/dist/server-fns/admin-account/change-password.js +13 -0
- package/dist/server-fns/admin-account/get.d.ts +31 -0
- package/dist/server-fns/admin-account/get.d.ts.map +1 -0
- package/dist/server-fns/admin-account/get.js +13 -0
- package/dist/server-fns/admin-account/index.d.ts +22 -0
- package/dist/server-fns/admin-account/index.d.ts.map +1 -0
- package/dist/server-fns/admin-account/index.js +3 -0
- package/dist/server-fns/admin-account/update.d.ts +34 -0
- package/dist/server-fns/admin-account/update.d.ts.map +1 -0
- package/dist/server-fns/admin-account/update.js +13 -0
- package/dist/server-fns/admin-permissions/get-role-abilities.d.ts +16 -0
- package/dist/server-fns/admin-permissions/get-role-abilities.d.ts.map +1 -0
- package/dist/server-fns/admin-permissions/get-role-abilities.js +14 -0
- package/dist/server-fns/admin-permissions/index.d.ts +25 -0
- package/dist/server-fns/admin-permissions/index.d.ts.map +1 -0
- package/dist/server-fns/admin-permissions/index.js +4 -0
- package/dist/server-fns/admin-permissions/list-registered.d.ts +33 -0
- package/dist/server-fns/admin-permissions/list-registered.d.ts.map +1 -0
- package/dist/server-fns/admin-permissions/list-registered.js +14 -0
- package/dist/server-fns/admin-permissions/set-role-abilities.d.ts +16 -0
- package/dist/server-fns/admin-permissions/set-role-abilities.d.ts.map +1 -0
- package/dist/server-fns/admin-permissions/set-role-abilities.js +14 -0
- package/dist/server-fns/admin-permissions/who-has.d.ts +26 -0
- package/dist/server-fns/admin-permissions/who-has.d.ts.map +1 -0
- package/dist/server-fns/admin-permissions/who-has.js +14 -0
- package/dist/server-fns/admin-roles/create.d.ts +24 -0
- package/dist/server-fns/admin-roles/create.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/create.js +13 -0
- package/dist/server-fns/admin-roles/delete.d.ts +17 -0
- package/dist/server-fns/admin-roles/delete.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/delete.js +13 -0
- package/dist/server-fns/admin-roles/get.d.ts +22 -0
- package/dist/server-fns/admin-roles/get.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/get.js +13 -0
- package/dist/server-fns/admin-roles/index.d.ts +23 -0
- package/dist/server-fns/admin-roles/index.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/index.js +6 -0
- package/dist/server-fns/admin-roles/list.d.ts +26 -0
- package/dist/server-fns/admin-roles/list.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/list.js +13 -0
- package/dist/server-fns/admin-roles/reorder.d.ts +15 -0
- package/dist/server-fns/admin-roles/reorder.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/reorder.js +13 -0
- package/dist/server-fns/admin-roles/update.d.ts +27 -0
- package/dist/server-fns/admin-roles/update.d.ts.map +1 -0
- package/dist/server-fns/admin-roles/update.js +13 -0
- package/dist/server-fns/admin-users/create.d.ts +35 -0
- package/dist/server-fns/admin-users/create.d.ts.map +1 -0
- package/dist/server-fns/admin-users/create.js +13 -0
- package/dist/server-fns/admin-users/delete.d.ts +17 -0
- package/dist/server-fns/admin-users/delete.d.ts.map +1 -0
- package/dist/server-fns/admin-users/delete.js +13 -0
- package/dist/server-fns/admin-users/disable.d.ts +15 -0
- package/dist/server-fns/admin-users/disable.d.ts.map +1 -0
- package/dist/server-fns/admin-users/disable.js +13 -0
- package/dist/server-fns/admin-users/enable.d.ts +15 -0
- package/dist/server-fns/admin-users/enable.d.ts.map +1 -0
- package/dist/server-fns/admin-users/enable.js +13 -0
- package/dist/server-fns/admin-users/get-user-roles.d.ts +25 -0
- package/dist/server-fns/admin-users/get-user-roles.d.ts.map +1 -0
- package/dist/server-fns/admin-users/get-user-roles.js +13 -0
- package/dist/server-fns/admin-users/get.d.ts +29 -0
- package/dist/server-fns/admin-users/get.d.ts.map +1 -0
- package/dist/server-fns/admin-users/get.js +13 -0
- package/dist/server-fns/admin-users/index.d.ts +28 -0
- package/dist/server-fns/admin-users/index.d.ts.map +1 -0
- package/dist/server-fns/admin-users/index.js +10 -0
- package/dist/server-fns/admin-users/list.d.ts +51 -0
- package/dist/server-fns/admin-users/list.d.ts.map +1 -0
- package/dist/server-fns/admin-users/list.js +13 -0
- package/dist/server-fns/admin-users/set-password.d.ts +30 -0
- package/dist/server-fns/admin-users/set-password.d.ts.map +1 -0
- package/dist/server-fns/admin-users/set-password.js +13 -0
- package/dist/server-fns/admin-users/set-user-roles.d.ts +25 -0
- package/dist/server-fns/admin-users/set-user-roles.d.ts.map +1 -0
- package/dist/server-fns/admin-users/set-user-roles.js +13 -0
- package/dist/server-fns/admin-users/update.d.ts +37 -0
- package/dist/server-fns/admin-users/update.d.ts.map +1 -0
- package/dist/server-fns/admin-users/update.js +13 -0
- package/dist/server-fns/auth/current-user.d.ts +38 -0
- package/dist/server-fns/auth/current-user.d.ts.map +1 -0
- package/dist/server-fns/auth/current-user.js +52 -0
- package/dist/server-fns/auth/index.d.ts +11 -0
- package/dist/server-fns/auth/index.d.ts.map +1 -0
- package/dist/server-fns/auth/index.js +3 -0
- package/dist/server-fns/auth/sign-in.d.ts +19 -0
- package/dist/server-fns/auth/sign-in.d.ts.map +1 -0
- package/dist/server-fns/auth/sign-in.js +31 -0
- package/dist/server-fns/auth/sign-out.d.ts +11 -0
- package/dist/server-fns/auth/sign-out.d.ts.map +1 -0
- package/dist/server-fns/auth/sign-out.js +17 -0
- package/dist/server-fns/collections/create.d.ts +21 -0
- package/dist/server-fns/collections/create.d.ts.map +1 -0
- package/dist/server-fns/collections/create.js +40 -0
- package/dist/server-fns/collections/delete.d.ts +18 -0
- package/dist/server-fns/collections/delete.d.ts.map +1 -0
- package/dist/server-fns/collections/delete.js +44 -0
- package/dist/server-fns/collections/get.d.ts +26 -0
- package/dist/server-fns/collections/get.d.ts.map +1 -0
- package/dist/server-fns/collections/get.js +133 -0
- package/dist/server-fns/collections/history.d.ts +43 -0
- package/dist/server-fns/collections/history.d.ts.map +1 -0
- package/dist/server-fns/collections/history.js +29 -0
- package/dist/server-fns/collections/index.d.ts +16 -0
- package/dist/server-fns/collections/index.d.ts.map +1 -0
- package/dist/server-fns/collections/index.js +9 -0
- package/dist/server-fns/collections/list.d.ts +54 -0
- package/dist/server-fns/collections/list.d.ts.map +1 -0
- package/dist/server-fns/collections/list.js +65 -0
- package/dist/server-fns/collections/stats.d.ts +17 -0
- package/dist/server-fns/collections/stats.d.ts.map +1 -0
- package/dist/server-fns/collections/stats.js +28 -0
- package/dist/server-fns/collections/status.d.ts +31 -0
- package/dist/server-fns/collections/status.d.ts.map +1 -0
- package/dist/server-fns/collections/status.js +79 -0
- package/dist/server-fns/collections/update.d.ts +26 -0
- package/dist/server-fns/collections/update.d.ts.map +1 -0
- package/dist/server-fns/collections/update.js +41 -0
- package/dist/server-fns/collections/upload.d.ts +57 -0
- package/dist/server-fns/collections/upload.d.ts.map +1 -0
- package/dist/server-fns/collections/upload.js +132 -0
- package/dist/server-fns/collections/utils.d.ts +15 -0
- package/dist/server-fns/collections/utils.d.ts.map +1 -0
- package/dist/server-fns/collections/utils.js +4 -0
- package/dist/server-fns/preview/disable.d.ts +12 -0
- package/dist/server-fns/preview/disable.d.ts.map +1 -0
- package/dist/server-fns/preview/disable.js +12 -0
- package/dist/server-fns/preview/enable.d.ts +12 -0
- package/dist/server-fns/preview/enable.d.ts.map +1 -0
- package/dist/server-fns/preview/enable.js +14 -0
- package/dist/server-fns/preview/index.d.ts +11 -0
- package/dist/server-fns/preview/index.d.ts.map +1 -0
- package/dist/server-fns/preview/index.js +3 -0
- package/dist/server-fns/preview/state.d.ts +11 -0
- package/dist/server-fns/preview/state.d.ts.map +1 -0
- package/dist/server-fns/preview/state.js +8 -0
- package/package.json +164 -0
- package/src/admin-shell/admin-roles/container.module.css +132 -0
- package/src/admin-shell/admin-roles/container.tsx +209 -0
- package/src/admin-shell/admin-roles/delete.module.css +52 -0
- package/src/admin-shell/admin-roles/delete.tsx +117 -0
- package/src/admin-shell/admin-roles/list.module.css +158 -0
- package/src/admin-shell/admin-roles/list.tsx +308 -0
- package/src/admin-shell/admin-users/container.module.css +199 -0
- package/src/admin-shell/admin-users/container.tsx +344 -0
- package/src/admin-shell/admin-users/delete.module.css +52 -0
- package/src/admin-shell/admin-users/delete.tsx +129 -0
- package/src/admin-shell/admin-users/list.module.css +164 -0
- package/src/admin-shell/admin-users/list.tsx +314 -0
- package/src/admin-shell/chrome/admin-app-bar.module.css +72 -0
- package/src/admin-shell/chrome/admin-app-bar.tsx +74 -0
- package/src/admin-shell/chrome/admin-layout.module.css +16 -0
- package/src/admin-shell/chrome/branding.module.css +20 -0
- package/src/admin-shell/chrome/branding.tsx +23 -0
- package/src/admin-shell/chrome/breadcrumbs/@types.ts +5 -0
- package/src/admin-shell/chrome/breadcrumbs/breadcrumbs-client.tsx +30 -0
- package/src/admin-shell/chrome/breadcrumbs/breadcrumbs-provider.tsx +48 -0
- package/src/admin-shell/chrome/breadcrumbs/breadcrumbs.module.css +93 -0
- package/src/admin-shell/chrome/breadcrumbs/breadcrumbs.tsx +96 -0
- package/src/admin-shell/chrome/byline-logo.tsx +151 -0
- package/src/admin-shell/chrome/content.module.css +16 -0
- package/src/admin-shell/chrome/content.tsx +60 -0
- package/src/admin-shell/chrome/dashboard.module.css +245 -0
- package/src/admin-shell/chrome/dashboard.tsx +128 -0
- package/src/admin-shell/chrome/drawer-toggle.module.css +30 -0
- package/src/admin-shell/chrome/drawer-toggle.tsx +62 -0
- package/src/admin-shell/chrome/hamburger.module.css +16 -0
- package/src/admin-shell/chrome/hamburger.tsx +56 -0
- package/src/admin-shell/chrome/loose-router.ts +47 -0
- package/src/admin-shell/chrome/menu-drawer.module.css +196 -0
- package/src/admin-shell/chrome/menu-drawer.tsx +155 -0
- package/src/admin-shell/chrome/menu-provider.tsx +95 -0
- package/src/admin-shell/chrome/preview-toggle.tsx +107 -0
- package/src/admin-shell/chrome/route-error.module.css +114 -0
- package/src/admin-shell/chrome/route-error.tsx +125 -0
- package/src/admin-shell/chrome/router-pager.tsx +179 -0
- package/src/admin-shell/chrome/sign-in-page.module.css +32 -0
- package/src/admin-shell/chrome/sign-in-page.tsx +35 -0
- package/src/admin-shell/chrome/sort-icons.tsx +127 -0
- package/src/admin-shell/chrome/th-sortable.module.css +51 -0
- package/src/admin-shell/chrome/th-sortable.tsx +114 -0
- package/src/admin-shell/chrome/use-media-query.ts +28 -0
- package/src/admin-shell/chrome/utils.ts +20 -0
- package/src/admin-shell/collections/api.module.css +62 -0
- package/src/admin-shell/collections/api.tsx +70 -0
- package/src/admin-shell/collections/create.tsx +108 -0
- package/src/admin-shell/collections/edit.tsx +319 -0
- package/src/admin-shell/collections/history.module.css +156 -0
- package/src/admin-shell/collections/history.tsx +352 -0
- package/src/admin-shell/collections/list.module.css +124 -0
- package/src/admin-shell/collections/list.tsx +313 -0
- package/src/admin-shell/collections/preview-link.tsx +138 -0
- package/src/admin-shell/collections/tanstack-navigation-guard.ts +43 -0
- package/src/admin-shell/collections/view-menu.module.css +60 -0
- package/src/admin-shell/collections/view-menu.tsx +238 -0
- package/src/auth/auth-context.test.node.ts +200 -0
- package/src/auth/auth-context.ts +119 -0
- package/src/auth/auth-cookies.ts +113 -0
- package/src/auth/preview-cookies.ts +73 -0
- package/src/declarations.d.ts +4 -0
- package/src/index.ts +44 -0
- package/src/integrations/abilities.tsx +90 -0
- package/src/integrations/api-utils.ts +66 -0
- package/src/integrations/byline-admin-services.ts +86 -0
- package/src/integrations/byline-client.ts +40 -0
- package/src/integrations/byline-core.ts +32 -0
- package/src/integrations/byline-field-services.ts +35 -0
- package/src/integrations/byline-public-client.ts +53 -0
- package/src/integrations/byline-viewer-client.ts +99 -0
- package/src/integrations/start-errors.ts +86 -0
- package/src/routes/create-admin-account-route.tsx +65 -0
- package/src/routes/create-admin-dashboard-route.tsx +52 -0
- package/src/routes/create-admin-layout-route.tsx +89 -0
- package/src/routes/create-admin-permissions-route.tsx +43 -0
- package/src/routes/create-admin-role-edit-route.tsx +88 -0
- package/src/routes/create-admin-roles-list-route.tsx +39 -0
- package/src/routes/create-admin-user-edit-route.tsx +105 -0
- package/src/routes/create-admin-users-list-route.tsx +84 -0
- package/src/routes/create-collection-api-route.tsx +111 -0
- package/src/routes/create-collection-create-route.tsx +66 -0
- package/src/routes/create-collection-edit-route.tsx +102 -0
- package/src/routes/create-collection-history-route.tsx +130 -0
- package/src/routes/create-collection-list-route.tsx +175 -0
- package/src/routes/create-sign-in-route.tsx +39 -0
- package/src/routes/index.ts +36 -0
- package/src/server-fns/admin-account/change-password.ts +27 -0
- package/src/server-fns/admin-account/get.ts +27 -0
- package/src/server-fns/admin-account/index.ts +28 -0
- package/src/server-fns/admin-account/update.ts +31 -0
- package/src/server-fns/admin-permissions/get-role-abilities.ts +27 -0
- package/src/server-fns/admin-permissions/index.ts +36 -0
- package/src/server-fns/admin-permissions/list-registered.ts +36 -0
- package/src/server-fns/admin-permissions/set-role-abilities.ts +32 -0
- package/src/server-fns/admin-permissions/who-has.ts +24 -0
- package/src/server-fns/admin-roles/create.ts +28 -0
- package/src/server-fns/admin-roles/delete.ts +25 -0
- package/src/server-fns/admin-roles/get.ts +21 -0
- package/src/server-fns/admin-roles/index.ts +25 -0
- package/src/server-fns/admin-roles/list.ts +27 -0
- package/src/server-fns/admin-roles/reorder.ts +21 -0
- package/src/server-fns/admin-roles/update.ts +31 -0
- package/src/server-fns/admin-users/create.ts +32 -0
- package/src/server-fns/admin-users/delete.ts +21 -0
- package/src/server-fns/admin-users/disable.ts +24 -0
- package/src/server-fns/admin-users/enable.ts +24 -0
- package/src/server-fns/admin-users/get-user-roles.ts +21 -0
- package/src/server-fns/admin-users/get.ts +21 -0
- package/src/server-fns/admin-users/index.ts +35 -0
- package/src/server-fns/admin-users/list.ts +40 -0
- package/src/server-fns/admin-users/set-password.ts +27 -0
- package/src/server-fns/admin-users/set-user-roles.ts +26 -0
- package/src/server-fns/admin-users/update.ts +34 -0
- package/src/server-fns/auth/current-user.ts +117 -0
- package/src/server-fns/auth/index.ts +15 -0
- package/src/server-fns/auth/sign-in.ts +71 -0
- package/src/server-fns/auth/sign-out.ts +42 -0
- package/src/server-fns/collections/create.ts +58 -0
- package/src/server-fns/collections/delete.ts +62 -0
- package/src/server-fns/collections/get.ts +233 -0
- package/src/server-fns/collections/history.ts +73 -0
- package/src/server-fns/collections/index.ts +16 -0
- package/src/server-fns/collections/list.ts +121 -0
- package/src/server-fns/collections/stats.ts +52 -0
- package/src/server-fns/collections/status.ts +102 -0
- package/src/server-fns/collections/update.ts +67 -0
- package/src/server-fns/collections/upload.ts +274 -0
- package/src/server-fns/collections/utils.ts +17 -0
- package/src/server-fns/preview/disable.ts +24 -0
- package/src/server-fns/preview/enable.ts +27 -0
- package/src/server-fns/preview/index.ts +11 -0
- package/src/server-fns/preview/state.ts +30 -0
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AccountResponse, getAccountCommand } from '@byline/admin/admin-account'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Read the currently signed-in admin's full account row. Used by the
|
|
18
|
+
* admin-account route loader to obtain the `vid` and the timestamp /
|
|
19
|
+
* status fields that the slim `CurrentAdminUser` on route context
|
|
20
|
+
* doesn't carry.
|
|
21
|
+
*/
|
|
22
|
+
export const getAccount = createServerFn({ method: 'GET' })
|
|
23
|
+
.inputValidator((input?: Record<string, never>) => input ?? {})
|
|
24
|
+
.handler(async ({ data }): Promise<AccountResponse> => {
|
|
25
|
+
const context = await getAdminRequestContext()
|
|
26
|
+
return getAccountCommand(context, data, { store: bylineCore().adminStore! })
|
|
27
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Webapp transport for `@byline/admin/admin-account` self-service.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the admin-users / admin-roles module shape: each operation
|
|
13
|
+
* is a thin `createServerFn` wrapper that resolves a `RequestContext`
|
|
14
|
+
* and delegates to the matching `*Command` from the package. The
|
|
15
|
+
* actor is the target — none of these accept an `id`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// Re-exports from the package, useful for components that need to
|
|
19
|
+
// type-narrow against the response shape without pulling
|
|
20
|
+
// `@byline/admin/admin-account` into the client bundle (which would
|
|
21
|
+
// transitively pull argon2 in via the package barrel).
|
|
22
|
+
export type { AccountResponse } from '@byline/admin/admin-account'
|
|
23
|
+
|
|
24
|
+
export { changeAccountPassword } from './change-password'
|
|
25
|
+
export { getAccount } from './get'
|
|
26
|
+
export { updateAccount } from './update'
|
|
27
|
+
export type { ChangeAccountPasswordInput } from './change-password'
|
|
28
|
+
export type { UpdateAccountInput } from './update'
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AccountResponse, updateAccountCommand } from '@byline/admin/admin-account'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export interface UpdateAccountInput {
|
|
17
|
+
vid: number
|
|
18
|
+
patch: {
|
|
19
|
+
email?: string
|
|
20
|
+
given_name?: string | null
|
|
21
|
+
family_name?: string | null
|
|
22
|
+
username?: string | null
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const updateAccount = createServerFn({ method: 'POST' })
|
|
27
|
+
.inputValidator((input: UpdateAccountInput) => input)
|
|
28
|
+
.handler(async ({ data }): Promise<AccountResponse> => {
|
|
29
|
+
const context = await getAdminRequestContext()
|
|
30
|
+
return updateAccountCommand(context, data, { store: bylineCore().adminStore! })
|
|
31
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type GetRoleAbilitiesResponse,
|
|
13
|
+
getRoleAbilitiesCommand,
|
|
14
|
+
} from '@byline/admin/admin-permissions'
|
|
15
|
+
|
|
16
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
17
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
18
|
+
|
|
19
|
+
export const getRoleAbilities = createServerFn({ method: 'GET' })
|
|
20
|
+
.inputValidator((input: { id: string }) => input)
|
|
21
|
+
.handler(async ({ data }): Promise<GetRoleAbilitiesResponse> => {
|
|
22
|
+
const context = await getAdminRequestContext()
|
|
23
|
+
return getRoleAbilitiesCommand(context, data, {
|
|
24
|
+
store: bylineCore().adminStore!,
|
|
25
|
+
abilities: bylineCore().abilities,
|
|
26
|
+
})
|
|
27
|
+
})
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Admin-permissions server fns — thin wrappers over the transport-
|
|
11
|
+
* agnostic commands in `@byline/admin/admin-permissions`. Each fn
|
|
12
|
+
* resolves the admin request context from session cookies and threads
|
|
13
|
+
* in both the lazy-initialised `AdminStore` and the shared
|
|
14
|
+
* `AbilityRegistry` from `bylineCore().abilities`.
|
|
15
|
+
*
|
|
16
|
+
* Phase 1 (this commit) ships the read-only inspector: list registered
|
|
17
|
+
* abilities and resolve who holds a given ability. Phase B will add
|
|
18
|
+
* `getRoleAbilities` / `setRoleAbilities` for the per-role editor that
|
|
19
|
+
* mounts on the admin-roles role detail page.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export type {
|
|
23
|
+
AbilityDescriptorResponse,
|
|
24
|
+
AbilityGroupResponse,
|
|
25
|
+
AbilityHolderRole,
|
|
26
|
+
AbilityHolderUser,
|
|
27
|
+
GetRoleAbilitiesResponse,
|
|
28
|
+
ListRegisteredAbilitiesResponse,
|
|
29
|
+
SetRoleAbilitiesResponse,
|
|
30
|
+
WhoHasAbilityResponse,
|
|
31
|
+
} from '@byline/admin/admin-permissions'
|
|
32
|
+
|
|
33
|
+
export { getRoleAbilities } from './get-role-abilities'
|
|
34
|
+
export { listRegisteredAbilities } from './list-registered'
|
|
35
|
+
export { type SetRoleAbilitiesInput, setRoleAbilities } from './set-role-abilities'
|
|
36
|
+
export { whoHasAbility } from './who-has'
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type ListRegisteredAbilitiesResponse,
|
|
13
|
+
listRegisteredAbilitiesCommand,
|
|
14
|
+
} from '@byline/admin/admin-permissions'
|
|
15
|
+
|
|
16
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
17
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* List every registered ability — fed from `bylineCore().abilities`,
|
|
21
|
+
* populated at init time by collection auto-registration plus
|
|
22
|
+
* `registerAdminAbilities`. No DB read.
|
|
23
|
+
*/
|
|
24
|
+
export const listRegisteredAbilities = createServerFn({ method: 'GET' }).handler(
|
|
25
|
+
async (): Promise<ListRegisteredAbilitiesResponse> => {
|
|
26
|
+
const context = await getAdminRequestContext()
|
|
27
|
+
return listRegisteredAbilitiesCommand(
|
|
28
|
+
context,
|
|
29
|
+
{},
|
|
30
|
+
{
|
|
31
|
+
store: bylineCore().adminStore!,
|
|
32
|
+
abilities: bylineCore().abilities,
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type SetRoleAbilitiesResponse,
|
|
13
|
+
setRoleAbilitiesCommand,
|
|
14
|
+
} from '@byline/admin/admin-permissions'
|
|
15
|
+
|
|
16
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
17
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
18
|
+
|
|
19
|
+
export interface SetRoleAbilitiesInput {
|
|
20
|
+
id: string
|
|
21
|
+
abilities: string[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const setRoleAbilities = createServerFn({ method: 'POST' })
|
|
25
|
+
.inputValidator((input: SetRoleAbilitiesInput) => input)
|
|
26
|
+
.handler(async ({ data }): Promise<SetRoleAbilitiesResponse> => {
|
|
27
|
+
const context = await getAdminRequestContext()
|
|
28
|
+
return setRoleAbilitiesCommand(context, data, {
|
|
29
|
+
store: bylineCore().adminStore!,
|
|
30
|
+
abilities: bylineCore().abilities,
|
|
31
|
+
})
|
|
32
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type WhoHasAbilityResponse, whoHasAbilityCommand } from '@byline/admin/admin-permissions'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const whoHasAbility = createServerFn({ method: 'GET' })
|
|
17
|
+
.inputValidator((input: { ability: string }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<WhoHasAbilityResponse> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return whoHasAbilityCommand(context, data, {
|
|
21
|
+
store: bylineCore().adminStore!,
|
|
22
|
+
abilities: bylineCore().abilities,
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminRoleResponse, createAdminRoleCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export interface CreateAdminRoleInput {
|
|
17
|
+
name: string
|
|
18
|
+
machine_name: string
|
|
19
|
+
description?: string | null
|
|
20
|
+
order?: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const createAdminRole = createServerFn({ method: 'POST' })
|
|
24
|
+
.inputValidator((input: CreateAdminRoleInput) => input)
|
|
25
|
+
.handler(async ({ data }): Promise<AdminRoleResponse> => {
|
|
26
|
+
const context = await getAdminRequestContext()
|
|
27
|
+
return createAdminRoleCommand(context, data, { store: bylineCore().adminStore! })
|
|
28
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { deleteAdminRoleCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
// Return shape mirrors `OkResponse` from `@byline/admin/admin-users`.
|
|
17
|
+
// Lifting the type to a shared spot is a small follow-up — the two
|
|
18
|
+
// modules each declare their own identical `OkResponse` today, and the
|
|
19
|
+
// root `@byline/admin` barrel can only re-export one of them.
|
|
20
|
+
export const deleteAdminRole = createServerFn({ method: 'POST' })
|
|
21
|
+
.inputValidator((input: { id: string; vid: number }) => input)
|
|
22
|
+
.handler(async ({ data }): Promise<{ ok: true }> => {
|
|
23
|
+
const context = await getAdminRequestContext()
|
|
24
|
+
return deleteAdminRoleCommand(context, data, { store: bylineCore().adminStore! })
|
|
25
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminRoleResponse, getAdminRoleCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const getAdminRole = createServerFn({ method: 'GET' })
|
|
17
|
+
.inputValidator((input: { id: string }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<AdminRoleResponse> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return getAdminRoleCommand(context, data, { store: bylineCore().adminStore! })
|
|
21
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Admin-roles server fns — thin wrappers over the transport-agnostic
|
|
11
|
+
* commands in `@byline/admin/admin-roles`. Each fn resolves the admin
|
|
12
|
+
* request context from session cookies, threads in the lazy-initialised
|
|
13
|
+
* `AdminStore`, and lets the command do the heavy lifting. Re-exports
|
|
14
|
+
* the response types so route loaders can type their loader-data
|
|
15
|
+
* without reaching across package boundaries.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export type { AdminRoleListResponse, AdminRoleResponse } from '@byline/admin/admin-roles'
|
|
19
|
+
|
|
20
|
+
export { type CreateAdminRoleInput, createAdminRole } from './create'
|
|
21
|
+
export { deleteAdminRole } from './delete'
|
|
22
|
+
export { getAdminRole } from './get'
|
|
23
|
+
export { listAdminRoles } from './list'
|
|
24
|
+
export { reorderAdminRoles } from './reorder'
|
|
25
|
+
export { type UpdateAdminRoleInput, updateAdminRole } from './update'
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminRoleListResponse, listAdminRolesCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* List admin roles. Thin server-fn wrapper over `listAdminRolesCommand`
|
|
18
|
+
* — validation, ability assertion, and shaping all live in the command.
|
|
19
|
+
* No paging or sorting at this layer; the role set is small by design
|
|
20
|
+
* and ordered by the `order` column.
|
|
21
|
+
*/
|
|
22
|
+
export const listAdminRoles = createServerFn({ method: 'GET' }).handler(
|
|
23
|
+
async (): Promise<AdminRoleListResponse> => {
|
|
24
|
+
const context = await getAdminRequestContext()
|
|
25
|
+
return listAdminRolesCommand(context, {}, { store: bylineCore().adminStore! })
|
|
26
|
+
}
|
|
27
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { reorderAdminRolesCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const reorderAdminRoles = createServerFn({ method: 'POST' })
|
|
17
|
+
.inputValidator((input: { ids: string[] }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<{ ok: true }> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return reorderAdminRolesCommand(context, data, { store: bylineCore().adminStore! })
|
|
21
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminRoleResponse, updateAdminRoleCommand } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export interface UpdateAdminRoleInput {
|
|
17
|
+
id: string
|
|
18
|
+
vid: number
|
|
19
|
+
patch: {
|
|
20
|
+
name?: string
|
|
21
|
+
description?: string | null
|
|
22
|
+
order?: number
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const updateAdminRole = createServerFn({ method: 'POST' })
|
|
27
|
+
.inputValidator((input: UpdateAdminRoleInput) => input)
|
|
28
|
+
.handler(async ({ data }): Promise<AdminRoleResponse> => {
|
|
29
|
+
const context = await getAdminRequestContext()
|
|
30
|
+
return updateAdminRoleCommand(context, data, { store: bylineCore().adminStore! })
|
|
31
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminUserResponse, createAdminUserCommand } from '@byline/admin/admin-users'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export interface CreateAdminUserInput {
|
|
17
|
+
email: string
|
|
18
|
+
password: string
|
|
19
|
+
given_name?: string | null
|
|
20
|
+
family_name?: string | null
|
|
21
|
+
username?: string | null
|
|
22
|
+
is_super_admin?: boolean
|
|
23
|
+
is_enabled?: boolean
|
|
24
|
+
is_email_verified?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const createAdminUser = createServerFn({ method: 'POST' })
|
|
28
|
+
.inputValidator((input: CreateAdminUserInput) => input)
|
|
29
|
+
.handler(async ({ data }): Promise<AdminUserResponse> => {
|
|
30
|
+
const context = await getAdminRequestContext()
|
|
31
|
+
return createAdminUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
32
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { deleteAdminUserCommand, type OkResponse } from '@byline/admin/admin-users'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const deleteAdminUser = createServerFn({ method: 'POST' })
|
|
17
|
+
.inputValidator((input: { id: string; vid: number }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<OkResponse> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return deleteAdminUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
21
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { disableAdminUserCommand, type OkResponse } from '@byline/admin/admin-users'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
// No UI affordance yet — paired with `enable.ts`, both ship ahead of the
|
|
17
|
+
// detail-view enable/disable control they will be wired into. Keep until
|
|
18
|
+
// that control lands; not dead code.
|
|
19
|
+
export const disableAdminUser = createServerFn({ method: 'POST' })
|
|
20
|
+
.inputValidator((input: { id: string }) => input)
|
|
21
|
+
.handler(async ({ data }): Promise<OkResponse> => {
|
|
22
|
+
const context = await getAdminRequestContext()
|
|
23
|
+
return disableAdminUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
24
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { enableAdminUserCommand, type OkResponse } from '@byline/admin/admin-users'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
// No UI affordance yet — paired with `disable.ts`, both ship ahead of the
|
|
17
|
+
// detail-view enable/disable control they will be wired into. Keep until
|
|
18
|
+
// that control lands; not dead code.
|
|
19
|
+
export const enableAdminUser = createServerFn({ method: 'POST' })
|
|
20
|
+
.inputValidator((input: { id: string }) => input)
|
|
21
|
+
.handler(async ({ data }): Promise<OkResponse> => {
|
|
22
|
+
const context = await getAdminRequestContext()
|
|
23
|
+
return enableAdminUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
24
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { getRolesForUserCommand, type UserRolesResponse } from '@byline/admin/admin-roles'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const getUserRoles = createServerFn({ method: 'GET' })
|
|
17
|
+
.inputValidator((input: { userId: string }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<UserRolesResponse> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return getRolesForUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
21
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { createServerFn } from '@tanstack/react-start'
|
|
10
|
+
|
|
11
|
+
import { type AdminUserResponse, getAdminUserCommand } from '@byline/admin/admin-users'
|
|
12
|
+
|
|
13
|
+
import { getAdminRequestContext } from '../../auth/auth-context.js'
|
|
14
|
+
import { bylineCore } from '../../integrations/byline-core.js'
|
|
15
|
+
|
|
16
|
+
export const getAdminUser = createServerFn({ method: 'GET' })
|
|
17
|
+
.inputValidator((input: { id: string }) => input)
|
|
18
|
+
.handler(async ({ data }): Promise<AdminUserResponse> => {
|
|
19
|
+
const context = await getAdminRequestContext()
|
|
20
|
+
return getAdminUserCommand(context, data, { store: bylineCore().adminStore! })
|
|
21
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Admin-users server fns — thin wrappers over the transport-agnostic
|
|
11
|
+
* commands in `@byline/admin/admin-users`. Each fn resolves the admin
|
|
12
|
+
* request context from session cookies, threads in the lazy-initialised
|
|
13
|
+
* `AdminStore`, and lets the command do the heavy lifting. Re-exports
|
|
14
|
+
* the response types so route loaders can type their loader-data
|
|
15
|
+
* without reaching across package boundaries.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export type { UserRolesResponse } from '@byline/admin/admin-roles'
|
|
19
|
+
export type {
|
|
20
|
+
AdminUserListOrder,
|
|
21
|
+
AdminUserListResponse,
|
|
22
|
+
AdminUserResponse,
|
|
23
|
+
OkResponse,
|
|
24
|
+
} from '@byline/admin/admin-users'
|
|
25
|
+
|
|
26
|
+
export { type CreateAdminUserInput, createAdminUser } from './create'
|
|
27
|
+
export { deleteAdminUser } from './delete'
|
|
28
|
+
export { disableAdminUser } from './disable'
|
|
29
|
+
export { enableAdminUser } from './enable'
|
|
30
|
+
export { getAdminUser } from './get'
|
|
31
|
+
export { getUserRoles } from './get-user-roles'
|
|
32
|
+
export { type ListAdminUsersInput, listAdminUsers } from './list'
|
|
33
|
+
export { type SetAdminUserPasswordInput, setAdminUserPassword } from './set-password'
|
|
34
|
+
export { type SetUserRolesInput, setUserRoles } from './set-user-roles'
|
|
35
|
+
export { type UpdateAdminUserInput, updateAdminUser } from './update'
|