@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
|
@@ -90,7 +90,10 @@ export declare const account_verify_action_spec: {
|
|
|
90
90
|
method: string;
|
|
91
91
|
kind: "request_response";
|
|
92
92
|
initiator: "frontend";
|
|
93
|
-
auth:
|
|
93
|
+
auth: {
|
|
94
|
+
account: "required";
|
|
95
|
+
actor: "none";
|
|
96
|
+
};
|
|
94
97
|
side_effects: false;
|
|
95
98
|
input: z.ZodVoid;
|
|
96
99
|
output: z.ZodObject<{
|
|
@@ -107,7 +110,10 @@ export declare const account_session_list_action_spec: {
|
|
|
107
110
|
method: string;
|
|
108
111
|
kind: "request_response";
|
|
109
112
|
initiator: "frontend";
|
|
110
|
-
auth:
|
|
113
|
+
auth: {
|
|
114
|
+
account: "required";
|
|
115
|
+
actor: "none";
|
|
116
|
+
};
|
|
111
117
|
side_effects: false;
|
|
112
118
|
input: z.ZodVoid;
|
|
113
119
|
output: z.ZodObject<{
|
|
@@ -126,7 +132,10 @@ export declare const account_session_revoke_action_spec: {
|
|
|
126
132
|
method: string;
|
|
127
133
|
kind: "request_response";
|
|
128
134
|
initiator: "frontend";
|
|
129
|
-
auth:
|
|
135
|
+
auth: {
|
|
136
|
+
account: "required";
|
|
137
|
+
actor: "none";
|
|
138
|
+
};
|
|
130
139
|
side_effects: true;
|
|
131
140
|
input: z.ZodObject<{
|
|
132
141
|
session_id: z.ZodString;
|
|
@@ -142,7 +151,10 @@ export declare const account_session_revoke_all_action_spec: {
|
|
|
142
151
|
method: string;
|
|
143
152
|
kind: "request_response";
|
|
144
153
|
initiator: "frontend";
|
|
145
|
-
auth:
|
|
154
|
+
auth: {
|
|
155
|
+
account: "required";
|
|
156
|
+
actor: "none";
|
|
157
|
+
};
|
|
146
158
|
side_effects: true;
|
|
147
159
|
input: z.ZodVoid;
|
|
148
160
|
output: z.ZodObject<{
|
|
@@ -156,7 +168,10 @@ export declare const account_token_create_action_spec: {
|
|
|
156
168
|
method: string;
|
|
157
169
|
kind: "request_response";
|
|
158
170
|
initiator: "frontend";
|
|
159
|
-
auth:
|
|
171
|
+
auth: {
|
|
172
|
+
account: "required";
|
|
173
|
+
actor: "none";
|
|
174
|
+
};
|
|
160
175
|
side_effects: true;
|
|
161
176
|
input: z.ZodObject<{
|
|
162
177
|
name: z.ZodDefault<z.ZodString>;
|
|
@@ -174,7 +189,10 @@ export declare const account_token_list_action_spec: {
|
|
|
174
189
|
method: string;
|
|
175
190
|
kind: "request_response";
|
|
176
191
|
initiator: "frontend";
|
|
177
|
-
auth:
|
|
192
|
+
auth: {
|
|
193
|
+
account: "required";
|
|
194
|
+
actor: "none";
|
|
195
|
+
};
|
|
178
196
|
side_effects: false;
|
|
179
197
|
input: z.ZodVoid;
|
|
180
198
|
output: z.ZodObject<{
|
|
@@ -195,7 +213,10 @@ export declare const account_token_revoke_action_spec: {
|
|
|
195
213
|
method: string;
|
|
196
214
|
kind: "request_response";
|
|
197
215
|
initiator: "frontend";
|
|
198
|
-
auth:
|
|
216
|
+
auth: {
|
|
217
|
+
account: "required";
|
|
218
|
+
actor: "none";
|
|
219
|
+
};
|
|
199
220
|
side_effects: true;
|
|
200
221
|
input: z.ZodObject<{
|
|
201
222
|
token_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAMzE,6EAA6E;AAC7E,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,MAAM,MAAM,g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AM,0BAA0B;;;;;;;;;;;;;;;;;;;CAUF,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;CAUR,CAAC;AAEtC,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;CAUV,CAAC;AAEtC,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;CAUd,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;CAUR,CAAC;AAEtC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;CAUN,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;CAUR,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,yBAAyB,CAQrE,CAAC"}
|
|
@@ -70,7 +70,7 @@ export const account_verify_action_spec = {
|
|
|
70
70
|
method: 'account_verify',
|
|
71
71
|
kind: 'request_response',
|
|
72
72
|
initiator: 'frontend',
|
|
73
|
-
auth: '
|
|
73
|
+
auth: { account: 'required', actor: 'none' },
|
|
74
74
|
side_effects: false,
|
|
75
75
|
input: VerifyInput,
|
|
76
76
|
output: SessionAccountJson,
|
|
@@ -81,7 +81,7 @@ export const account_session_list_action_spec = {
|
|
|
81
81
|
method: 'account_session_list',
|
|
82
82
|
kind: 'request_response',
|
|
83
83
|
initiator: 'frontend',
|
|
84
|
-
auth: '
|
|
84
|
+
auth: { account: 'required', actor: 'none' },
|
|
85
85
|
side_effects: false,
|
|
86
86
|
input: SessionListInput,
|
|
87
87
|
output: SessionListOutput,
|
|
@@ -92,7 +92,7 @@ export const account_session_revoke_action_spec = {
|
|
|
92
92
|
method: 'account_session_revoke',
|
|
93
93
|
kind: 'request_response',
|
|
94
94
|
initiator: 'frontend',
|
|
95
|
-
auth: '
|
|
95
|
+
auth: { account: 'required', actor: 'none' },
|
|
96
96
|
side_effects: true,
|
|
97
97
|
input: SessionRevokeInput,
|
|
98
98
|
output: SessionRevokeOutput,
|
|
@@ -103,7 +103,7 @@ export const account_session_revoke_all_action_spec = {
|
|
|
103
103
|
method: 'account_session_revoke_all',
|
|
104
104
|
kind: 'request_response',
|
|
105
105
|
initiator: 'frontend',
|
|
106
|
-
auth: '
|
|
106
|
+
auth: { account: 'required', actor: 'none' },
|
|
107
107
|
side_effects: true,
|
|
108
108
|
input: SessionRevokeAllInput,
|
|
109
109
|
output: SessionRevokeAllOutput,
|
|
@@ -114,7 +114,7 @@ export const account_token_create_action_spec = {
|
|
|
114
114
|
method: 'account_token_create',
|
|
115
115
|
kind: 'request_response',
|
|
116
116
|
initiator: 'frontend',
|
|
117
|
-
auth: '
|
|
117
|
+
auth: { account: 'required', actor: 'none' },
|
|
118
118
|
side_effects: true,
|
|
119
119
|
input: TokenCreateInput,
|
|
120
120
|
output: TokenCreateOutput,
|
|
@@ -125,7 +125,7 @@ export const account_token_list_action_spec = {
|
|
|
125
125
|
method: 'account_token_list',
|
|
126
126
|
kind: 'request_response',
|
|
127
127
|
initiator: 'frontend',
|
|
128
|
-
auth: '
|
|
128
|
+
auth: { account: 'required', actor: 'none' },
|
|
129
129
|
side_effects: false,
|
|
130
130
|
input: TokenListInput,
|
|
131
131
|
output: TokenListOutput,
|
|
@@ -136,7 +136,7 @@ export const account_token_revoke_action_spec = {
|
|
|
136
136
|
method: 'account_token_revoke',
|
|
137
137
|
kind: 'request_response',
|
|
138
138
|
initiator: 'frontend',
|
|
139
|
-
auth: '
|
|
139
|
+
auth: { account: 'required', actor: 'none' },
|
|
140
140
|
side_effects: true,
|
|
141
141
|
input: TokenRevokeInput,
|
|
142
142
|
output: TokenRevokeOutput,
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* `account_token_revoke`.
|
|
11
11
|
*
|
|
12
12
|
* The action specs themselves live in `auth/account_action_specs.ts`. Every spec
|
|
13
|
-
* declares `auth: '
|
|
14
|
-
* handler runs. Revoke operations are
|
|
13
|
+
* declares `auth: {account: 'required', actor: 'none'}` so the dispatcher
|
|
14
|
+
* enforces account-grain auth before the handler runs. Revoke operations are
|
|
15
|
+
* account-scoped (via
|
|
15
16
|
* `query_session_revoke_for_account` / `query_revoke_api_token_for_account`)
|
|
16
17
|
* so passing another account's session or token id returns `revoked: false`
|
|
17
18
|
* rather than revealing whether the id exists.
|
|
@@ -33,21 +34,14 @@ export interface AccountActionOptions {
|
|
|
33
34
|
*/
|
|
34
35
|
max_tokens?: number | null;
|
|
35
36
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Dependencies for `create_account_actions`.
|
|
38
|
-
*
|
|
39
|
-
* Shares shape with `AdminActionDeps` / `PermitOfferActionDeps` so consumers
|
|
40
|
-
* can pass the same deps to every action factory. `audit_log_config` is
|
|
41
|
-
* carried through `AppDeps` and consumed by `audit_log_fire_and_forget`;
|
|
42
|
-
* absent → defaults to `BUILTIN_AUDIT_LOG_CONFIG`.
|
|
43
|
-
*/
|
|
44
|
-
export type AccountActionDeps = Pick<RouteFactoryDeps, 'log' | 'on_audit_event' | 'audit_log_config'>;
|
|
45
37
|
/**
|
|
46
38
|
* Create the self-service account RPC actions.
|
|
47
39
|
*
|
|
48
|
-
* @param deps - `
|
|
40
|
+
* @param deps - `RouteFactoryDeps` (`log`, `audit`, …). `audit.emit` writes
|
|
41
|
+
* audit rows via the captured pool; the bound emitter encapsulates
|
|
42
|
+
* `on_audit_event` fan-out and the optional `AuditLogConfig`.
|
|
49
43
|
* @param options - per-factory configuration
|
|
50
44
|
* @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
|
|
51
45
|
*/
|
|
52
|
-
export declare const create_account_actions: (deps:
|
|
46
|
+
export declare const create_account_actions: (deps: Pick<RouteFactoryDeps, "log" | "audit">, options?: AccountActionOptions) => Array<RpcAction>;
|
|
53
47
|
//# sourceMappingURL=account_actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_actions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"account_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAqC,KAAK,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAe5F,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAwBhD,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAClC,MAAM,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CAAC,EAC7C,UAAS,oBAAyB,KAChC,KAAK,CAAC,SAAS,CAsGjB,CAAC"}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* `account_token_revoke`.
|
|
11
11
|
*
|
|
12
12
|
* The action specs themselves live in `auth/account_action_specs.ts`. Every spec
|
|
13
|
-
* declares `auth: '
|
|
14
|
-
* handler runs. Revoke operations are
|
|
13
|
+
* declares `auth: {account: 'required', actor: 'none'}` so the dispatcher
|
|
14
|
+
* enforces account-grain auth before the handler runs. Revoke operations are
|
|
15
|
+
* account-scoped (via
|
|
15
16
|
* `query_session_revoke_for_account` / `query_revoke_api_token_for_account`)
|
|
16
17
|
* so passing another account's session or token id returns `revoked: false`
|
|
17
18
|
* rather than revealing whether the id exists.
|
|
@@ -26,84 +27,74 @@ import { to_session_account } from './account_schema.js';
|
|
|
26
27
|
import { query_session_list_for_account, query_session_revoke_for_account, query_session_revoke_all_for_account, } from './session_queries.js';
|
|
27
28
|
import { query_api_token_enforce_limit, query_api_token_list_for_account, query_create_api_token, query_revoke_api_token_for_account, } from './api_token_queries.js';
|
|
28
29
|
import { generate_api_token } from './api_token.js';
|
|
29
|
-
import { audit_log_fire_and_forget } from './audit_log_queries.js';
|
|
30
30
|
import { DEFAULT_MAX_TOKENS } from './account_routes.js';
|
|
31
31
|
import { account_verify_action_spec, account_session_list_action_spec, account_session_revoke_action_spec, account_session_revoke_all_action_spec, account_token_create_action_spec, account_token_list_action_spec, account_token_revoke_action_spec, } from './account_action_specs.js';
|
|
32
32
|
/**
|
|
33
33
|
* Create the self-service account RPC actions.
|
|
34
34
|
*
|
|
35
|
-
* @param deps - `
|
|
35
|
+
* @param deps - `RouteFactoryDeps` (`log`, `audit`, …). `audit.emit` writes
|
|
36
|
+
* audit rows via the captured pool; the bound emitter encapsulates
|
|
37
|
+
* `on_audit_event` fan-out and the optional `AuditLogConfig`.
|
|
36
38
|
* @param options - per-factory configuration
|
|
37
39
|
* @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
|
|
38
40
|
*/
|
|
39
41
|
export const create_account_actions = (deps, options = {}) => {
|
|
40
42
|
const { max_tokens = DEFAULT_MAX_TOKENS } = options;
|
|
41
43
|
const verify_handler = (_input, ctx) => {
|
|
42
|
-
|
|
43
|
-
return to_session_account(auth.account);
|
|
44
|
+
return to_session_account(ctx.auth.account);
|
|
44
45
|
};
|
|
45
46
|
const session_list_handler = async (_input, ctx) => {
|
|
46
|
-
const
|
|
47
|
-
const sessions = await query_session_list_for_account(ctx, auth.account.id);
|
|
47
|
+
const sessions = await query_session_list_for_account(ctx, ctx.auth.account.id);
|
|
48
48
|
return { sessions };
|
|
49
49
|
};
|
|
50
50
|
const session_revoke_handler = async (input, ctx) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
void audit_log_fire_and_forget(ctx, {
|
|
51
|
+
const revoked = await query_session_revoke_for_account(ctx, input.session_id, ctx.auth.account.id);
|
|
52
|
+
deps.audit.emit(ctx, {
|
|
54
53
|
event_type: 'session_revoke',
|
|
55
54
|
outcome: revoked ? 'success' : 'failure',
|
|
56
|
-
|
|
57
|
-
account_id: auth.account.id,
|
|
55
|
+
account_id: ctx.auth.account.id,
|
|
58
56
|
ip: ctx.client_ip,
|
|
59
57
|
metadata: { session_id: input.session_id },
|
|
60
|
-
}
|
|
58
|
+
});
|
|
61
59
|
return { ok: true, revoked };
|
|
62
60
|
};
|
|
63
61
|
const session_revoke_all_handler = async (_input, ctx) => {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
void audit_log_fire_and_forget(ctx, {
|
|
62
|
+
const count = await query_session_revoke_all_for_account(ctx, ctx.auth.account.id);
|
|
63
|
+
deps.audit.emit(ctx, {
|
|
67
64
|
event_type: 'session_revoke_all',
|
|
68
|
-
|
|
69
|
-
account_id: auth.account.id,
|
|
65
|
+
account_id: ctx.auth.account.id,
|
|
70
66
|
ip: ctx.client_ip,
|
|
71
67
|
metadata: { count },
|
|
72
|
-
}
|
|
68
|
+
});
|
|
73
69
|
return { ok: true, count };
|
|
74
70
|
};
|
|
75
71
|
const token_create_handler = async (input, ctx) => {
|
|
76
|
-
const auth = ctx.auth;
|
|
77
72
|
const { token, id, token_hash } = generate_api_token();
|
|
78
|
-
await query_create_api_token(ctx, id, auth.account.id, input.name, token_hash);
|
|
73
|
+
await query_create_api_token(ctx, id, ctx.auth.account.id, input.name, token_hash);
|
|
79
74
|
if (max_tokens != null) {
|
|
80
|
-
await query_api_token_enforce_limit(ctx, auth.account.id, max_tokens);
|
|
75
|
+
await query_api_token_enforce_limit(ctx, ctx.auth.account.id, max_tokens);
|
|
81
76
|
}
|
|
82
|
-
|
|
77
|
+
deps.audit.emit(ctx, {
|
|
83
78
|
event_type: 'token_create',
|
|
84
|
-
|
|
85
|
-
account_id: auth.account.id,
|
|
79
|
+
account_id: ctx.auth.account.id,
|
|
86
80
|
ip: ctx.client_ip,
|
|
87
81
|
metadata: { token_id: id, name: input.name },
|
|
88
|
-
}
|
|
82
|
+
});
|
|
89
83
|
return { ok: true, token, id, name: input.name };
|
|
90
84
|
};
|
|
91
85
|
const token_list_handler = async (_input, ctx) => {
|
|
92
|
-
const
|
|
93
|
-
const tokens = await query_api_token_list_for_account(ctx, auth.account.id);
|
|
86
|
+
const tokens = await query_api_token_list_for_account(ctx, ctx.auth.account.id);
|
|
94
87
|
return { tokens };
|
|
95
88
|
};
|
|
96
89
|
const token_revoke_handler = async (input, ctx) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
void audit_log_fire_and_forget(ctx, {
|
|
90
|
+
const revoked = await query_revoke_api_token_for_account(ctx, input.token_id, ctx.auth.account.id);
|
|
91
|
+
deps.audit.emit(ctx, {
|
|
100
92
|
event_type: 'token_revoke',
|
|
101
93
|
outcome: revoked ? 'success' : 'failure',
|
|
102
|
-
|
|
103
|
-
account_id: auth.account.id,
|
|
94
|
+
account_id: ctx.auth.account.id,
|
|
104
95
|
ip: ctx.client_ip,
|
|
105
96
|
metadata: { token_id: input.token_id },
|
|
106
|
-
}
|
|
97
|
+
});
|
|
107
98
|
return { ok: true, revoked };
|
|
108
99
|
};
|
|
109
100
|
return [
|
|
@@ -42,15 +42,30 @@ export declare const query_account_by_email: (deps: QueryDeps, email: string) =>
|
|
|
42
42
|
*/
|
|
43
43
|
export declare const query_account_by_username_or_email: (deps: QueryDeps, input: string) => Promise<Account | undefined>;
|
|
44
44
|
/**
|
|
45
|
-
* Update the password hash for an account
|
|
45
|
+
* Update the password hash for an account, conditional on the current
|
|
46
|
+
* stored hash matching `expected_hash` — the verify-write atomic guard.
|
|
46
47
|
*
|
|
47
|
-
*
|
|
48
|
+
* The condition closes the race where two concurrent password changes both
|
|
49
|
+
* verify against the pre-update hash (loaded by the authorization phase
|
|
50
|
+
* outside the route's transaction) and would otherwise both UPDATE,
|
|
51
|
+
* silently clobbering whichever lands first. With the conditional WHERE,
|
|
52
|
+
* the second UPDATE matches zero rows; the route reads the boolean
|
|
53
|
+
* return and surfaces 401 instead of pretending success.
|
|
54
|
+
*
|
|
55
|
+
* Pass the same hash the verify ran against — typically
|
|
56
|
+
* `ctx.account.password_hash` from the request context.
|
|
57
|
+
*
|
|
58
|
+
* @returns `true` if the row was updated, `false` if `expected_hash` no
|
|
59
|
+
* longer matched (concurrent change won — caller should treat as a
|
|
60
|
+
* stale-credential failure).
|
|
61
|
+
* @mutates `account` row - updates `password_hash`, `updated_at`, and
|
|
62
|
+
* `updated_by` only when the stored hash equals `expected_hash`
|
|
48
63
|
*/
|
|
49
|
-
export declare const query_update_account_password: (deps: QueryDeps, id: string, password_hash: string, updated_by: string | null) => Promise<
|
|
64
|
+
export declare const query_update_account_password: (deps: QueryDeps, id: string, password_hash: string, updated_by: string | null, expected_hash: string) => Promise<boolean>;
|
|
50
65
|
/**
|
|
51
|
-
* Delete an account. Cascades to actors,
|
|
66
|
+
* Delete an account. Cascades to actors, role_grants, sessions, and tokens.
|
|
52
67
|
*
|
|
53
|
-
* @mutates `account` table and downstream FK rows - DELETE cascades through actors/
|
|
68
|
+
* @mutates `account` table and downstream FK rows - DELETE cascades through actors/role_grants/sessions/tokens
|
|
54
69
|
*/
|
|
55
70
|
export declare const query_delete_account: (deps: QueryDeps, id: string) => Promise<boolean>;
|
|
56
71
|
/**
|
|
@@ -68,11 +83,14 @@ export declare const query_account_has_any: (deps: QueryDeps) => Promise<boolean
|
|
|
68
83
|
*/
|
|
69
84
|
export declare const query_create_actor: (deps: QueryDeps, account_id: string, name: string) => Promise<Actor>;
|
|
70
85
|
/**
|
|
71
|
-
*
|
|
86
|
+
* List every actor on an account, ordered by `created_at`.
|
|
72
87
|
*
|
|
73
|
-
*
|
|
88
|
+
* Used by `resolve_acting_actor` to resolve the acting actor for a
|
|
89
|
+
* request: 1 actor picks transparently, multiple require an explicit
|
|
90
|
+
* `acting` field on the request payload. For lookups by id, use
|
|
91
|
+
* `query_actor_by_id` instead.
|
|
74
92
|
*/
|
|
75
|
-
export declare const
|
|
93
|
+
export declare const query_actors_by_account: (deps: QueryDeps, account_id: string) => Promise<Array<Actor>>;
|
|
76
94
|
/**
|
|
77
95
|
* Find an actor by id.
|
|
78
96
|
*/
|
|
@@ -91,17 +109,35 @@ export declare const query_create_account_with_actor: (deps: QueryDeps, input: C
|
|
|
91
109
|
account: Account;
|
|
92
110
|
actor: Actor;
|
|
93
111
|
}>;
|
|
112
|
+
/** Options for `query_admin_account_list`. */
|
|
113
|
+
export interface AdminAccountListOptions {
|
|
114
|
+
/**
|
|
115
|
+
* Max accounts to return. Defaults to `ADMIN_ACCOUNT_LIST_DEFAULT_LIMIT`
|
|
116
|
+
* when omitted; pass `null` explicitly to disable the limit (unbounded
|
|
117
|
+
* fetch — for trusted internal callers / scripts; the RPC schema bounds
|
|
118
|
+
* wire callers to `[1, ADMIN_ACCOUNT_LIST_LIMIT_MAX]`).
|
|
119
|
+
*/
|
|
120
|
+
limit?: number | null;
|
|
121
|
+
/** Pagination offset. Defaults to 0. */
|
|
122
|
+
offset?: number | null;
|
|
123
|
+
}
|
|
94
124
|
/**
|
|
95
|
-
* List
|
|
96
|
-
*
|
|
125
|
+
* List accounts with their actors, active role_grants, and pending inbound
|
|
126
|
+
* role_grant offers for admin display.
|
|
97
127
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
128
|
+
* Pages the accounts query (one round-trip), then fans out three parallel
|
|
129
|
+
* lookups scoped to the page's `account_ids` (one round-trip). The role_grants
|
|
130
|
+
* and offers queries use a subquery on `actor.account_id` so the page bound
|
|
131
|
+
* pushes through to the DB without round-tripping `actor.id`s back to the
|
|
132
|
+
* application. Pending offers surface the "offer pending — awaiting
|
|
133
|
+
* acceptance" UX; `message` is intentionally excluded (cross-admin
|
|
134
|
+
* visibility of grantor notes would expand beyond what the audit log
|
|
135
|
+
* discloses).
|
|
102
136
|
*
|
|
103
137
|
* @param deps - query dependencies
|
|
104
|
-
* @
|
|
138
|
+
* @param options - optional `{limit, offset}`. Default limit is
|
|
139
|
+
* `ADMIN_ACCOUNT_LIST_DEFAULT_LIMIT`; pass `limit: null` to disable.
|
|
140
|
+
* @returns admin account entries sorted by creation date (oldest first)
|
|
105
141
|
*/
|
|
106
|
-
export declare const query_admin_account_list: (deps: QueryDeps) => Promise<Array<AdminAccountEntryJson>>;
|
|
142
|
+
export declare const query_admin_account_list: (deps: QueryDeps, options?: AdminAccountListOptions) => Promise<Array<AdminAccountEntryJson>>;
|
|
107
143
|
//# sourceMappingURL=account_queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_queries.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_queries.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAEN,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"account_queries.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_queries.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAEN,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAChC,MAAM,SAAS,EACf,OAAO,kBAAkB,KACvB,OAAO,CAAC,OAAO,CAQjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC/B,MAAM,SAAS,EACf,IAAI,MAAM,KACR,OAAO,CAAC,OAAO,GAAG,SAAS,CAE7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GACrC,MAAM,SAAS,EACf,UAAU,MAAM,KACd,OAAO,CAAC,OAAO,GAAG,SAAS,CAI7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAClC,MAAM,SAAS,EACf,OAAO,MAAM,KACX,OAAO,CAAC,OAAO,GAAG,SAAS,CAI7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,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,GACpC,MAAM,SAAS,EACf,UAAU,uBAAuB,KAC/B,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAyGtC,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { assert_row } from '../db/assert_row.js';
|
|
10
10
|
import { to_admin_account, } from './account_schema.js';
|
|
11
|
+
import { ADMIN_ACCOUNT_LIST_DEFAULT_LIMIT } from './admin_action_specs.js';
|
|
11
12
|
/**
|
|
12
13
|
* Create a new account.
|
|
13
14
|
*
|
|
@@ -62,17 +63,35 @@ export const query_account_by_username_or_email = async (deps, input) => {
|
|
|
62
63
|
return ((await query_account_by_username(deps, input)) ?? (await query_account_by_email(deps, input)));
|
|
63
64
|
};
|
|
64
65
|
/**
|
|
65
|
-
* Update the password hash for an account
|
|
66
|
+
* Update the password hash for an account, conditional on the current
|
|
67
|
+
* stored hash matching `expected_hash` — the verify-write atomic guard.
|
|
66
68
|
*
|
|
67
|
-
*
|
|
69
|
+
* The condition closes the race where two concurrent password changes both
|
|
70
|
+
* verify against the pre-update hash (loaded by the authorization phase
|
|
71
|
+
* outside the route's transaction) and would otherwise both UPDATE,
|
|
72
|
+
* silently clobbering whichever lands first. With the conditional WHERE,
|
|
73
|
+
* the second UPDATE matches zero rows; the route reads the boolean
|
|
74
|
+
* return and surfaces 401 instead of pretending success.
|
|
75
|
+
*
|
|
76
|
+
* Pass the same hash the verify ran against — typically
|
|
77
|
+
* `ctx.account.password_hash` from the request context.
|
|
78
|
+
*
|
|
79
|
+
* @returns `true` if the row was updated, `false` if `expected_hash` no
|
|
80
|
+
* longer matched (concurrent change won — caller should treat as a
|
|
81
|
+
* stale-credential failure).
|
|
82
|
+
* @mutates `account` row - updates `password_hash`, `updated_at`, and
|
|
83
|
+
* `updated_by` only when the stored hash equals `expected_hash`
|
|
68
84
|
*/
|
|
69
|
-
export const query_update_account_password = async (deps, id, password_hash, updated_by) => {
|
|
70
|
-
await deps.db.query(`UPDATE account SET password_hash = $1, updated_at = NOW(), updated_by = $2
|
|
85
|
+
export const query_update_account_password = async (deps, id, password_hash, updated_by, expected_hash) => {
|
|
86
|
+
const rows = await deps.db.query(`UPDATE account SET password_hash = $1, updated_at = NOW(), updated_by = $2
|
|
87
|
+
WHERE id = $3 AND password_hash = $4
|
|
88
|
+
RETURNING id`, [password_hash, updated_by ?? null, id, expected_hash]);
|
|
89
|
+
return rows.length > 0;
|
|
71
90
|
};
|
|
72
91
|
/**
|
|
73
|
-
* Delete an account. Cascades to actors,
|
|
92
|
+
* Delete an account. Cascades to actors, role_grants, sessions, and tokens.
|
|
74
93
|
*
|
|
75
|
-
* @mutates `account` table and downstream FK rows - DELETE cascades through actors/
|
|
94
|
+
* @mutates `account` table and downstream FK rows - DELETE cascades through actors/role_grants/sessions/tokens
|
|
76
95
|
*/
|
|
77
96
|
export const query_delete_account = async (deps, id) => {
|
|
78
97
|
const rows = await deps.db.query(`DELETE FROM account WHERE id = $1 RETURNING id`, [
|
|
@@ -101,12 +120,15 @@ export const query_create_actor = async (deps, account_id, name) => {
|
|
|
101
120
|
return assert_row(row, 'INSERT INTO actor');
|
|
102
121
|
};
|
|
103
122
|
/**
|
|
104
|
-
*
|
|
123
|
+
* List every actor on an account, ordered by `created_at`.
|
|
105
124
|
*
|
|
106
|
-
*
|
|
125
|
+
* Used by `resolve_acting_actor` to resolve the acting actor for a
|
|
126
|
+
* request: 1 actor picks transparently, multiple require an explicit
|
|
127
|
+
* `acting` field on the request payload. For lookups by id, use
|
|
128
|
+
* `query_actor_by_id` instead.
|
|
107
129
|
*/
|
|
108
|
-
export const
|
|
109
|
-
return deps.db.
|
|
130
|
+
export const query_actors_by_account = async (deps, account_id) => {
|
|
131
|
+
return deps.db.query(`SELECT * FROM actor WHERE account_id = $1 ORDER BY created_at ASC, id ASC`, [account_id]);
|
|
110
132
|
};
|
|
111
133
|
/**
|
|
112
134
|
* Find an actor by id.
|
|
@@ -130,51 +152,76 @@ export const query_create_account_with_actor = async (deps, input) => {
|
|
|
130
152
|
return { account, actor };
|
|
131
153
|
};
|
|
132
154
|
/**
|
|
133
|
-
* List
|
|
134
|
-
*
|
|
155
|
+
* List accounts with their actors, active role_grants, and pending inbound
|
|
156
|
+
* role_grant offers for admin display.
|
|
135
157
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
158
|
+
* Pages the accounts query (one round-trip), then fans out three parallel
|
|
159
|
+
* lookups scoped to the page's `account_ids` (one round-trip). The role_grants
|
|
160
|
+
* and offers queries use a subquery on `actor.account_id` so the page bound
|
|
161
|
+
* pushes through to the DB without round-tripping `actor.id`s back to the
|
|
162
|
+
* application. Pending offers surface the "offer pending — awaiting
|
|
163
|
+
* acceptance" UX; `message` is intentionally excluded (cross-admin
|
|
164
|
+
* visibility of grantor notes would expand beyond what the audit log
|
|
165
|
+
* discloses).
|
|
140
166
|
*
|
|
141
167
|
* @param deps - query dependencies
|
|
142
|
-
* @
|
|
168
|
+
* @param options - optional `{limit, offset}`. Default limit is
|
|
169
|
+
* `ADMIN_ACCOUNT_LIST_DEFAULT_LIMIT`; pass `limit: null` to disable.
|
|
170
|
+
* @returns admin account entries sorted by creation date (oldest first)
|
|
143
171
|
*/
|
|
144
|
-
export const query_admin_account_list = async (deps) => {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
deps.db.query(`SELECT
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
172
|
+
export const query_admin_account_list = async (deps, options) => {
|
|
173
|
+
const limit = options?.limit === null ? null : (options?.limit ?? ADMIN_ACCOUNT_LIST_DEFAULT_LIMIT);
|
|
174
|
+
const offset = options?.offset ?? 0;
|
|
175
|
+
const account_query = limit == null
|
|
176
|
+
? deps.db.query(`SELECT * FROM account ORDER BY created_at OFFSET $1`, [offset])
|
|
177
|
+
: deps.db.query(`SELECT * FROM account ORDER BY created_at LIMIT $1 OFFSET $2`, [
|
|
178
|
+
limit,
|
|
179
|
+
offset,
|
|
180
|
+
]);
|
|
181
|
+
const accounts = await account_query;
|
|
182
|
+
if (accounts.length === 0)
|
|
183
|
+
return [];
|
|
184
|
+
const account_ids = accounts.map((a) => a.id);
|
|
185
|
+
const [actors, role_grants, pending_offers] = await Promise.all([
|
|
186
|
+
deps.db.query(`SELECT * FROM actor WHERE account_id = ANY($1::uuid[])`, [account_ids]),
|
|
187
|
+
deps.db.query(`SELECT id, actor_id, role, scope_kind, scope_id, created_at, expires_at, granted_by
|
|
188
|
+
FROM role_grant
|
|
189
|
+
WHERE actor_id IN (SELECT id FROM actor WHERE account_id = ANY($1::uuid[]))
|
|
190
|
+
AND revoked_at IS NULL
|
|
191
|
+
AND (expires_at IS NULL OR expires_at > NOW())`, [account_ids]),
|
|
192
|
+
deps.db.query(`SELECT po.id, po.to_account_id, po.from_actor_id, po.role, po.scope_kind, po.scope_id,
|
|
153
193
|
po.created_at, po.expires_at, a.username AS from_username
|
|
154
|
-
FROM
|
|
194
|
+
FROM role_grant_offer po
|
|
155
195
|
JOIN actor act ON act.id = po.from_actor_id
|
|
156
196
|
JOIN account a ON a.id = act.account_id
|
|
157
|
-
WHERE po.
|
|
197
|
+
WHERE po.to_account_id = ANY($1::uuid[])
|
|
198
|
+
AND po.accepted_at IS NULL
|
|
158
199
|
AND po.declined_at IS NULL
|
|
159
200
|
AND po.retracted_at IS NULL
|
|
160
201
|
AND po.superseded_at IS NULL
|
|
161
202
|
AND po.expires_at > NOW()
|
|
162
|
-
ORDER BY po.expires_at ASC
|
|
203
|
+
ORDER BY po.expires_at ASC`, [account_ids]),
|
|
163
204
|
]);
|
|
164
|
-
// Index actors by account_id
|
|
205
|
+
// Index actors by account_id. Multi-actor TODO: this Map keyed by
|
|
206
|
+
// account_id silently overwrites earlier actors when an account
|
|
207
|
+
// hosts more than one — when multi-actor lands, the admin row shape
|
|
208
|
+
// must change from "account → one actor" to "account → Array<Actor>"
|
|
209
|
+
// (or split into a separate per-actor row). The JSON shape change
|
|
210
|
+
// will ripple into the admin UI; bundle that with the multi-actor
|
|
211
|
+
// session-actor-selector work.
|
|
165
212
|
const actor_by_account = new Map();
|
|
166
213
|
for (const actor of actors) {
|
|
167
214
|
actor_by_account.set(actor.account_id, actor);
|
|
168
215
|
}
|
|
169
|
-
// Group
|
|
170
|
-
const
|
|
171
|
-
for (const
|
|
172
|
-
let list =
|
|
216
|
+
// Group role_grants by actor_id
|
|
217
|
+
const role_grants_by_actor = new Map();
|
|
218
|
+
for (const role_grant of role_grants) {
|
|
219
|
+
let list = role_grants_by_actor.get(role_grant.actor_id);
|
|
173
220
|
if (!list) {
|
|
174
221
|
list = [];
|
|
175
|
-
|
|
222
|
+
role_grants_by_actor.set(role_grant.actor_id, list);
|
|
176
223
|
}
|
|
177
|
-
list.push(
|
|
224
|
+
list.push(role_grant);
|
|
178
225
|
}
|
|
179
226
|
// Group pending offers by recipient account_id
|
|
180
227
|
const offers_by_account = new Map();
|
|
@@ -188,14 +235,15 @@ export const query_admin_account_list = async (deps) => {
|
|
|
188
235
|
}
|
|
189
236
|
return accounts.map((account) => {
|
|
190
237
|
const actor = actor_by_account.get(account.id);
|
|
191
|
-
const
|
|
238
|
+
const actor_role_grants = actor ? (role_grants_by_actor.get(actor.id) ?? []) : [];
|
|
192
239
|
const account_offers = offers_by_account.get(account.id) ?? [];
|
|
193
240
|
return {
|
|
194
241
|
account: to_admin_account(account),
|
|
195
242
|
actor: actor ? { id: actor.id, name: actor.name } : null,
|
|
196
|
-
|
|
243
|
+
role_grants: actor_role_grants.map((p) => ({
|
|
197
244
|
id: p.id,
|
|
198
245
|
role: p.role,
|
|
246
|
+
scope_kind: p.scope_kind,
|
|
199
247
|
scope_id: p.scope_id,
|
|
200
248
|
created_at: p.created_at,
|
|
201
249
|
expires_at: p.expires_at,
|
|
@@ -204,6 +252,7 @@ export const query_admin_account_list = async (deps) => {
|
|
|
204
252
|
pending_offers: account_offers.map((o) => ({
|
|
205
253
|
id: o.id,
|
|
206
254
|
role: o.role,
|
|
255
|
+
scope_kind: o.scope_kind,
|
|
207
256
|
scope_id: o.scope_id,
|
|
208
257
|
from_actor_id: o.from_actor_id,
|
|
209
258
|
from_username: o.from_username,
|