@fuzdev/fuz_app 0.54.0 → 0.56.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.
- package/dist/actions/CLAUDE.md +214 -103
- package/dist/actions/action_bridge.d.ts +8 -5
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +1 -11
- package/dist/actions/action_codegen.d.ts +32 -0
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +35 -15
- package/dist/actions/action_registry.d.ts.map +1 -1
- package/dist/actions/action_registry.js +5 -2
- package/dist/actions/action_rpc.d.ts +141 -22
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +106 -187
- package/dist/actions/action_spec.d.ts +55 -16
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +16 -11
- package/dist/actions/action_types.d.ts +28 -60
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +13 -5
- package/dist/actions/broadcast_api.d.ts +2 -2
- package/dist/actions/broadcast_api.js +2 -2
- package/dist/actions/compile_action_registry.d.ts +50 -0
- package/dist/actions/compile_action_registry.d.ts.map +1 -0
- package/dist/actions/compile_action_registry.js +69 -0
- package/dist/actions/heartbeat.d.ts +8 -4
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +5 -4
- package/dist/actions/perform_action.d.ts +145 -0
- package/dist/actions/perform_action.d.ts.map +1 -0
- package/dist/actions/perform_action.js +258 -0
- package/dist/actions/register_action_ws.d.ts +46 -40
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +101 -159
- package/dist/actions/register_ws_endpoint.d.ts +15 -10
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +54 -7
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +0 -4
- package/dist/actions/transports_ws_auth_guard.d.ts +1 -1
- package/dist/actions/transports_ws_auth_guard.js +1 -1
- package/dist/actions/transports_ws_backend.d.ts +1 -1
- package/dist/actions/transports_ws_backend.js +1 -1
- package/dist/auth/CLAUDE.md +794 -410
- package/dist/auth/account_action_specs.d.ts +28 -7
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +7 -7
- package/dist/auth/account_actions.d.ts +7 -13
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +26 -35
- package/dist/auth/account_queries.d.ts +52 -16
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +87 -38
- package/dist/auth/account_routes.d.ts +9 -11
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +118 -46
- package/dist/auth/account_schema.d.ts +46 -35
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +21 -28
- package/dist/auth/admin_action_specs.d.ts +100 -32
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +64 -33
- package/dist/auth/admin_actions.d.ts +13 -19
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +37 -41
- package/dist/auth/audit_emitter.d.ts +160 -0
- package/dist/auth/audit_emitter.d.ts.map +1 -0
- package/dist/auth/audit_emitter.js +83 -0
- package/dist/auth/audit_log_queries.d.ts +17 -48
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +20 -56
- package/dist/auth/audit_log_routes.d.ts +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +7 -3
- package/dist/auth/audit_log_schema.d.ts +92 -32
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +75 -46
- package/dist/auth/auth_guard_resolver.d.ts +44 -0
- package/dist/auth/auth_guard_resolver.d.ts.map +1 -0
- package/dist/auth/auth_guard_resolver.js +56 -0
- package/dist/auth/bearer_auth.d.ts +9 -7
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +13 -21
- package/dist/auth/bootstrap_account.d.ts +7 -7
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +7 -7
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +11 -10
- package/dist/auth/cleanup.d.ts +20 -26
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +33 -42
- package/dist/auth/credential_type_schema.d.ts +115 -0
- package/dist/auth/credential_type_schema.d.ts.map +1 -0
- package/dist/auth/credential_type_schema.js +127 -0
- package/dist/auth/daemon_token_middleware.d.ts +23 -11
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +28 -22
- package/dist/auth/ddl.d.ts +2 -2
- package/dist/auth/ddl.d.ts.map +1 -1
- package/dist/auth/ddl.js +6 -6
- package/dist/auth/deps.d.ts +7 -18
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.d.ts +117 -0
- package/dist/auth/grant_path_schema.d.ts.map +1 -0
- package/dist/auth/grant_path_schema.js +137 -0
- package/dist/auth/invite_queries.d.ts +12 -1
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +12 -1
- package/dist/auth/invite_schema.d.ts +1 -1
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +1 -1
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +9 -4
- package/dist/auth/migrations.d.ts +37 -14
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +79 -32
- package/dist/auth/request_context.d.ts +331 -61
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +378 -95
- package/dist/auth/{permit_offer_action_specs.d.ts → role_grant_offer_action_specs.d.ts} +163 -94
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_action_specs.js +262 -0
- package/dist/auth/role_grant_offer_actions.d.ts +104 -0
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_actions.js +473 -0
- package/dist/auth/{permit_offer_notifications.d.ts → role_grant_offer_notifications.d.ts} +90 -70
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_notifications.js +182 -0
- package/dist/auth/role_grant_offer_queries.d.ts +242 -0
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_queries.js +533 -0
- package/dist/auth/role_grant_offer_schema.d.ts +150 -0
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -0
- package/dist/auth/{permit_offer_schema.js → role_grant_offer_schema.js} +60 -36
- package/dist/auth/role_grant_queries.d.ts +231 -0
- package/dist/auth/role_grant_queries.d.ts.map +1 -0
- package/dist/auth/role_grant_queries.js +320 -0
- package/dist/auth/role_schema.d.ts +150 -40
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +144 -45
- package/dist/auth/scope_kind_schema.d.ts +96 -0
- package/dist/auth/scope_kind_schema.d.ts.map +1 -0
- package/dist/auth/scope_kind_schema.js +94 -0
- package/dist/auth/self_service_role_action_specs.d.ts +6 -1
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +3 -1
- package/dist/auth/self_service_role_actions.d.ts +34 -27
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +68 -48
- package/dist/auth/session_cookie.d.ts +43 -6
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +31 -5
- package/dist/auth/session_middleware.d.ts +37 -3
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +33 -7
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +48 -19
- package/dist/auth/standard_action_specs.d.ts +2 -2
- package/dist/auth/standard_action_specs.js +4 -4
- package/dist/auth/standard_rpc_actions.d.ts +23 -19
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +12 -12
- package/dist/db/migrate.d.ts +12 -8
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +10 -7
- package/dist/dev/setup.d.ts +2 -2
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +9 -7
- package/dist/env/load.d.ts +1 -1
- package/dist/env/load.js +1 -1
- package/dist/hono_context.d.ts +64 -5
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +38 -2
- package/dist/http/CLAUDE.md +264 -87
- package/dist/http/auth_shape.d.ts +191 -0
- package/dist/http/auth_shape.d.ts.map +1 -0
- package/dist/http/auth_shape.js +237 -0
- package/dist/http/common_routes.js +3 -3
- package/dist/http/db_routes.d.ts +4 -0
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +44 -7
- package/dist/http/error_schemas.d.ts +132 -19
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +132 -40
- package/dist/http/jsonrpc_errors.d.ts +27 -2
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +26 -2
- package/dist/http/pending_effects.d.ts +71 -18
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +87 -18
- package/dist/http/proxy.d.ts +52 -5
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +92 -14
- package/dist/http/route_spec.d.ts +113 -41
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +130 -52
- package/dist/http/schema_helpers.d.ts +3 -2
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +9 -2
- package/dist/http/surface.d.ts +2 -1
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +1 -2
- package/dist/http/surface_query.d.ts +39 -35
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +79 -36
- package/dist/primitive_schemas.d.ts +39 -0
- package/dist/primitive_schemas.d.ts.map +1 -0
- package/dist/primitive_schemas.js +40 -0
- package/dist/realtime/sse_auth_guard.d.ts +5 -5
- package/dist/realtime/sse_auth_guard.js +9 -9
- package/dist/runtime/mock.d.ts +1 -1
- package/dist/runtime/mock.js +1 -1
- package/dist/server/app_backend.d.ts +14 -11
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +12 -8
- package/dist/server/app_server.d.ts +7 -7
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +36 -31
- package/dist/server/validate_nginx.d.ts +1 -1
- package/dist/server/validate_nginx.js +1 -1
- package/dist/testing/CLAUDE.md +73 -55
- package/dist/testing/admin_integration.d.ts +5 -6
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +100 -96
- package/dist/testing/adversarial_headers.js +1 -1
- package/dist/testing/app_server.d.ts +11 -14
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +18 -17
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +2 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +15 -9
- package/dist/testing/audit_completeness.d.ts +2 -2
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +53 -39
- package/dist/testing/auth_apps.d.ts +5 -4
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +28 -22
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +5 -5
- package/dist/testing/db.d.ts +1 -1
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +4 -4
- package/dist/testing/db_entities.d.ts +22 -0
- package/dist/testing/db_entities.d.ts.map +1 -0
- package/dist/testing/db_entities.js +28 -0
- package/dist/testing/entities.d.ts +10 -8
- package/dist/testing/entities.d.ts.map +1 -1
- package/dist/testing/entities.js +22 -18
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +13 -14
- package/dist/testing/integration_helpers.d.ts +8 -6
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +29 -23
- package/dist/testing/middleware.d.ts +15 -11
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +75 -32
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +40 -24
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +3 -1
- package/dist/testing/rpc_round_trip.d.ts +1 -1
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +14 -13
- package/dist/testing/sse_round_trip.d.ts +3 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +7 -11
- package/dist/testing/standard.d.ts +1 -1
- package/dist/testing/stubs.d.ts +25 -0
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +43 -2
- package/dist/testing/surface_invariants.d.ts +2 -2
- package/dist/testing/ws_round_trip.d.ts +12 -13
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +24 -12
- package/dist/ui/AdminAccounts.svelte +23 -20
- package/dist/ui/AdminOverview.svelte +15 -13
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/{AdminPermitHistory.svelte → AdminRoleGrantHistory.svelte} +12 -12
- package/dist/ui/AdminRoleGrantHistory.svelte.d.ts +4 -0
- package/dist/ui/AdminRoleGrantHistory.svelte.d.ts.map +1 -0
- package/dist/ui/BootstrapForm.svelte +1 -1
- package/dist/ui/CLAUDE.md +65 -59
- package/dist/ui/{PermitOfferForm.svelte → RoleGrantOfferForm.svelte} +37 -22
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts +20 -0
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -0
- package/dist/ui/{PermitOfferHistory.svelte → RoleGrantOfferHistory.svelte} +12 -12
- package/dist/ui/{PermitOfferHistory.svelte.d.ts → RoleGrantOfferHistory.svelte.d.ts} +4 -4
- package/dist/ui/RoleGrantOfferHistory.svelte.d.ts.map +1 -0
- package/dist/ui/{PermitOfferInbox.svelte → RoleGrantOfferInbox.svelte} +14 -14
- package/dist/ui/{PermitOfferInbox.svelte.d.ts → RoleGrantOfferInbox.svelte.d.ts} +4 -4
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -0
- package/dist/ui/SignupForm.svelte +1 -1
- package/dist/ui/SurfaceExplorer.svelte +35 -15
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts +2 -3
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.js +2 -3
- package/dist/ui/admin_accounts_state.svelte.d.ts +25 -18
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +28 -17
- package/dist/ui/admin_rpc_adapters.d.ts +20 -20
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +17 -17
- package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
- package/dist/ui/admin_sessions_state.svelte.js +2 -2
- package/dist/ui/audit_log_state.svelte.d.ts +7 -7
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +6 -6
- package/dist/ui/auth_state.svelte.d.ts +3 -3
- package/dist/ui/auth_state.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.js +6 -6
- package/dist/ui/format_scope.d.ts +2 -2
- package/dist/ui/format_scope.js +2 -2
- package/dist/ui/{permit_offers_state.svelte.d.ts → role_grant_offers_state.svelte.d.ts} +39 -31
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -0
- package/dist/ui/{permit_offers_state.svelte.js → role_grant_offers_state.svelte.js} +25 -19
- package/dist/ui/ui_format.js +2 -2
- package/package.json +3 -3
- package/dist/auth/permit_offer_action_specs.d.ts.map +0 -1
- package/dist/auth/permit_offer_action_specs.js +0 -227
- package/dist/auth/permit_offer_actions.d.ts +0 -110
- package/dist/auth/permit_offer_actions.d.ts.map +0 -1
- package/dist/auth/permit_offer_actions.js +0 -452
- package/dist/auth/permit_offer_notifications.d.ts.map +0 -1
- package/dist/auth/permit_offer_notifications.js +0 -182
- package/dist/auth/permit_offer_queries.d.ts +0 -183
- package/dist/auth/permit_offer_queries.d.ts.map +0 -1
- package/dist/auth/permit_offer_queries.js +0 -408
- package/dist/auth/permit_offer_schema.d.ts +0 -103
- package/dist/auth/permit_offer_schema.d.ts.map +0 -1
- package/dist/auth/permit_queries.d.ts +0 -210
- package/dist/auth/permit_queries.d.ts.map +0 -1
- package/dist/auth/permit_queries.js +0 -294
- package/dist/auth/require_keeper.d.ts +0 -20
- package/dist/auth/require_keeper.d.ts.map +0 -1
- package/dist/auth/require_keeper.js +0 -35
- package/dist/auth/route_guards.d.ts +0 -21
- package/dist/auth/route_guards.d.ts.map +0 -1
- package/dist/auth/route_guards.js +0 -32
- package/dist/auth/session_lifecycle.d.ts +0 -37
- package/dist/auth/session_lifecycle.d.ts.map +0 -1
- package/dist/auth/session_lifecycle.js +0 -29
- package/dist/ui/AdminPermitHistory.svelte.d.ts +0 -4
- package/dist/ui/AdminPermitHistory.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferForm.svelte.d.ts +0 -14
- package/dist/ui/PermitOfferForm.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferHistory.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferInbox.svelte.d.ts.map +0 -1
- package/dist/ui/permit_offers_state.svelte.d.ts.map +0 -1
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
import type {AppSurface, AppSurfaceRoute, AppSurfaceDiagnostic} from '../http/surface.js';
|
|
14
14
|
import {surface_auth_summary, format_route_key} from '../http/surface_query.js';
|
|
15
|
+
import {
|
|
16
|
+
is_keeper_auth,
|
|
17
|
+
is_plain_authenticated_auth,
|
|
18
|
+
is_public_auth,
|
|
19
|
+
is_role_auth,
|
|
20
|
+
} from '../http/auth_shape.js';
|
|
15
21
|
|
|
16
22
|
const {surface}: {surface: AppSurface} = $props();
|
|
17
23
|
|
|
@@ -22,10 +28,26 @@
|
|
|
22
28
|
|
|
23
29
|
const summary = $derived(surface_auth_summary(surface));
|
|
24
30
|
|
|
31
|
+
const auth_matches_filter = (
|
|
32
|
+
auth: AppSurfaceRoute['auth'],
|
|
33
|
+
filter: (typeof auth_types)[number],
|
|
34
|
+
): boolean => {
|
|
35
|
+
switch (filter) {
|
|
36
|
+
case 'all':
|
|
37
|
+
return true;
|
|
38
|
+
case 'none':
|
|
39
|
+
return is_public_auth(auth);
|
|
40
|
+
case 'authenticated':
|
|
41
|
+
return is_plain_authenticated_auth(auth);
|
|
42
|
+
case 'role':
|
|
43
|
+
return is_role_auth(auth);
|
|
44
|
+
case 'keeper':
|
|
45
|
+
return is_keeper_auth(auth);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
25
49
|
const filtered_routes: Array<AppSurfaceRoute> = $derived(
|
|
26
|
-
|
|
27
|
-
? surface.routes
|
|
28
|
-
: surface.routes.filter((r) => r.auth.type === auth_filter),
|
|
50
|
+
surface.routes.filter((r) => auth_matches_filter(r.auth, auth_filter)),
|
|
29
51
|
);
|
|
30
52
|
|
|
31
53
|
let expanded_event: string | null = $state.raw(null);
|
|
@@ -39,21 +61,19 @@
|
|
|
39
61
|
};
|
|
40
62
|
|
|
41
63
|
const format_auth = (auth: AppSurfaceRoute['auth']): string => {
|
|
42
|
-
if (auth
|
|
43
|
-
return
|
|
64
|
+
if (is_public_auth(auth)) return 'none';
|
|
65
|
+
if (is_keeper_auth(auth)) return 'keeper';
|
|
66
|
+
if (is_role_auth(auth)) return `role:${auth.roles!.join('|')}`;
|
|
67
|
+
if (is_plain_authenticated_auth(auth)) return 'authenticated';
|
|
68
|
+
return 'other';
|
|
44
69
|
};
|
|
45
70
|
|
|
46
71
|
const auth_chip_class = (auth: AppSurfaceRoute['auth']): string => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
case 'role':
|
|
53
|
-
return 'chip color_d';
|
|
54
|
-
case 'keeper':
|
|
55
|
-
return 'chip color_c';
|
|
56
|
-
}
|
|
72
|
+
if (is_public_auth(auth)) return 'chip color_b';
|
|
73
|
+
if (is_keeper_auth(auth)) return 'chip color_c';
|
|
74
|
+
if (is_role_auth(auth)) return 'chip color_d';
|
|
75
|
+
if (is_plain_authenticated_auth(auth)) return 'chip color_a';
|
|
76
|
+
return 'chip';
|
|
57
77
|
};
|
|
58
78
|
|
|
59
79
|
const role_count = $derived(Array.from(summary.role.values()).reduce((sum, n) => sum + n, 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceExplorer.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/SurfaceExplorer.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,UAAU,EAAwC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceExplorer.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/SurfaceExplorer.svelte"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,UAAU,EAAwC,MAAM,oBAAoB,CAAC;AASzF,KAAK,gBAAgB,GAAI;IAAC,OAAO,EAAE,UAAU,CAAA;CAAC,CAAC;AAuShD,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reactive state for managing the authenticated account's auth sessions on a
|
|
3
|
-
* settings page. Reads and mutations flow through a narrow RPC adapter
|
|
4
|
-
*
|
|
5
|
-
* 2026-04-23 RPC migration.
|
|
3
|
+
* settings page. Reads and mutations flow through a narrow RPC adapter
|
|
4
|
+
* backed by `auth/account_actions.ts`.
|
|
6
5
|
*
|
|
7
6
|
* @module
|
|
8
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_sessions_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/account_sessions_state.svelte.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"account_sessions_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/account_sessions_state.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,OAAO,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;KAAC,CAAC,CAAC;IACxD,MAAM,EAAE,CAAC,MAAM,EAAE;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,KAAK,OAAO,CAAC;QAAC,EAAE,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IAChF,UAAU,EAAE,MAAM,OAAO,CAAC;QAAC,EAAE,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CACrD;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;qBAAwB,kBAAkB,GAAG,IAAI;yBAAzB,kBAAkB,GAAG,IAAI,wBAAzB,kBAAkB,GAAG,IAAI;CAEzF,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;CAC1C;AAED,qBAAa,oBAAqB,SAAQ,QAAQ;;IAGjD,QAAQ,EAAE,KAAK,CAAC,eAAe,CAAC,CAAkB;IAElD,QAAQ,CAAC,YAAY,SAAkC;gBAE3C,OAAO,CAAC,EAAE,2BAA2B;IAKjD,6FAA6F;IAC7F,IAAI,OAAO,IAAI,OAAO,CAErB;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAYtB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcjC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAejC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reactive state for managing the authenticated account's auth sessions on a
|
|
3
|
-
* settings page. Reads and mutations flow through a narrow RPC adapter
|
|
4
|
-
*
|
|
5
|
-
* 2026-04-23 RPC migration.
|
|
3
|
+
* settings page. Reads and mutations flow through a narrow RPC adapter
|
|
4
|
+
* backed by `auth/account_actions.ts`.
|
|
6
5
|
*
|
|
7
6
|
* @module
|
|
8
7
|
*/
|
|
@@ -8,18 +8,18 @@ import type { Uuid } from '@fuzdev/fuz_util/id.js';
|
|
|
8
8
|
import { Loadable } from './loadable.svelte.js';
|
|
9
9
|
import type { AdminAccountEntryJson } from '../auth/account_schema.js';
|
|
10
10
|
import type { RoleName } from '../auth/role_schema.js';
|
|
11
|
-
import type {
|
|
11
|
+
import type { RoleGrantOfferJson } from '../auth/role_grant_offer_schema.js';
|
|
12
12
|
import type { AdminAccountListOutput, AdminSessionListOutput, AdminSessionRevokeAllInput, AdminSessionRevokeAllOutput, AdminTokenRevokeAllInput, AdminTokenRevokeAllOutput } from '../auth/admin_action_specs.js';
|
|
13
|
-
import type {
|
|
13
|
+
import type { RoleGrantOfferCreateInput, RoleGrantOfferCreateOutput, RoleGrantOfferOkOutput, RoleGrantRevokeInput, RoleGrantRevokeOutput } from '../auth/role_grant_offer_action_specs.js';
|
|
14
14
|
/**
|
|
15
15
|
* Narrow RPC surface consumed by `AdminAccountsState`. Consumers adapt their
|
|
16
16
|
* typed RPC client (e.g. a `create_rpc_client` Proxy) to this shape — the
|
|
17
17
|
* state class stays decoupled from the client's `Result` return type so
|
|
18
|
-
* tests can inject plain-function stubs. Mirrors the `
|
|
18
|
+
* tests can inject plain-function stubs. Mirrors the `RoleGrantOffersRpc`
|
|
19
19
|
* pattern.
|
|
20
20
|
*
|
|
21
21
|
* Every operation flows through RPC: the listing reuses `admin_account_list`,
|
|
22
|
-
* grant reuses `
|
|
22
|
+
* grant reuses `role_grant_offer_create`, revoke and retract have dedicated
|
|
23
23
|
* actions, and the session / token revoke-all mutations reuse
|
|
24
24
|
* `admin_session_revoke_all` and `admin_token_revoke_all`. Without the
|
|
25
25
|
* adapter the state class cannot fetch, grant, revoke, retract, or
|
|
@@ -33,9 +33,9 @@ import type { PermitOfferCreateInput, PermitOfferCreateOutput, PermitOfferOkOutp
|
|
|
33
33
|
export interface AdminAccountsRpc {
|
|
34
34
|
list_accounts: () => Promise<AdminAccountListOutput>;
|
|
35
35
|
list_sessions: () => Promise<AdminSessionListOutput>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
retract_offer: (offer_id: Uuid) => Promise<
|
|
36
|
+
create_role_grant: (params: RoleGrantOfferCreateInput) => Promise<RoleGrantOfferCreateOutput>;
|
|
37
|
+
revoke_role_grant: (params: RoleGrantRevokeInput) => Promise<RoleGrantRevokeOutput>;
|
|
38
|
+
retract_offer: (offer_id: Uuid) => Promise<RoleGrantOfferOkOutput>;
|
|
39
39
|
session_revoke_all: (params: AdminSessionRevokeAllInput) => Promise<AdminSessionRevokeAllOutput>;
|
|
40
40
|
token_revoke_all: (params: AdminTokenRevokeAllInput) => Promise<AdminTokenRevokeAllOutput>;
|
|
41
41
|
}
|
|
@@ -56,7 +56,7 @@ export declare const admin_accounts_rpc_context: {
|
|
|
56
56
|
export interface AdminAccountsStateOptions {
|
|
57
57
|
/**
|
|
58
58
|
* Reactive accessor for the RPC adapter; returns `null` when unwired.
|
|
59
|
-
* Matches `
|
|
59
|
+
* Matches `RoleGrantOffersStateOptions.account_id` / `actor_id` pattern —
|
|
60
60
|
* lets the component pass a `$props()`-sourced rpc without tripping
|
|
61
61
|
* Svelte's `state_referenced_locally` warning.
|
|
62
62
|
*/
|
|
@@ -78,33 +78,40 @@ export declare class AdminAccountsState extends Loadable {
|
|
|
78
78
|
get has_rpc(): boolean;
|
|
79
79
|
fetch(): Promise<void>;
|
|
80
80
|
/**
|
|
81
|
-
* Offer the role to the recipient via the `
|
|
81
|
+
* Offer the role to the recipient via the `role_grant_offer_create` RPC.
|
|
82
82
|
* Server returns the pending offer; the recipient must accept before
|
|
83
|
-
* the
|
|
84
|
-
* callers can drive follow-up UX (e.g. seed `
|
|
83
|
+
* the role_grant materializes. Returns the offer payload on success so
|
|
84
|
+
* callers can drive follow-up UX (e.g. seed `RoleGrantOffersState.outgoing`).
|
|
85
85
|
*
|
|
86
86
|
* A re-offer from the same admin to the same `(account, role)`
|
|
87
87
|
* refreshes the existing pending row — the returned offer id is stable
|
|
88
88
|
* across those calls.
|
|
89
89
|
*
|
|
90
|
+
* `to_actor_id` (optional) narrows the offer to a specific actor on
|
|
91
|
+
* `account_id`; the in-flight `granting_keys` entry stays at
|
|
92
|
+
* `account_id:role` for the account-grain default (so existing
|
|
93
|
+
* consumers reading the 2-segment key keep working) and becomes
|
|
94
|
+
* `account_id:role:to_actor_id` when actor-targeted, so the two
|
|
95
|
+
* variants can be in flight without colliding on the per-row spinner.
|
|
96
|
+
*
|
|
90
97
|
* No-op when the rpc adapter is absent; `error` is set to a descriptive
|
|
91
98
|
* message so the UI surfaces the misconfiguration.
|
|
92
99
|
*/
|
|
93
|
-
|
|
100
|
+
create_role_grant(account_id: Uuid, role: RoleName, to_actor_id?: Uuid | null): Promise<RoleGrantOfferJson | undefined>;
|
|
94
101
|
/**
|
|
95
|
-
* Revoke an active
|
|
102
|
+
* Revoke an active role_grant via the `role_grant_revoke` RPC.
|
|
96
103
|
*
|
|
97
|
-
* `actor_id` is the natural key —
|
|
104
|
+
* `actor_id` is the natural key — role_grants are actor-scoped, and the
|
|
98
105
|
* admin UI reads `row.actor.id` straight from the listing, so the state
|
|
99
106
|
* class takes it directly rather than deriving it from `account_id`.
|
|
100
|
-
* The optional `reason` is stamped on `
|
|
107
|
+
* The optional `reason` is stamped on `role_grant.revoked_reason` and
|
|
101
108
|
* surfaced on the revokee's WS notification.
|
|
102
109
|
*/
|
|
103
|
-
|
|
110
|
+
revoke_role_grant(actor_id: Uuid, role_grant_id: Uuid, reason?: string | null): Promise<void>;
|
|
104
111
|
/**
|
|
105
|
-
* Retract a pending offer the admin issued via the `
|
|
112
|
+
* Retract a pending offer the admin issued via the `role_grant_offer_retract`
|
|
106
113
|
* RPC. The action handles auth, audit, and the
|
|
107
|
-
* `
|
|
114
|
+
* `role_grant_offer_retracted` WS notification.
|
|
108
115
|
*
|
|
109
116
|
* After success, refetches the listing so `pending_offers` drops the
|
|
110
117
|
* row and the "+ {role}" button un-hides.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin_accounts_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/admin_accounts_state.svelte.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,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pB,OAAO,CAAC,IAAI,CAAC;IAkBhB;;;;;;;OAOG;IACG,aAAa,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBlD"}
|
|
@@ -49,34 +49,45 @@ export class AdminAccountsState extends Loadable {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Offer the role to the recipient via the `
|
|
52
|
+
* Offer the role to the recipient via the `role_grant_offer_create` RPC.
|
|
53
53
|
* Server returns the pending offer; the recipient must accept before
|
|
54
|
-
* the
|
|
55
|
-
* callers can drive follow-up UX (e.g. seed `
|
|
54
|
+
* the role_grant materializes. Returns the offer payload on success so
|
|
55
|
+
* callers can drive follow-up UX (e.g. seed `RoleGrantOffersState.outgoing`).
|
|
56
56
|
*
|
|
57
57
|
* A re-offer from the same admin to the same `(account, role)`
|
|
58
58
|
* refreshes the existing pending row — the returned offer id is stable
|
|
59
59
|
* across those calls.
|
|
60
60
|
*
|
|
61
|
+
* `to_actor_id` (optional) narrows the offer to a specific actor on
|
|
62
|
+
* `account_id`; the in-flight `granting_keys` entry stays at
|
|
63
|
+
* `account_id:role` for the account-grain default (so existing
|
|
64
|
+
* consumers reading the 2-segment key keep working) and becomes
|
|
65
|
+
* `account_id:role:to_actor_id` when actor-targeted, so the two
|
|
66
|
+
* variants can be in flight without colliding on the per-row spinner.
|
|
67
|
+
*
|
|
61
68
|
* No-op when the rpc adapter is absent; `error` is set to a descriptive
|
|
62
69
|
* message so the UI surfaces the misconfiguration.
|
|
63
70
|
*/
|
|
64
|
-
async
|
|
71
|
+
async create_role_grant(account_id, role, to_actor_id) {
|
|
65
72
|
const rpc = this.#get_rpc();
|
|
66
73
|
if (!rpc) {
|
|
67
74
|
this.error = 'rpc adapter not wired';
|
|
68
75
|
return undefined;
|
|
69
76
|
}
|
|
70
|
-
const key = `${account_id}:${role}`;
|
|
77
|
+
const key = to_actor_id ? `${account_id}:${role}:${to_actor_id}` : `${account_id}:${role}`;
|
|
71
78
|
this.granting_keys.add(key);
|
|
72
79
|
try {
|
|
73
|
-
const { offer } = await rpc.
|
|
80
|
+
const { offer } = await rpc.create_role_grant({
|
|
81
|
+
to_account_id: account_id,
|
|
82
|
+
role,
|
|
83
|
+
...(to_actor_id ? { to_actor_id } : {}),
|
|
84
|
+
});
|
|
74
85
|
this.error = null;
|
|
75
86
|
await this.fetch();
|
|
76
87
|
return offer;
|
|
77
88
|
}
|
|
78
89
|
catch (e) {
|
|
79
|
-
this.error = e instanceof Error ? e.message : 'Failed to grant
|
|
90
|
+
this.error = e instanceof Error ? e.message : 'Failed to grant role_grant';
|
|
80
91
|
return undefined;
|
|
81
92
|
}
|
|
82
93
|
finally {
|
|
@@ -84,37 +95,37 @@ export class AdminAccountsState extends Loadable {
|
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
97
|
/**
|
|
87
|
-
* Revoke an active
|
|
98
|
+
* Revoke an active role_grant via the `role_grant_revoke` RPC.
|
|
88
99
|
*
|
|
89
|
-
* `actor_id` is the natural key —
|
|
100
|
+
* `actor_id` is the natural key — role_grants are actor-scoped, and the
|
|
90
101
|
* admin UI reads `row.actor.id` straight from the listing, so the state
|
|
91
102
|
* class takes it directly rather than deriving it from `account_id`.
|
|
92
|
-
* The optional `reason` is stamped on `
|
|
103
|
+
* The optional `reason` is stamped on `role_grant.revoked_reason` and
|
|
93
104
|
* surfaced on the revokee's WS notification.
|
|
94
105
|
*/
|
|
95
|
-
async
|
|
106
|
+
async revoke_role_grant(actor_id, role_grant_id, reason) {
|
|
96
107
|
const rpc = this.#get_rpc();
|
|
97
108
|
if (!rpc) {
|
|
98
109
|
this.error = 'rpc adapter not wired';
|
|
99
110
|
return;
|
|
100
111
|
}
|
|
101
|
-
this.revoking_ids.add(
|
|
112
|
+
this.revoking_ids.add(role_grant_id);
|
|
102
113
|
try {
|
|
103
|
-
await rpc.
|
|
114
|
+
await rpc.revoke_role_grant({ actor_id, role_grant_id, reason: reason ?? null });
|
|
104
115
|
this.error = null;
|
|
105
116
|
await this.fetch();
|
|
106
117
|
}
|
|
107
118
|
catch (e) {
|
|
108
|
-
this.error = e instanceof Error ? e.message : 'Failed to revoke
|
|
119
|
+
this.error = e instanceof Error ? e.message : 'Failed to revoke role_grant';
|
|
109
120
|
}
|
|
110
121
|
finally {
|
|
111
|
-
this.revoking_ids.delete(
|
|
122
|
+
this.revoking_ids.delete(role_grant_id);
|
|
112
123
|
}
|
|
113
124
|
}
|
|
114
125
|
/**
|
|
115
|
-
* Retract a pending offer the admin issued via the `
|
|
126
|
+
* Retract a pending offer the admin issued via the `role_grant_offer_retract`
|
|
116
127
|
* RPC. The action handles auth, audit, and the
|
|
117
|
-
* `
|
|
128
|
+
* `role_grant_offer_retracted` WS notification.
|
|
118
129
|
*
|
|
119
130
|
* After success, refetches the listing so `pending_offers` drops the
|
|
120
131
|
* row and the "+ {role}" button un-hides.
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* admin shell layout wire everything.
|
|
8
8
|
*
|
|
9
9
|
* Intentionally admin-only despite the backend-side
|
|
10
|
-
* `create_standard_rpc_actions` rename (admin +
|
|
10
|
+
* `create_standard_rpc_actions` rename (admin + role-grant-offer + account).
|
|
11
11
|
* Account-surface methods flow through `account_sessions_rpc_context`
|
|
12
|
-
* (wired at the self-service layout), and
|
|
13
|
-
* surface in the admin UI (`
|
|
14
|
-
* `
|
|
12
|
+
* (wired at the self-service layout), and role-grant-offer methods that
|
|
13
|
+
* surface in the admin UI (`role_grant_offer_create`, `role_grant_revoke`,
|
|
14
|
+
* `role_grant_offer_retract`) live inside the `AdminAccountsRpc` interface —
|
|
15
15
|
* they belong to the admin UX, not a separate wire pairing. The UI side
|
|
16
16
|
* and backend factory names diverge by design.
|
|
17
17
|
*
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* The throwing Proxy spreads the JSON-RPC `{code, message, data?}` onto
|
|
24
|
-
* the thrown `Error` so form components (e.g. `ui/
|
|
25
|
-
* can match on `error.data?.reason` via `
|
|
24
|
+
* the thrown `Error` so form components (e.g. `ui/RoleGrantOfferForm.svelte`)
|
|
25
|
+
* can match on `error.data?.reason` via `ERROR_ROLE_GRANT_OFFER_*` constants —
|
|
26
26
|
* optional chaining is required because JSON-RPC `data` is spec-level
|
|
27
27
|
* optional. Consumers that need a custom unwrap strategy can construct
|
|
28
28
|
* their own object satisfying `AdminRpcApi` and pass it directly.
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
*
|
|
33
33
|
* @module
|
|
34
34
|
*/
|
|
35
|
-
import type { AdminAccountListOutput, AdminSessionListOutput, AdminSessionRevokeAllInput, AdminSessionRevokeAllOutput, AdminTokenRevokeAllInput, AdminTokenRevokeAllOutput, AuditLogListInput, AuditLogListOutput,
|
|
36
|
-
import type {
|
|
35
|
+
import type { AdminAccountListOutput, AdminSessionListOutput, AdminSessionRevokeAllInput, AdminSessionRevokeAllOutput, AdminTokenRevokeAllInput, AdminTokenRevokeAllOutput, AuditLogListInput, AuditLogListOutput, AuditLogRoleGrantHistoryInput, AuditLogRoleGrantHistoryOutput, InviteCreateInput, InviteCreateOutput, InviteDeleteInput, InviteDeleteOutput, InviteListOutput, AppSettingsGetOutput, AppSettingsUpdateInput, AppSettingsUpdateOutput } from '../auth/admin_action_specs.js';
|
|
36
|
+
import type { RoleGrantOfferCreateInput, RoleGrantOfferCreateOutput, RoleGrantOfferRetractInput, RoleGrantOfferOkOutput, RoleGrantRevokeInput, RoleGrantRevokeOutput } from '../auth/role_grant_offer_action_specs.js';
|
|
37
37
|
import { type AdminAccountsRpc } from './admin_accounts_state.svelte.js';
|
|
38
38
|
import { type AdminInvitesRpc } from './admin_invites_state.svelte.js';
|
|
39
39
|
import { type AuditLogRpc } from './audit_log_state.svelte.js';
|
|
@@ -56,15 +56,15 @@ export interface AdminRpcApi {
|
|
|
56
56
|
admin_session_revoke_all: (input: AdminSessionRevokeAllInput) => Promise<AdminSessionRevokeAllOutput>;
|
|
57
57
|
admin_token_revoke_all: (input: AdminTokenRevokeAllInput) => Promise<AdminTokenRevokeAllOutput>;
|
|
58
58
|
audit_log_list: (input: AuditLogListInput) => Promise<AuditLogListOutput>;
|
|
59
|
-
|
|
59
|
+
audit_log_role_grant_history: (input: AuditLogRoleGrantHistoryInput) => Promise<AuditLogRoleGrantHistoryOutput>;
|
|
60
60
|
invite_list: () => Promise<InviteListOutput>;
|
|
61
61
|
invite_create: (input: InviteCreateInput) => Promise<InviteCreateOutput>;
|
|
62
62
|
invite_delete: (input: InviteDeleteInput) => Promise<InviteDeleteOutput>;
|
|
63
63
|
app_settings_get: () => Promise<AppSettingsGetOutput>;
|
|
64
64
|
app_settings_update: (input: AppSettingsUpdateInput) => Promise<AppSettingsUpdateOutput>;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
role_grant_offer_create: (input: RoleGrantOfferCreateInput) => Promise<RoleGrantOfferCreateOutput>;
|
|
66
|
+
role_grant_offer_retract: (input: RoleGrantOfferRetractInput) => Promise<RoleGrantOfferOkOutput>;
|
|
67
|
+
role_grant_revoke: (input: RoleGrantRevokeInput) => Promise<RoleGrantRevokeOutput>;
|
|
68
68
|
}
|
|
69
69
|
/** The four admin RPC adapters assembled from a shared `api`. */
|
|
70
70
|
export interface AdminRpcAdapters {
|
|
@@ -82,16 +82,16 @@ export interface AdminRpcAdapters {
|
|
|
82
82
|
* | ----------------------------------- | ---------------------------- |
|
|
83
83
|
* | `admin_accounts.list_accounts` | `admin_account_list` |
|
|
84
84
|
* | `admin_accounts.list_sessions` | `admin_session_list` |
|
|
85
|
-
* | `admin_accounts.
|
|
86
|
-
* | `admin_accounts.
|
|
87
|
-
* | `admin_accounts.retract_offer` | `
|
|
85
|
+
* | `admin_accounts.create_role_grant` | `role_grant_offer_create` |
|
|
86
|
+
* | `admin_accounts.revoke_role_grant` | `role_grant_revoke` |
|
|
87
|
+
* | `admin_accounts.retract_offer` | `role_grant_offer_retract` |
|
|
88
88
|
* | `admin_accounts.session_revoke_all` | `admin_session_revoke_all` |
|
|
89
89
|
* | `admin_accounts.token_revoke_all` | `admin_token_revoke_all` |
|
|
90
90
|
* | `admin_invites.list` | `invite_list` |
|
|
91
91
|
* | `admin_invites.create` | `invite_create` |
|
|
92
92
|
* | `admin_invites.delete` | `invite_delete` |
|
|
93
93
|
* | `audit_log.list` | `audit_log_list` |
|
|
94
|
-
* | `audit_log.
|
|
94
|
+
* | `audit_log.role_grant_history` | `audit_log_role_grant_history` |
|
|
95
95
|
* | `app_settings.get` | `app_settings_get` |
|
|
96
96
|
* | `app_settings.update` | `app_settings_update` |
|
|
97
97
|
*
|
|
@@ -103,7 +103,7 @@ export declare const create_admin_rpc_adapters: (api: AdminRpcApi) => AdminRpcAd
|
|
|
103
103
|
/** Optional knobs alongside the adapters when wiring admin contexts. */
|
|
104
104
|
export interface ProvideAdminRpcContextsOptions {
|
|
105
105
|
/**
|
|
106
|
-
* Render `{scope_id, role}` as a human label across
|
|
106
|
+
* Render `{scope_id, role}` as a human label across role-grant-display
|
|
107
107
|
* components. Omit (or return `null`) to fall back to the raw uuid.
|
|
108
108
|
*/
|
|
109
109
|
format_scope?: FormatScope;
|
|
@@ -120,9 +120,9 @@ export interface ProvideAdminRpcContextsOptions {
|
|
|
120
120
|
* whole adapter set requires calling `provide_admin_rpc_contexts` again
|
|
121
121
|
* during init — in practice this is one-shot at layout mount.
|
|
122
122
|
*
|
|
123
|
-
* Pass `options.format_scope` to render
|
|
124
|
-
* human labels across `AdminAccounts`, `
|
|
125
|
-
* `
|
|
123
|
+
* Pass `options.format_scope` to render role_grant/offer `scope_id` values as
|
|
124
|
+
* human labels across `AdminAccounts`, `AdminRoleGrantHistory`,
|
|
125
|
+
* `RoleGrantOfferInbox`, `RoleGrantOfferForm`, and `RoleGrantOfferHistory`.
|
|
126
126
|
* Components that accept a `format_scope` prop honor the prop first; the
|
|
127
127
|
* context is the fallback.
|
|
128
128
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin_rpc_adapters.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/admin_rpc_adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EACX,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"admin_rpc_adapters.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/admin_rpc_adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EACX,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,6BAA6B,EAC7B,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACX,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAA6B,KAAK,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAA4B,KAAK,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAwB,KAAK,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAA2B,KAAK,cAAc,EAAC,MAAM,gCAAgC,CAAC;AAC7F,OAAO,EAAuB,KAAK,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,MAAM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,WAAW,CAAC;IACvB,YAAY,EAAE,cAAc,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,WAAW,KAAG,gBAuB3D,CAAC;AAEH,wEAAwE;AACxE,MAAM,WAAW,8BAA8B;IAC9C;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,GACtC,UAAU,gBAAgB,EAC1B,UAAU,8BAA8B,KACtC,IASF,CAAC"}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* admin shell layout wire everything.
|
|
8
8
|
*
|
|
9
9
|
* Intentionally admin-only despite the backend-side
|
|
10
|
-
* `create_standard_rpc_actions` rename (admin +
|
|
10
|
+
* `create_standard_rpc_actions` rename (admin + role-grant-offer + account).
|
|
11
11
|
* Account-surface methods flow through `account_sessions_rpc_context`
|
|
12
|
-
* (wired at the self-service layout), and
|
|
13
|
-
* surface in the admin UI (`
|
|
14
|
-
* `
|
|
12
|
+
* (wired at the self-service layout), and role-grant-offer methods that
|
|
13
|
+
* surface in the admin UI (`role_grant_offer_create`, `role_grant_revoke`,
|
|
14
|
+
* `role_grant_offer_retract`) live inside the `AdminAccountsRpc` interface —
|
|
15
15
|
* they belong to the admin UX, not a separate wire pairing. The UI side
|
|
16
16
|
* and backend factory names diverge by design.
|
|
17
17
|
*
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* The throwing Proxy spreads the JSON-RPC `{code, message, data?}` onto
|
|
24
|
-
* the thrown `Error` so form components (e.g. `ui/
|
|
25
|
-
* can match on `error.data?.reason` via `
|
|
24
|
+
* the thrown `Error` so form components (e.g. `ui/RoleGrantOfferForm.svelte`)
|
|
25
|
+
* can match on `error.data?.reason` via `ERROR_ROLE_GRANT_OFFER_*` constants —
|
|
26
26
|
* optional chaining is required because JSON-RPC `data` is spec-level
|
|
27
27
|
* optional. Consumers that need a custom unwrap strategy can construct
|
|
28
28
|
* their own object satisfying `AdminRpcApi` and pass it directly.
|
|
@@ -46,16 +46,16 @@ import { format_scope_context } from './format_scope.js';
|
|
|
46
46
|
* | ----------------------------------- | ---------------------------- |
|
|
47
47
|
* | `admin_accounts.list_accounts` | `admin_account_list` |
|
|
48
48
|
* | `admin_accounts.list_sessions` | `admin_session_list` |
|
|
49
|
-
* | `admin_accounts.
|
|
50
|
-
* | `admin_accounts.
|
|
51
|
-
* | `admin_accounts.retract_offer` | `
|
|
49
|
+
* | `admin_accounts.create_role_grant` | `role_grant_offer_create` |
|
|
50
|
+
* | `admin_accounts.revoke_role_grant` | `role_grant_revoke` |
|
|
51
|
+
* | `admin_accounts.retract_offer` | `role_grant_offer_retract` |
|
|
52
52
|
* | `admin_accounts.session_revoke_all` | `admin_session_revoke_all` |
|
|
53
53
|
* | `admin_accounts.token_revoke_all` | `admin_token_revoke_all` |
|
|
54
54
|
* | `admin_invites.list` | `invite_list` |
|
|
55
55
|
* | `admin_invites.create` | `invite_create` |
|
|
56
56
|
* | `admin_invites.delete` | `invite_delete` |
|
|
57
57
|
* | `audit_log.list` | `audit_log_list` |
|
|
58
|
-
* | `audit_log.
|
|
58
|
+
* | `audit_log.role_grant_history` | `audit_log_role_grant_history` |
|
|
59
59
|
* | `app_settings.get` | `app_settings_get` |
|
|
60
60
|
* | `app_settings.update` | `app_settings_update` |
|
|
61
61
|
*
|
|
@@ -67,9 +67,9 @@ export const create_admin_rpc_adapters = (api) => ({
|
|
|
67
67
|
admin_accounts: {
|
|
68
68
|
list_accounts: () => api.admin_account_list(),
|
|
69
69
|
list_sessions: () => api.admin_session_list(),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
retract_offer: (offer_id) => api.
|
|
70
|
+
create_role_grant: (params) => api.role_grant_offer_create(params),
|
|
71
|
+
revoke_role_grant: (params) => api.role_grant_revoke(params),
|
|
72
|
+
retract_offer: (offer_id) => api.role_grant_offer_retract({ offer_id }),
|
|
73
73
|
session_revoke_all: (params) => api.admin_session_revoke_all(params),
|
|
74
74
|
token_revoke_all: (params) => api.admin_token_revoke_all(params),
|
|
75
75
|
},
|
|
@@ -80,7 +80,7 @@ export const create_admin_rpc_adapters = (api) => ({
|
|
|
80
80
|
},
|
|
81
81
|
audit_log: {
|
|
82
82
|
list: (options) => api.audit_log_list(options ?? {}),
|
|
83
|
-
|
|
83
|
+
role_grant_history: (params) => api.audit_log_role_grant_history(params ?? {}),
|
|
84
84
|
},
|
|
85
85
|
app_settings: {
|
|
86
86
|
get: () => api.app_settings_get(),
|
|
@@ -99,9 +99,9 @@ export const create_admin_rpc_adapters = (api) => ({
|
|
|
99
99
|
* whole adapter set requires calling `provide_admin_rpc_contexts` again
|
|
100
100
|
* during init — in practice this is one-shot at layout mount.
|
|
101
101
|
*
|
|
102
|
-
* Pass `options.format_scope` to render
|
|
103
|
-
* human labels across `AdminAccounts`, `
|
|
104
|
-
* `
|
|
102
|
+
* Pass `options.format_scope` to render role_grant/offer `scope_id` values as
|
|
103
|
+
* human labels across `AdminAccounts`, `AdminRoleGrantHistory`,
|
|
104
|
+
* `RoleGrantOfferInbox`, `RoleGrantOfferForm`, and `RoleGrantOfferHistory`.
|
|
105
105
|
* Components that accept a `format_scope` prop honor the prop first; the
|
|
106
106
|
* context is the fallback.
|
|
107
107
|
*/
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Both the listing and the two revoke-all mutations flow through the shared
|
|
5
5
|
* `AdminAccountsRpc` adapter (`list_sessions`, `session_revoke_all`,
|
|
6
|
-
* `token_revoke_all`)
|
|
7
|
-
*
|
|
6
|
+
* `token_revoke_all`); the listing wraps the `admin_session_list` RPC
|
|
7
|
+
* method.
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Both the listing and the two revoke-all mutations flow through the shared
|
|
5
5
|
* `AdminAccountsRpc` adapter (`list_sessions`, `session_revoke_all`,
|
|
6
|
-
* `token_revoke_all`)
|
|
7
|
-
*
|
|
6
|
+
* `token_revoke_all`); the listing wraps the `admin_session_list` RPC
|
|
7
|
+
* method.
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reactive state for the audit log viewer.
|
|
3
3
|
*
|
|
4
|
-
* Two fetch primitives (`fetch` for events, `
|
|
4
|
+
* Two fetch primitives (`fetch` for events, `fetch_role_grant_history` for the
|
|
5
5
|
* grant/revoke shortcut) flow through an injected RPC adapter; the SSE
|
|
6
6
|
* stream continues to use `EventSource` directly — streams aren't an RPC
|
|
7
7
|
* concern.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
11
|
import { Loadable } from './loadable.svelte.js';
|
|
12
|
-
import type { AuditLogEventWithUsernamesJson,
|
|
13
|
-
import type { AuditLogListInput, AuditLogListOutput,
|
|
12
|
+
import type { AuditLogEventWithUsernamesJson, RoleGrantHistoryEventJson } from '../auth/audit_log_schema.js';
|
|
13
|
+
import type { AuditLogListInput, AuditLogListOutput, AuditLogRoleGrantHistoryInput, AuditLogRoleGrantHistoryOutput } from '../auth/admin_action_specs.js';
|
|
14
14
|
/**
|
|
15
15
|
* Narrow RPC surface consumed by `AuditLogState`. Consumers adapt their typed
|
|
16
16
|
* RPC client to this shape. Mirrors `AdminAccountsRpc` / `AdminInvitesRpc`.
|
|
@@ -19,7 +19,7 @@ import type { AuditLogListInput, AuditLogListOutput, AuditLogPermitHistoryInput,
|
|
|
19
19
|
*/
|
|
20
20
|
export interface AuditLogRpc {
|
|
21
21
|
list: (input?: AuditLogListInput) => Promise<AuditLogListOutput>;
|
|
22
|
-
|
|
22
|
+
role_grant_history: (input?: AuditLogRoleGrantHistoryInput) => Promise<AuditLogRoleGrantHistoryOutput>;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Svelte context carrying the reactive `AuditLogRpc` accessor. Mirrors
|
|
@@ -41,15 +41,15 @@ export interface AuditLogStateOptions {
|
|
|
41
41
|
export declare class AuditLogState extends Loadable {
|
|
42
42
|
#private;
|
|
43
43
|
events: Array<AuditLogEventWithUsernamesJson>;
|
|
44
|
-
|
|
44
|
+
role_grant_history_events: Array<RoleGrantHistoryEventJson>;
|
|
45
45
|
readonly count: number;
|
|
46
46
|
/** Whether the SSE stream is currently connected. */
|
|
47
47
|
connected: boolean;
|
|
48
48
|
constructor(options?: AuditLogStateOptions);
|
|
49
|
-
/** True when an RPC adapter is wired. `fetch`/`
|
|
49
|
+
/** True when an RPC adapter is wired. `fetch`/`fetch_role_grant_history` no-op without it. */
|
|
50
50
|
get has_rpc(): boolean;
|
|
51
51
|
fetch(options?: AuditLogListInput): Promise<void>;
|
|
52
|
-
|
|
52
|
+
fetch_role_grant_history(limit?: number, offset?: number): Promise<void>;
|
|
53
53
|
/**
|
|
54
54
|
* Connect to the SSE stream for realtime audit events.
|
|
55
55
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit_log_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/audit_log_state.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAEX,8BAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"audit_log_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/ui/audit_log_state.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAEX,8BAA8B,EAC9B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACX,iBAAiB,EACj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