@fuzdev/fuz_app 0.55.0 → 0.57.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 +211 -155
- 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 +19 -0
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +20 -14
- 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 +110 -44
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +92 -287
- 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 +44 -38
- 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 +2 -10
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +32 -10
- 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 +673 -442
- 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 +8 -14
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +26 -32
- package/dist/auth/account_queries.d.ts +46 -13
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +73 -33
- package/dist/auth/account_routes.d.ts +4 -3
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +58 -33
- package/dist/auth/account_schema.d.ts +46 -54
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +21 -48
- package/dist/auth/admin_action_specs.d.ts +55 -21
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +42 -26
- package/dist/auth/admin_actions.d.ts +14 -21
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +47 -44
- 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 -87
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +17 -96
- 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 +48 -42
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +56 -43
- 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/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 -47
- 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 +1 -1
- package/dist/auth/daemon_token_middleware.js +3 -3
- 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 -32
- 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 +5 -2
- package/dist/auth/migrations.d.ts +22 -7
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +64 -25
- package/dist/auth/request_context.d.ts +157 -170
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +224 -268
- package/dist/auth/{permit_offer_action_specs.d.ts → role_grant_offer_action_specs.d.ts} +130 -100
- 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/{permit_offer_actions.js → role_grant_offer_actions.js} +153 -140
- package/dist/auth/{permit_offer_notifications.d.ts → role_grant_offer_notifications.d.ts} +80 -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/{permit_offer_queries.d.ts → role_grant_offer_queries.d.ts} +64 -64
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -0
- package/dist/auth/{permit_offer_queries.js → role_grant_offer_queries.js} +136 -123
- 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} +55 -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 +4 -1
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +2 -2
- package/dist/auth/self_service_role_actions.d.ts +35 -29
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +58 -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 +1 -1
- package/dist/db/migrate.js +1 -1
- package/dist/dev/setup.d.ts +2 -2
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +4 -4
- package/dist/env/load.d.ts +1 -1
- package/dist/env/load.js +1 -1
- package/dist/hono_context.d.ts +27 -45
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +14 -28
- package/dist/http/CLAUDE.md +235 -121
- 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 +72 -39
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +81 -33
- 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 +89 -75
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +54 -72
- package/dist/http/schema_helpers.d.ts +3 -14
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +2 -14
- package/dist/http/surface.d.ts +2 -10
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +3 -4
- 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 +35 -40
- package/dist/server/validate_nginx.d.ts +1 -1
- package/dist/server/validate_nginx.js +1 -1
- package/dist/testing/CLAUDE.md +50 -38
- 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 +87 -85
- 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 +16 -15
- 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 +36 -36
- 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 +22 -19
- 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 +8 -7
- package/dist/testing/entities.d.ts.map +1 -1
- package/dist/testing/entities.js +21 -18
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +13 -14
- package/dist/testing/integration_helpers.d.ts +4 -4
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +20 -18
- package/dist/testing/middleware.d.ts +4 -4
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +12 -11
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +40 -24
- 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 +14 -6
- package/dist/testing/surface_invariants.d.ts.map +1 -1
- package/dist/testing/surface_invariants.js +119 -43
- 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 +19 -11
- 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 +60 -60
- package/dist/ui/{PermitOfferForm.svelte → RoleGrantOfferForm.svelte} +27 -26
- package/dist/ui/{PermitOfferForm.svelte.d.ts → RoleGrantOfferForm.svelte.d.ts} +7 -7
- 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 +18 -18
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +16 -16
- 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} +30 -30
- 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} +18 -18
- 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 -258
- 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_notifications.d.ts.map +0 -1
- package/dist/auth/permit_offer_notifications.js +0 -182
- package/dist/auth/permit_offer_queries.d.ts.map +0 -1
- package/dist/auth/permit_offer_schema.d.ts +0 -125
- package/dist/auth/permit_offer_schema.d.ts.map +0 -1
- package/dist/auth/permit_queries.d.ts +0 -222
- package/dist/auth/permit_queries.d.ts.map +0 -1
- package/dist/auth/permit_queries.js +0 -305
- 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 -27
- package/dist/auth/route_guards.d.ts.map +0 -1
- package/dist/auth/route_guards.js +0 -38
- 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.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,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,yCAAyC;AACzC,eAAO,MAAM,iBAAiB;;;;;;;;kBAE5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB;;kBAE7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,iFAAiF;AACjF,eAAO,MAAM,mBAAmB;;;kBAG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;;;;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.
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
* @module
|
|
23
24
|
*/
|
|
24
25
|
import { type RpcAction } from '../actions/action_rpc.js';
|
|
25
|
-
import type {
|
|
26
|
+
import type { RouteFactoryDeps } from './deps.js';
|
|
26
27
|
/** Options for `create_account_actions`. */
|
|
27
28
|
export interface AccountActionOptions {
|
|
28
29
|
/**
|
|
@@ -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
|
-
* Aliases the shared `AuditEmitDeps` (the `log` / `on_audit_event` /
|
|
40
|
-
* optional `audit_log_config` slice every audit-emitting site picks).
|
|
41
|
-
* `audit_log_config` is consumed by `audit_log_fire_and_forget`; absent →
|
|
42
|
-
* defaults to `BUILTIN_AUDIT_LOG_CONFIG`.
|
|
43
|
-
*/
|
|
44
|
-
export type AccountActionDeps = AuditEmitDeps;
|
|
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,81 +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
|
-
import { require_request_auth } from './request_context.js';
|
|
32
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';
|
|
33
32
|
/**
|
|
34
33
|
* Create the self-service account RPC actions.
|
|
35
34
|
*
|
|
36
|
-
* @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`.
|
|
37
38
|
* @param options - per-factory configuration
|
|
38
39
|
* @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
|
|
39
40
|
*/
|
|
40
41
|
export const create_account_actions = (deps, options = {}) => {
|
|
41
42
|
const { max_tokens = DEFAULT_MAX_TOKENS } = options;
|
|
42
43
|
const verify_handler = (_input, ctx) => {
|
|
43
|
-
|
|
44
|
-
return to_session_account(auth.account);
|
|
44
|
+
return to_session_account(ctx.auth.account);
|
|
45
45
|
};
|
|
46
46
|
const session_list_handler = async (_input, ctx) => {
|
|
47
|
-
const
|
|
48
|
-
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);
|
|
49
48
|
return { sessions };
|
|
50
49
|
};
|
|
51
50
|
const session_revoke_handler = async (input, ctx) => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
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, {
|
|
55
53
|
event_type: 'session_revoke',
|
|
56
54
|
outcome: revoked ? 'success' : 'failure',
|
|
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
|
-
account_id: auth.account.id,
|
|
65
|
+
account_id: ctx.auth.account.id,
|
|
69
66
|
ip: ctx.client_ip,
|
|
70
67
|
metadata: { count },
|
|
71
|
-
}
|
|
68
|
+
});
|
|
72
69
|
return { ok: true, count };
|
|
73
70
|
};
|
|
74
71
|
const token_create_handler = async (input, ctx) => {
|
|
75
|
-
const auth = require_request_auth(ctx.auth);
|
|
76
72
|
const { token, id, token_hash } = generate_api_token();
|
|
77
|
-
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);
|
|
78
74
|
if (max_tokens != null) {
|
|
79
|
-
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);
|
|
80
76
|
}
|
|
81
|
-
|
|
77
|
+
deps.audit.emit(ctx, {
|
|
82
78
|
event_type: 'token_create',
|
|
83
|
-
account_id: auth.account.id,
|
|
79
|
+
account_id: ctx.auth.account.id,
|
|
84
80
|
ip: ctx.client_ip,
|
|
85
81
|
metadata: { token_id: id, name: input.name },
|
|
86
|
-
}
|
|
82
|
+
});
|
|
87
83
|
return { ok: true, token, id, name: input.name };
|
|
88
84
|
};
|
|
89
85
|
const token_list_handler = async (_input, ctx) => {
|
|
90
|
-
const
|
|
91
|
-
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);
|
|
92
87
|
return { tokens };
|
|
93
88
|
};
|
|
94
89
|
const token_revoke_handler = async (input, ctx) => {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
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, {
|
|
98
92
|
event_type: 'token_revoke',
|
|
99
93
|
outcome: revoked ? 'success' : 'failure',
|
|
100
|
-
account_id: auth.account.id,
|
|
94
|
+
account_id: ctx.auth.account.id,
|
|
101
95
|
ip: ctx.client_ip,
|
|
102
96
|
metadata: { token_id: input.token_id },
|
|
103
|
-
}
|
|
97
|
+
});
|
|
104
98
|
return { ok: true, revoked };
|
|
105
99
|
};
|
|
106
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
|
/**
|
|
@@ -94,17 +109,35 @@ export declare const query_create_account_with_actor: (deps: QueryDeps, input: C
|
|
|
94
109
|
account: Account;
|
|
95
110
|
actor: Actor;
|
|
96
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
|
+
}
|
|
97
124
|
/**
|
|
98
|
-
* List
|
|
99
|
-
*
|
|
125
|
+
* List accounts with their actors, active role_grants, and pending inbound
|
|
126
|
+
* role_grant offers for admin display.
|
|
100
127
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
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).
|
|
105
136
|
*
|
|
106
137
|
* @param deps - query dependencies
|
|
107
|
-
* @
|
|
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)
|
|
108
141
|
*/
|
|
109
|
-
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>>;
|
|
110
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;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AChB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAKtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC7B,MAAM,SAAS,EACf,IAAI,MAAM,KACR,OAAO,CAAC,KAAK,GAAG,SAAS,CAE3B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,GAC3C,MAAM,SAAS,EACf,OAAO,kBAAkB,KACvB,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,CAI1C,CAAC;AA2BF,8CAA8C;AAC9C,MAAM,WAAW,uBAAuB;IACvC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,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`, [
|
|
@@ -133,36 +152,55 @@ export const query_create_account_with_actor = async (deps, input) => {
|
|
|
133
152
|
return { account, actor };
|
|
134
153
|
};
|
|
135
154
|
/**
|
|
136
|
-
* List
|
|
137
|
-
*
|
|
155
|
+
* List accounts with their actors, active role_grants, and pending inbound
|
|
156
|
+
* role_grant offers for admin display.
|
|
138
157
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
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).
|
|
143
166
|
*
|
|
144
167
|
* @param deps - query dependencies
|
|
145
|
-
* @
|
|
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)
|
|
146
171
|
*/
|
|
147
|
-
export const query_admin_account_list = async (deps) => {
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
deps.db.query(`SELECT
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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,
|
|
156
193
|
po.created_at, po.expires_at, a.username AS from_username
|
|
157
|
-
FROM
|
|
194
|
+
FROM role_grant_offer po
|
|
158
195
|
JOIN actor act ON act.id = po.from_actor_id
|
|
159
196
|
JOIN account a ON a.id = act.account_id
|
|
160
|
-
WHERE po.
|
|
197
|
+
WHERE po.to_account_id = ANY($1::uuid[])
|
|
198
|
+
AND po.accepted_at IS NULL
|
|
161
199
|
AND po.declined_at IS NULL
|
|
162
200
|
AND po.retracted_at IS NULL
|
|
163
201
|
AND po.superseded_at IS NULL
|
|
164
202
|
AND po.expires_at > NOW()
|
|
165
|
-
ORDER BY po.expires_at ASC
|
|
203
|
+
ORDER BY po.expires_at ASC`, [account_ids]),
|
|
166
204
|
]);
|
|
167
205
|
// Index actors by account_id. Multi-actor TODO: this Map keyed by
|
|
168
206
|
// account_id silently overwrites earlier actors when an account
|
|
@@ -175,15 +213,15 @@ export const query_admin_account_list = async (deps) => {
|
|
|
175
213
|
for (const actor of actors) {
|
|
176
214
|
actor_by_account.set(actor.account_id, actor);
|
|
177
215
|
}
|
|
178
|
-
// Group
|
|
179
|
-
const
|
|
180
|
-
for (const
|
|
181
|
-
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);
|
|
182
220
|
if (!list) {
|
|
183
221
|
list = [];
|
|
184
|
-
|
|
222
|
+
role_grants_by_actor.set(role_grant.actor_id, list);
|
|
185
223
|
}
|
|
186
|
-
list.push(
|
|
224
|
+
list.push(role_grant);
|
|
187
225
|
}
|
|
188
226
|
// Group pending offers by recipient account_id
|
|
189
227
|
const offers_by_account = new Map();
|
|
@@ -197,14 +235,15 @@ export const query_admin_account_list = async (deps) => {
|
|
|
197
235
|
}
|
|
198
236
|
return accounts.map((account) => {
|
|
199
237
|
const actor = actor_by_account.get(account.id);
|
|
200
|
-
const
|
|
238
|
+
const actor_role_grants = actor ? (role_grants_by_actor.get(actor.id) ?? []) : [];
|
|
201
239
|
const account_offers = offers_by_account.get(account.id) ?? [];
|
|
202
240
|
return {
|
|
203
241
|
account: to_admin_account(account),
|
|
204
242
|
actor: actor ? { id: actor.id, name: actor.name } : null,
|
|
205
|
-
|
|
243
|
+
role_grants: actor_role_grants.map((p) => ({
|
|
206
244
|
id: p.id,
|
|
207
245
|
role: p.role,
|
|
246
|
+
scope_kind: p.scope_kind,
|
|
208
247
|
scope_id: p.scope_id,
|
|
209
248
|
created_at: p.created_at,
|
|
210
249
|
expires_at: p.expires_at,
|
|
@@ -213,6 +252,7 @@ export const query_admin_account_list = async (deps) => {
|
|
|
213
252
|
pending_offers: account_offers.map((o) => ({
|
|
214
253
|
id: o.id,
|
|
215
254
|
role: o.role,
|
|
255
|
+
scope_kind: o.scope_kind,
|
|
216
256
|
scope_id: o.scope_id,
|
|
217
257
|
from_actor_id: o.from_actor_id,
|
|
218
258
|
from_username: o.from_username,
|
|
@@ -33,9 +33,9 @@ export type AccountStatusInput = z.infer<typeof AccountStatusInput>;
|
|
|
33
33
|
* Output for `GET /api/account/status` on the authenticated path.
|
|
34
34
|
*
|
|
35
35
|
* `account` is always populated for authenticated callers. `actor` and
|
|
36
|
-
* `
|
|
36
|
+
* `role_grants` are populated when the caller's account has a unique actor or
|
|
37
37
|
* the request supplies `?acting=<actor_id>`; on multi-actor accounts
|
|
38
|
-
* without an `acting` query, `actor` is `null` and `
|
|
38
|
+
* without an `acting` query, `actor` is `null` and `role_grants` is empty so
|
|
39
39
|
* the frontend can show a persona picker without a separate roundtrip.
|
|
40
40
|
*/
|
|
41
41
|
export declare const AccountStatusOutput: z.ZodObject<{
|
|
@@ -50,9 +50,10 @@ export declare const AccountStatusOutput: z.ZodObject<{
|
|
|
50
50
|
id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
51
51
|
name: z.ZodString;
|
|
52
52
|
}, z.core.$strict>>;
|
|
53
|
-
|
|
53
|
+
role_grants: z.ZodArray<z.ZodObject<{
|
|
54
54
|
id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
55
55
|
role: z.ZodString;
|
|
56
|
+
scope_kind: z.ZodNullable<z.ZodString>;
|
|
56
57
|
scope_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
57
58
|
created_at: z.ZodString;
|
|
58
59
|
expires_at: z.ZodNullable<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_routes.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"account_routes.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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