@fuzdev/fuz_app 0.162.0 → 0.164.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/README.md +2 -1
  2. package/dist/actions/action_event_data.d.ts +1 -1
  3. package/dist/actions/action_rpc.d.ts.map +1 -1
  4. package/dist/actions/action_rpc.js +4 -0
  5. package/dist/actions/action_spec.d.ts +3 -3
  6. package/dist/actions/action_spec.d.ts.map +1 -1
  7. package/dist/auth/CLAUDE.md +39 -36
  8. package/dist/auth/account_action_specs.d.ts +441 -115
  9. package/dist/auth/account_action_specs.d.ts.map +1 -1
  10. package/dist/auth/account_action_specs.js +47 -46
  11. package/dist/auth/account_route_schema.d.ts +98 -62
  12. package/dist/auth/account_route_schema.d.ts.map +1 -1
  13. package/dist/auth/account_route_schema.js +45 -45
  14. package/dist/auth/account_routes.js +1 -1
  15. package/dist/auth/account_schema.d.ts +54 -27
  16. package/dist/auth/account_schema.d.ts.map +1 -1
  17. package/dist/auth/account_schema.js +16 -18
  18. package/dist/auth/admin_action_specs.d.ts +76 -76
  19. package/dist/auth/admin_action_specs.js +2 -4
  20. package/dist/auth/admin_actions.d.ts +4 -4
  21. package/dist/auth/admin_actions.d.ts.map +1 -1
  22. package/dist/auth/admin_actions.js +3 -3
  23. package/dist/auth/all_cell_actions.d.ts +3 -3
  24. package/dist/auth/all_cell_actions.d.ts.map +1 -1
  25. package/dist/auth/all_cell_actions.js +1 -1
  26. package/dist/auth/api_token.d.ts +4 -4
  27. package/dist/auth/api_token.d.ts.map +1 -1
  28. package/dist/auth/api_token.js +3 -3
  29. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  30. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  31. package/dist/auth/audit_log_route_schema.js +4 -5
  32. package/dist/auth/audit_log_schema.d.ts +46 -66
  33. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  34. package/dist/auth/audit_log_schema.js +34 -30
  35. package/dist/auth/bootstrap_route_schema.d.ts +146 -52
  36. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  37. package/dist/auth/bootstrap_route_schema.js +33 -19
  38. package/dist/auth/cell_grant_action_specs.d.ts +1 -1
  39. package/dist/auth/cell_grant_action_specs.js +1 -1
  40. package/dist/auth/cell_grant_actions.d.ts +4 -4
  41. package/dist/auth/cell_grant_actions.d.ts.map +1 -1
  42. package/dist/auth/cell_grant_actions.js +1 -1
  43. package/dist/auth/credential_type_schema.d.ts +16 -29
  44. package/dist/auth/credential_type_schema.d.ts.map +1 -1
  45. package/dist/auth/credential_type_schema.js +14 -18
  46. package/dist/auth/daemon_token.d.ts +4 -4
  47. package/dist/auth/daemon_token.d.ts.map +1 -1
  48. package/dist/auth/daemon_token.js +3 -3
  49. package/dist/auth/daemon_token_middleware.d.ts +1 -1
  50. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  51. package/dist/auth/daemon_token_middleware.js +5 -5
  52. package/dist/auth/grant_path_schema.d.ts +15 -29
  53. package/dist/auth/grant_path_schema.d.ts.map +1 -1
  54. package/dist/auth/grant_path_schema.js +13 -17
  55. package/dist/auth/middleware.js +4 -4
  56. package/dist/auth/migrations.js +1 -1
  57. package/dist/auth/name_schema.d.ts +7 -6
  58. package/dist/auth/name_schema.d.ts.map +1 -1
  59. package/dist/auth/name_schema.js +8 -9
  60. package/dist/auth/password.d.ts +15 -7
  61. package/dist/auth/password.d.ts.map +1 -1
  62. package/dist/auth/password.js +16 -9
  63. package/dist/auth/role_grant_offer_action_specs.d.ts +2 -2
  64. package/dist/auth/role_grant_offer_action_specs.js +2 -2
  65. package/dist/auth/role_grant_offer_actions.d.ts +4 -4
  66. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  67. package/dist/auth/role_grant_offer_actions.js +3 -3
  68. package/dist/auth/role_grant_offer_notifications.js +2 -2
  69. package/dist/auth/role_grant_offer_schema.d.ts +2 -2
  70. package/dist/auth/role_grant_offer_schema.js +2 -2
  71. package/dist/auth/role_schema.d.ts +47 -55
  72. package/dist/auth/role_schema.d.ts.map +1 -1
  73. package/dist/auth/role_schema.js +29 -35
  74. package/dist/auth/scope_kind_schema.d.ts +22 -26
  75. package/dist/auth/scope_kind_schema.d.ts.map +1 -1
  76. package/dist/auth/scope_kind_schema.js +19 -19
  77. package/dist/auth/self_service_role_action_specs.js +1 -1
  78. package/dist/auth/self_service_role_actions.d.ts +6 -6
  79. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  80. package/dist/auth/self_service_role_actions.js +7 -6
  81. package/dist/auth/signup_route_schema.d.ts +71 -21
  82. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  83. package/dist/auth/signup_route_schema.js +17 -19
  84. package/dist/auth/standard_rpc_actions.d.ts +1 -1
  85. package/dist/auth/standard_rpc_actions.js +1 -1
  86. package/dist/auth/token_lifetime.d.ts +33 -9
  87. package/dist/auth/token_lifetime.d.ts.map +1 -1
  88. package/dist/auth/token_lifetime.js +8 -7
  89. package/dist/auth/token_scope.d.ts +99 -25
  90. package/dist/auth/token_scope.d.ts.map +1 -1
  91. package/dist/auth/token_scope.js +57 -35
  92. package/dist/db/CLAUDE.md +2 -1
  93. package/dist/db/file_fact_url.d.ts +11 -6
  94. package/dist/db/file_fact_url.d.ts.map +1 -1
  95. package/dist/db/file_fact_url.js +5 -5
  96. package/dist/db/schema_ready.d.ts +0 -5
  97. package/dist/db/schema_ready.d.ts.map +1 -1
  98. package/dist/db/schema_ready.js +0 -5
  99. package/dist/http/CLAUDE.md +104 -71
  100. package/dist/http/auth_shape.d.ts +48 -29
  101. package/dist/http/auth_shape.d.ts.map +1 -1
  102. package/dist/http/auth_shape.js +12 -85
  103. package/dist/http/body_limit.d.ts +12 -0
  104. package/dist/http/body_limit.d.ts.map +1 -1
  105. package/dist/http/body_limit.js +15 -0
  106. package/dist/http/body_limit_schema.d.ts +20 -0
  107. package/dist/http/body_limit_schema.d.ts.map +1 -0
  108. package/dist/http/body_limit_schema.js +20 -0
  109. package/dist/http/common_routes.d.ts +1 -1
  110. package/dist/http/common_routes.d.ts.map +1 -1
  111. package/dist/http/common_routes.js +11 -14
  112. package/dist/http/db_routes.d.ts.map +1 -1
  113. package/dist/http/db_routes.js +59 -69
  114. package/dist/http/dev_route_error_check.d.ts +70 -0
  115. package/dist/http/dev_route_error_check.d.ts.map +1 -0
  116. package/dist/http/dev_route_error_check.js +119 -0
  117. package/dist/http/error_schemas.d.ts +365 -189
  118. package/dist/http/error_schemas.d.ts.map +1 -1
  119. package/dist/http/error_schemas.js +256 -149
  120. package/dist/http/health_schema.d.ts +10 -6
  121. package/dist/http/health_schema.d.ts.map +1 -1
  122. package/dist/http/health_schema.js +3 -3
  123. package/dist/http/middleware_spec.d.ts +8 -3
  124. package/dist/http/middleware_spec.d.ts.map +1 -1
  125. package/dist/http/origin.d.ts +12 -43
  126. package/dist/http/origin.d.ts.map +1 -1
  127. package/dist/http/origin.js +10 -6
  128. package/dist/http/route_error_check.d.ts +158 -0
  129. package/dist/http/route_error_check.d.ts.map +1 -0
  130. package/dist/http/route_error_check.js +247 -0
  131. package/dist/http/route_errors.d.ts +80 -0
  132. package/dist/http/route_errors.d.ts.map +1 -0
  133. package/dist/http/route_errors.js +83 -0
  134. package/dist/http/route_spec.d.ts +33 -17
  135. package/dist/http/route_spec.d.ts.map +1 -1
  136. package/dist/http/route_spec.js +48 -62
  137. package/dist/http/schema_helpers.d.ts +0 -33
  138. package/dist/http/schema_helpers.d.ts.map +1 -1
  139. package/dist/http/schema_helpers.js +0 -45
  140. package/dist/http/surface.d.ts +19 -12
  141. package/dist/http/surface.d.ts.map +1 -1
  142. package/dist/http/surface.js +25 -38
  143. package/dist/http/surface_query.d.ts +11 -2
  144. package/dist/http/surface_query.d.ts.map +1 -1
  145. package/dist/http/surface_query.js +7 -1
  146. package/dist/primitive_schemas.d.ts +2 -19
  147. package/dist/primitive_schemas.d.ts.map +1 -1
  148. package/dist/primitive_schemas.js +2 -20
  149. package/dist/primitive_schemas_fuz.d.ts +39 -5
  150. package/dist/primitive_schemas_fuz.d.ts.map +1 -1
  151. package/dist/primitive_schemas_fuz.js +36 -7
  152. package/dist/rate_limiter.d.ts +13 -0
  153. package/dist/rate_limiter.d.ts.map +1 -1
  154. package/dist/rate_limiter.js +20 -2
  155. package/dist/schema_issues.d.ts +29 -11
  156. package/dist/schema_issues.d.ts.map +1 -1
  157. package/dist/schema_issues.js +11 -10
  158. package/dist/schema_meta.d.ts +8 -1
  159. package/dist/schema_meta.d.ts.map +1 -1
  160. package/dist/schema_meta.js +2 -1
  161. package/dist/server/app_server.d.ts +3 -1
  162. package/dist/server/app_server.d.ts.map +1 -1
  163. package/dist/server/app_server.js +24 -10
  164. package/dist/server/serve_fact_route.d.ts.map +1 -1
  165. package/dist/server/serve_fact_route.js +8 -31
  166. package/dist/server/surface_route.d.ts.map +1 -1
  167. package/dist/server/surface_route.js +5 -6
  168. package/dist/server/x_accel.d.ts +12 -7
  169. package/dist/server/x_accel.d.ts.map +1 -1
  170. package/dist/server/x_accel.js +7 -9
  171. package/dist/testing/CLAUDE.md +55 -44
  172. package/dist/testing/admin_integration.d.ts +3 -3
  173. package/dist/testing/admin_integration.d.ts.map +1 -1
  174. package/dist/testing/admin_integration.js +2 -2
  175. package/dist/testing/adversarial_404.d.ts +4 -18
  176. package/dist/testing/adversarial_404.d.ts.map +1 -1
  177. package/dist/testing/adversarial_404.js +19 -51
  178. package/dist/testing/adversarial_headers.d.ts +3 -4
  179. package/dist/testing/adversarial_headers.d.ts.map +1 -1
  180. package/dist/testing/adversarial_headers.js +8 -6
  181. package/dist/testing/adversarial_input.d.ts.map +1 -1
  182. package/dist/testing/adversarial_input.js +18 -17
  183. package/dist/testing/assertions.d.ts +33 -11
  184. package/dist/testing/assertions.d.ts.map +1 -1
  185. package/dist/testing/assertions.js +52 -12
  186. package/dist/testing/attack_surface.d.ts +5 -35
  187. package/dist/testing/attack_surface.d.ts.map +1 -1
  188. package/dist/testing/attack_surface.js +29 -91
  189. package/dist/testing/auth_apps.d.ts.map +1 -1
  190. package/dist/testing/auth_apps.js +2 -1
  191. package/dist/testing/cross_backend/action_manifest.d.ts +126 -56
  192. package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
  193. package/dist/testing/cross_backend/action_manifest.js +11 -11
  194. package/dist/testing/cross_backend/action_manifest_parity.d.ts +1 -1
  195. package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
  196. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  197. package/dist/testing/cross_backend/cell_crud.js +2 -1
  198. package/dist/testing/cross_backend/conformance_table.js +1 -1
  199. package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
  200. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  201. package/dist/testing/cross_backend/default_spine_surface.js +2 -2
  202. package/dist/testing/cross_backend/fact_serving.js +3 -3
  203. package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
  204. package/dist/testing/cross_backend/identity_parity.js +39 -6
  205. package/dist/testing/cross_backend/origin_conformance.d.ts +278 -102
  206. package/dist/testing/cross_backend/origin_conformance.d.ts.map +1 -1
  207. package/dist/testing/cross_backend/origin_conformance.js +21 -21
  208. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -3
  209. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  210. package/dist/testing/cross_backend/rust_spine_consumer_surface.js +7 -1
  211. package/dist/testing/cross_backend/setup.d.ts +14 -1
  212. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  213. package/dist/testing/cross_backend/setup.js +68 -48
  214. package/dist/testing/cross_backend/spine_suites.d.ts +3 -3
  215. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  216. package/dist/testing/cross_backend/standard.d.ts +4 -4
  217. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  218. package/dist/testing/cross_backend/testing_origin_check.d.ts +147 -71
  219. package/dist/testing/cross_backend/testing_origin_check.d.ts.map +1 -1
  220. package/dist/testing/cross_backend/testing_origin_check.js +16 -13
  221. package/dist/testing/cross_backend/testing_reset_actions.d.ts +70 -27
  222. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  223. package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
  224. package/dist/testing/cross_backend/token_lifetime.js +34 -1
  225. package/dist/testing/data_exposure.d.ts.map +1 -1
  226. package/dist/testing/data_exposure.js +5 -4
  227. package/dist/testing/error_coverage.d.ts +24 -34
  228. package/dist/testing/error_coverage.d.ts.map +1 -1
  229. package/dist/testing/error_coverage.js +46 -89
  230. package/dist/testing/integration.d.ts.map +1 -1
  231. package/dist/testing/integration.js +6 -14
  232. package/dist/testing/integration_helpers.d.ts +37 -9
  233. package/dist/testing/integration_helpers.d.ts.map +1 -1
  234. package/dist/testing/integration_helpers.js +86 -40
  235. package/dist/testing/middleware.d.ts +3 -5
  236. package/dist/testing/middleware.d.ts.map +1 -1
  237. package/dist/testing/middleware.js +5 -4
  238. package/dist/testing/rate_limiting.d.ts +1 -1
  239. package/dist/testing/rate_limiting.d.ts.map +1 -1
  240. package/dist/testing/rate_limiting.js +5 -4
  241. package/dist/testing/round_trip.d.ts.map +1 -1
  242. package/dist/testing/round_trip.js +5 -3
  243. package/dist/testing/schema_generators.d.ts +10 -3
  244. package/dist/testing/schema_generators.d.ts.map +1 -1
  245. package/dist/testing/schema_generators.js +23 -11
  246. package/dist/testing/stubs.d.ts +10 -1
  247. package/dist/testing/stubs.d.ts.map +1 -1
  248. package/dist/testing/stubs.js +15 -5
  249. package/dist/testing/surface_invariants.d.ts +36 -115
  250. package/dist/testing/surface_invariants.d.ts.map +1 -1
  251. package/dist/testing/surface_invariants.js +106 -269
  252. package/dist/testing/token_scope_fixtures.d.ts +24 -0
  253. package/dist/testing/token_scope_fixtures.d.ts.map +1 -0
  254. package/dist/testing/token_scope_fixtures.js +49 -0
  255. package/dist/testing/transports/bootstrap.d.ts +1 -1
  256. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  257. package/dist/testing/transports/bootstrap.js +13 -12
  258. package/dist/ui/BootstrapForm.svelte +4 -2
  259. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  260. package/dist/ui/CLAUDE.md +4 -2
  261. package/dist/ui/SignupForm.svelte +4 -2
  262. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  263. package/dist/ui/auth_state.svelte.d.ts.map +1 -1
  264. package/dist/ui/auth_state.svelte.js +2 -8
  265. package/dist/ui/backend_probe.svelte.js +3 -3
  266. package/dist/ui/table_state.svelte.d.ts.map +1 -1
  267. package/dist/ui/table_state.svelte.js +1 -8
  268. package/dist/ui/ui_fetch.d.ts +12 -2
  269. package/dist/ui/ui_fetch.d.ts.map +1 -1
  270. package/dist/ui/ui_fetch.js +22 -4
  271. package/package.json +1 -1
  272. package/dist/auth/audit_log_schema_fuz.d.ts +0 -53
  273. package/dist/auth/audit_log_schema_fuz.d.ts.map +0 -1
  274. package/dist/auth/audit_log_schema_fuz.js +0 -50
  275. package/dist/auth/role_schema_fuz.d.ts +0 -30
  276. package/dist/auth/role_schema_fuz.d.ts.map +0 -1
  277. package/dist/auth/role_schema_fuz.js +0 -30
  278. package/dist/auth/scope_kind_schema_fuz.d.ts +0 -31
  279. package/dist/auth/scope_kind_schema_fuz.d.ts.map +0 -1
  280. package/dist/auth/scope_kind_schema_fuz.js +0 -31
@@ -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,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAQN,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAMtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAW3E,6EAA6E;AAC7E,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,MAAM,MAAM,WAA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,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIhE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUF,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUR,CAAC;AAKtC,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUV,CAAC;AAGtC,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEtC;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWR,CAAC;AAEtC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUN,CAAC;AAGtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUR,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,yBAAyB,CAQrE,CAAC"}
@@ -7,19 +7,18 @@
7
7
  *
8
8
  * @module
9
9
  */
10
- import { z } from 'zod';
11
10
  import { meta } from '@fuzdev/fuz_schema/meta.ts';
12
- import { array, boolean, literal, object, pipe, regex, string } from '@fuzdev/fuz_schema/schema.ts';
13
- import { bounded_string } from '../primitive_schemas.js';
11
+ import { array, boolean, integer, literal, min_value, nullable, number, object, pipe, string, void as fuz_void, with_default } from '@fuzdev/fuz_schema/schema.ts';
12
+ import { bounded_string, Timestamp } from '../primitive_schemas_fuz.js';
14
13
  import { TokenScopeInput } from './token_scope.js';
15
14
  import { TokenLifetimeInput } from './token_lifetime.js';
16
15
  import { AuthSessionJson, ClientApiTokenJson, SessionAccountJson, SessionId } from './account_schema.js';
17
- import { API_TOKEN_ID_REGEX, ApiTokenId } from './api_token.js';
16
+ import { ApiTokenId } from './api_token.js';
18
17
  // -- Input/output schemas ---------------------------------------------------
19
- /** Input for `account_verify`. No parameters — the caller is the subject. */
20
- export const VerifyInput = z.void();
21
- /** Input for `account_session_list`. No parameters. */
22
- export const SessionListInput = z.void();
18
+ /** Input for `account_verify`, fuz_schema's `void`. No parameters — the caller is the subject. */
19
+ export const VerifyInput = fuz_void;
20
+ /** Input for `account_session_list`, fuz_schema's `void`. No parameters. */
21
+ export const SessionListInput = fuz_void;
23
22
  /** Output for `account_session_list`, a `@fuzdev/fuz_schema` schema. */
24
23
  export const SessionListOutput = object({
25
24
  sessions: array(AuthSessionJson)
@@ -31,17 +30,23 @@ export const SessionListOutput = object({
31
30
  export const SessionRevokeInput = object({
32
31
  session_id: meta(SessionId, { description: 'Session id (blake3 hash) to revoke.' })
33
32
  });
34
- /** Output for `account_session_revoke`. `revoked` is `false` for IDOR misses. */
35
- export const SessionRevokeOutput = z.strictObject({
36
- ok: z.literal(true),
37
- revoked: z.boolean()
33
+ /**
34
+ * Output for `account_session_revoke`, a `@fuzdev/fuz_schema` schema.
35
+ * `revoked` is `false` for IDOR misses.
36
+ */
37
+ export const SessionRevokeOutput = object({
38
+ ok: literal(true),
39
+ revoked: boolean
38
40
  });
39
- /** Input for `account_session_revoke_all`. No parameters. */
40
- export const SessionRevokeAllInput = z.void();
41
- /** Output for `account_session_revoke_all`. */
42
- export const SessionRevokeAllOutput = z.strictObject({
43
- ok: z.literal(true),
44
- count: z.number()
41
+ /** Input for `account_session_revoke_all`, fuz_schema's `void`. No parameters. */
42
+ export const SessionRevokeAllInput = fuz_void;
43
+ /**
44
+ * Output for `account_session_revoke_all`, a `@fuzdev/fuz_schema` schema.
45
+ * `count` is the number of sessions revoked.
46
+ */
47
+ export const SessionRevokeAllOutput = object({
48
+ ok: literal(true),
49
+ count: pipe(number, integer, min_value(0))
45
50
  });
46
51
  /**
47
52
  * Maximum length of an API token's `name`, in UTF-16 code units (what
@@ -63,61 +68,57 @@ export const ERROR_TOKEN_SCOPE_INVALID = 'token_scope_invalid';
63
68
  */
64
69
  export const ERROR_TOKEN_LIFETIME_INVALID = 'token_lifetime_invalid';
65
70
  /**
66
- * Input for `account_token_create`.
71
+ * Input for `account_token_create`, a `@fuzdev/fuz_schema` schema.
67
72
  *
68
73
  * `scope` is **required** — default-deny at mint. There is deliberately no
69
74
  * permissive default: a caller who wants full authority spells
70
75
  * `{kind: 'full'}`, and the stored document records that they did. That is the
71
76
  * reversal of the 2026-02 design, where the field existed but nothing depended
72
- * on it. Because `scope` has no default, the object as a whole no longer
73
- * carries `.prefault({})`.
77
+ * on it. Because `scope` has no default, the object as a whole has none.
74
78
  *
75
79
  * `lifetime` follows the same rule — a never-expiring token is
76
80
  * `{kind: 'eternal'}`, spelled out, so `expires_at IS NULL` always means
77
81
  * "deliberately eternal" (see `auth/token_lifetime.ts`).
78
82
  */
79
- export const TokenCreateInput = z.strictObject({
80
- name: bounded_string({ max: API_TOKEN_NAME_LENGTH_MAX })
81
- .default('CLI token')
82
- .meta({
83
+ export const TokenCreateInput = object({
84
+ name: meta(with_default(bounded_string({ max: API_TOKEN_NAME_LENGTH_MAX }), 'CLI token'), {
83
85
  description: `Human-friendly label; shown in the token list. At most ${API_TOKEN_NAME_LENGTH_MAX} characters.`
84
86
  }),
85
- scope: TokenScopeInput.meta({
87
+ scope: meta(TokenScopeInput, {
86
88
  description: "What the token may do. `{kind:'full'}` for full account authority, or " +
87
89
  "`{kind:'methods',methods:[…]}` to narrow it to named RPC methods — a " +
88
90
  'narrowed token is RPC-only and reaches no non-RPC surface that reads ' +
89
91
  'account data or carries authority.',
90
92
  invalid_reason: ERROR_TOKEN_SCOPE_INVALID
91
93
  }),
92
- lifetime: TokenLifetimeInput.meta({
94
+ lifetime: meta(TokenLifetimeInput, {
93
95
  description: "How long the token lives. `{kind:'eternal'}` never expires; " +
94
96
  "`{kind:'ttl',days:N}` expires N days from mint.",
95
97
  invalid_reason: ERROR_TOKEN_LIFETIME_INVALID
96
98
  })
97
99
  });
98
- /** Output for `account_token_create`. `token` is returned exactly once. */
99
- export const TokenCreateOutput = z.strictObject({
100
- ok: z.literal(true),
101
- token: z.string().meta({ description: 'Raw token — shown once, store securely.' }),
100
+ /**
101
+ * Output for `account_token_create`, a `@fuzdev/fuz_schema` schema. `token`
102
+ * is returned exactly once.
103
+ */
104
+ export const TokenCreateOutput = object({
105
+ ok: literal(true),
106
+ token: meta(string, { description: 'Raw token — shown once, store securely.' }),
102
107
  id: ApiTokenId,
103
- name: z.string(),
104
- expires_at: z
105
- .string()
106
- .nullable()
107
- .meta({ description: 'ISO 8601 expiry, or `null` for an eternal token.' })
108
+ name: string,
109
+ expires_at: meta(nullable(Timestamp), {
110
+ description: 'ISO 8601 expiry, or `null` for an eternal token.'
111
+ })
108
112
  });
109
- /** Input for `account_token_list`. No parameters. */
110
- export const TokenListInput = z.void();
111
- /** Output for `account_token_list`. Hashes are excluded. */
112
- export const TokenListOutput = z.strictObject({
113
- tokens: z.array(ClientApiTokenJson)
113
+ /** Input for `account_token_list`, fuz_schema's `void`. No parameters. */
114
+ export const TokenListInput = fuz_void;
115
+ /** Output for `account_token_list`, a `@fuzdev/fuz_schema` schema. Hashes are excluded. */
116
+ export const TokenListOutput = object({
117
+ tokens: array(ClientApiTokenJson)
114
118
  });
115
- /**
116
- * Input for `account_token_revoke`, a `@fuzdev/fuz_schema` schema. Its
117
- * `token_id` is `ApiTokenId`'s check written inline, as `ApiTokenId` is Zod.
118
- */
119
+ /** Input for `account_token_revoke`, a `@fuzdev/fuz_schema` schema. */
119
120
  export const TokenRevokeInput = object({
120
- token_id: meta(pipe(string, regex(API_TOKEN_ID_REGEX)), {
121
+ token_id: meta(ApiTokenId, {
121
122
  description: 'Public API token id (e.g. `tok_<12 chars>`).'
122
123
  })
123
124
  });
@@ -11,12 +11,11 @@
11
11
  *
12
12
  * @module
13
13
  */
14
- import { z } from 'zod';
15
14
  import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
16
15
  import type { RouteSpec } from '../http/route_spec.js';
17
- /** Input for `GET /api/account/status`. No parameters — caller is the subject. */
18
- export declare const AccountStatusInput: z.ZodNull;
19
- export type AccountStatusInput = z.infer<typeof AccountStatusInput>;
16
+ /** Input for `GET /api/account/status`, `literal(null)`. No parameters — caller is the subject. */
17
+ export declare const AccountStatusInput: import("@fuzdev/fuz_schema/schema.ts").Schema<null, null, "literal", null>;
18
+ export type AccountStatusInput = Infer<typeof AccountStatusInput>;
20
19
  /** Output for `GET /api/account/status`, a `@fuzdev/fuz_schema` schema. */
21
20
  export declare const AccountStatusOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
22
21
  account: {
@@ -27,8 +26,8 @@ export declare const AccountStatusOutput: import("@fuzdev/fuz_schema/schema.ts")
27
26
  email_verified: boolean;
28
27
  };
29
28
  actor: {
30
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
31
29
  name: string;
30
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
32
31
  } | null;
33
32
  role_grants: {
34
33
  id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
@@ -48,8 +47,8 @@ export declare const AccountStatusOutput: import("@fuzdev/fuz_schema/schema.ts")
48
47
  email_verified: boolean;
49
48
  };
50
49
  actor: {
51
- id: string;
52
50
  name: string;
51
+ id: string;
53
52
  } | null;
54
53
  role_grants: {
55
54
  id: string;
@@ -86,17 +85,17 @@ export declare const AccountStatusOutput: import("@fuzdev/fuz_schema/schema.ts")
86
85
  created_at: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
87
86
  }>;
88
87
  actor: import("@fuzdev/fuz_schema/schema.ts").Schema<{
89
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
90
88
  name: string;
89
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
91
90
  } | null, {
92
- id: string;
93
91
  name: string;
92
+ id: string;
94
93
  } | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<{
95
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
96
94
  name: string;
95
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
97
96
  }, {
98
- id: string;
99
97
  name: string;
98
+ id: string;
100
99
  }, "object", {
101
100
  id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
102
101
  readonly '~types'?: {
@@ -164,45 +163,85 @@ export declare const AccountStatusOutput: import("@fuzdev/fuz_schema/schema.ts")
164
163
  }>>;
165
164
  }>;
166
165
  export type AccountStatusOutput = Infer<typeof AccountStatusOutput>;
167
- /** Error body for `GET /api/account/status` on the unauthenticated path. */
168
- export declare const AccountStatusUnauthenticatedError: z.ZodObject<{
169
- error: z.ZodLiteral<"authentication_required">;
170
- bootstrap_available: z.ZodOptional<z.ZodBoolean>;
171
- }, z.core.$loose>;
172
- export type AccountStatusUnauthenticatedError = z.infer<typeof AccountStatusUnauthenticatedError>;
173
- /** Input for `POST /login`. Accepts a username or email in the `username` field. */
174
- export declare const LoginInput: z.ZodObject<{
175
- username: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
176
- password: z.ZodString;
177
- }, z.core.$strict>;
178
- export type LoginInput = z.infer<typeof LoginInput>;
179
- /** Output for `POST /login`. Session cookie is the operative side effect. */
180
- export declare const LoginOutput: z.ZodObject<{
181
- ok: z.ZodLiteral<true>;
182
- }, z.core.$strict>;
183
- export type LoginOutput = z.infer<typeof LoginOutput>;
184
- /** Input for `POST /logout`. Session identity flows through the cookie. */
185
- export declare const LogoutInput: z.ZodNull;
186
- export type LogoutInput = z.infer<typeof LogoutInput>;
187
- /** Output for `POST /logout`. Includes the revoked account's username for UI redraw. */
188
- export declare const LogoutOutput: z.ZodObject<{
189
- ok: z.ZodLiteral<true>;
190
- username: z.ZodString;
191
- }, z.core.$strict>;
192
- export type LogoutOutput = z.infer<typeof LogoutOutput>;
193
- /** Input for `POST /password`. `current_password` is minimally validated; `new_password` enforces the full policy. */
194
- export declare const PasswordChangeInput: z.ZodObject<{
195
- current_password: z.ZodString;
196
- new_password: z.ZodString;
197
- }, z.core.$strict>;
198
- export type PasswordChangeInput = z.infer<typeof PasswordChangeInput>;
199
- /** Output for `POST /password`. Counts are returned so the UI can summarize the revoke-all cascade. */
200
- export declare const PasswordChangeOutput: z.ZodObject<{
201
- ok: z.ZodLiteral<true>;
202
- sessions_revoked: z.ZodNumber;
203
- tokens_revoked: z.ZodNumber;
204
- }, z.core.$strict>;
205
- export type PasswordChangeOutput = z.infer<typeof PasswordChangeOutput>;
166
+ /**
167
+ * Input for `POST /login`, a `@fuzdev/fuz_schema` schema. Accepts a username
168
+ * or email in the `username` field.
169
+ */
170
+ export declare const LoginInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
171
+ username: string;
172
+ password: string;
173
+ }, {
174
+ username: string;
175
+ password: string;
176
+ }, "object", {
177
+ username: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
178
+ password: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
179
+ }>;
180
+ export type LoginInput = Infer<typeof LoginInput>;
181
+ /**
182
+ * Output for `POST /login`, a `@fuzdev/fuz_schema` schema. Session cookie is
183
+ * the operative side effect.
184
+ */
185
+ export declare const LoginOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
186
+ ok: true;
187
+ }, {
188
+ ok: true;
189
+ }, "object", {
190
+ ok: import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>;
191
+ }>;
192
+ export type LoginOutput = Infer<typeof LoginOutput>;
193
+ /** Input for `POST /logout`, `literal(null)`. Session identity flows through the cookie. */
194
+ export declare const LogoutInput: import("@fuzdev/fuz_schema/schema.ts").Schema<null, null, "literal", null>;
195
+ export type LogoutInput = Infer<typeof LogoutInput>;
196
+ /**
197
+ * Output for `POST /logout`, a `@fuzdev/fuz_schema` schema. Includes the
198
+ * revoked account's username for UI redraw, as the account row holds it.
199
+ */
200
+ export declare const LogoutOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
201
+ username: string;
202
+ ok: true;
203
+ }, {
204
+ username: string;
205
+ ok: true;
206
+ }, "object", {
207
+ ok: import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>;
208
+ username: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
209
+ }>;
210
+ export type LogoutOutput = Infer<typeof LogoutOutput>;
211
+ /**
212
+ * Input for `POST /password`, a `@fuzdev/fuz_schema` schema.
213
+ * `current_password` is minimally validated; `new_password` enforces the full
214
+ * policy.
215
+ */
216
+ export declare const PasswordChangeInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
217
+ current_password: string;
218
+ new_password: string;
219
+ }, {
220
+ current_password: string;
221
+ new_password: string;
222
+ }, "object", {
223
+ current_password: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
224
+ new_password: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
225
+ }>;
226
+ export type PasswordChangeInput = Infer<typeof PasswordChangeInput>;
227
+ /**
228
+ * Output for `POST /password`, a `@fuzdev/fuz_schema` schema. Counts are
229
+ * returned so the UI can summarize the revoke-all cascade.
230
+ */
231
+ export declare const PasswordChangeOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
232
+ sessions_revoked: number;
233
+ tokens_revoked: number;
234
+ ok: true;
235
+ }, {
236
+ sessions_revoked: number;
237
+ tokens_revoked: number;
238
+ ok: true;
239
+ }, "object", {
240
+ ok: import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>;
241
+ sessions_revoked: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<number, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>>;
242
+ tokens_revoked: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<number, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>>;
243
+ }>;
244
+ export type PasswordChangeOutput = Infer<typeof PasswordChangeOutput>;
206
245
  /**
207
246
  * Default maximum sessions per account.
208
247
  *
@@ -237,7 +276,7 @@ export declare const account_status_route_shape: {
237
276
  };
238
277
  reads_credential: true;
239
278
  description: string;
240
- input: z.ZodNull;
279
+ input: import("@fuzdev/fuz_schema/schema.ts").Schema<null, null, "literal", null>;
241
280
  output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
242
281
  account: {
243
282
  email: string | null;
@@ -247,8 +286,8 @@ export declare const account_status_route_shape: {
247
286
  email_verified: boolean;
248
287
  };
249
288
  actor: {
250
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
251
289
  name: string;
290
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
252
291
  } | null;
253
292
  role_grants: {
254
293
  id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
@@ -268,8 +307,8 @@ export declare const account_status_route_shape: {
268
307
  email_verified: boolean;
269
308
  };
270
309
  actor: {
271
- id: string;
272
310
  name: string;
311
+ id: string;
273
312
  } | null;
274
313
  role_grants: {
275
314
  id: string;
@@ -306,17 +345,17 @@ export declare const account_status_route_shape: {
306
345
  created_at: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
307
346
  }>;
308
347
  actor: import("@fuzdev/fuz_schema/schema.ts").Schema<{
309
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
310
348
  name: string;
349
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
311
350
  } | null, {
312
- id: string;
313
351
  name: string;
352
+ id: string;
314
353
  } | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<{
315
- id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
316
354
  name: string;
355
+ id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
317
356
  }, {
318
- id: string;
319
357
  name: string;
358
+ id: string;
320
359
  }, "object", {
321
360
  id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">, string, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
322
361
  readonly '~types'?: {
@@ -383,12 +422,9 @@ export declare const account_status_route_shape: {
383
422
  }>>;
384
423
  }>>;
385
424
  }>;
386
- errors: {
387
- 401: z.ZodObject<{
388
- error: z.ZodLiteral<"authentication_required">;
389
- bootstrap_available: z.ZodOptional<z.ZodBoolean>;
390
- }, z.core.$loose>;
391
- };
425
+ errors: import("../http/error_schemas.js").RestErrorDef<401, "authentication_required", {
426
+ readonly bootstrap_available: import("@fuzdev/fuz_schema/schema.ts").Schema<boolean | undefined, boolean | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<boolean, boolean, "boolean", undefined>>>;
427
+ }>[];
392
428
  };
393
429
  /** Option inputs that shape the account route metadata (not its handlers). */
394
430
  export interface AccountRouteShapeOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"account_route_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_route_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQvD,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9B,CAAC;AACH,MA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,CACF,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CA6D1B,CAAC"}
@@ -11,51 +11,61 @@
11
11
  *
12
12
  * @module
13
13
  */
14
- import { z } from 'zod';
15
- import { array, nullable, object } from '@fuzdev/fuz_schema/schema.ts';
14
+ import { array, integer, literal, min_value, nullable, number, object, pipe } from '@fuzdev/fuz_schema/schema.ts';
16
15
  import { ActorSummaryJson, RoleGrantSummaryJson, SessionAccountJson } from './account_schema.js';
17
- import { UsernameProvided } from '../primitive_schemas.js';
16
+ import { UsernameCanonical, UsernameProvided } from '../primitive_schemas_fuz.js';
18
17
  import { Password, PasswordProvided } from './password.js';
19
- import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INVALID_CREDENTIALS, ERROR_INVALID_JSON_BODY, ERROR_INVALID_REQUEST_BODY } from '../http/error_schemas.js';
20
- /** Input for `GET /api/account/status`. No parameters — caller is the subject. */
21
- export const AccountStatusInput = z.null();
18
+ import { REST_AUTHENTICATION_REQUIRED_BOOTSTRAP, REST_INVALID_CREDENTIALS } from '../http/error_schemas.js';
19
+ /** Input for `GET /api/account/status`, `literal(null)`. No parameters — caller is the subject. */
20
+ export const AccountStatusInput = literal(null);
22
21
  /** Output for `GET /api/account/status`, a `@fuzdev/fuz_schema` schema. */
23
22
  export const AccountStatusOutput = object({
24
23
  account: SessionAccountJson,
25
24
  actor: nullable(ActorSummaryJson),
26
25
  role_grants: array(RoleGrantSummaryJson)
27
26
  });
28
- /** Error body for `GET /api/account/status` on the unauthenticated path. */
29
- export const AccountStatusUnauthenticatedError = z.looseObject({
30
- error: z.literal(ERROR_AUTHENTICATION_REQUIRED),
31
- bootstrap_available: z.boolean().optional()
32
- });
33
- /** Input for `POST /login`. Accepts a username or email in the `username` field. */
34
- export const LoginInput = z.strictObject({
27
+ /**
28
+ * Input for `POST /login`, a `@fuzdev/fuz_schema` schema. Accepts a username
29
+ * or email in the `username` field.
30
+ */
31
+ export const LoginInput = object({
35
32
  username: UsernameProvided,
36
33
  password: PasswordProvided
37
34
  });
38
- /** Output for `POST /login`. Session cookie is the operative side effect. */
39
- export const LoginOutput = z.strictObject({
40
- ok: z.literal(true)
35
+ /**
36
+ * Output for `POST /login`, a `@fuzdev/fuz_schema` schema. Session cookie is
37
+ * the operative side effect.
38
+ */
39
+ export const LoginOutput = object({
40
+ ok: literal(true)
41
41
  });
42
- /** Input for `POST /logout`. Session identity flows through the cookie. */
43
- export const LogoutInput = z.null();
44
- /** Output for `POST /logout`. Includes the revoked account's username for UI redraw. */
45
- export const LogoutOutput = z.strictObject({
46
- ok: z.literal(true),
47
- username: z.string()
42
+ /** Input for `POST /logout`, `literal(null)`. Session identity flows through the cookie. */
43
+ export const LogoutInput = literal(null);
44
+ /**
45
+ * Output for `POST /logout`, a `@fuzdev/fuz_schema` schema. Includes the
46
+ * revoked account's username for UI redraw, as the account row holds it.
47
+ */
48
+ export const LogoutOutput = object({
49
+ ok: literal(true),
50
+ username: UsernameCanonical
48
51
  });
49
- /** Input for `POST /password`. `current_password` is minimally validated; `new_password` enforces the full policy. */
50
- export const PasswordChangeInput = z.strictObject({
52
+ /**
53
+ * Input for `POST /password`, a `@fuzdev/fuz_schema` schema.
54
+ * `current_password` is minimally validated; `new_password` enforces the full
55
+ * policy.
56
+ */
57
+ export const PasswordChangeInput = object({
51
58
  current_password: PasswordProvided,
52
59
  new_password: Password
53
60
  });
54
- /** Output for `POST /password`. Counts are returned so the UI can summarize the revoke-all cascade. */
55
- export const PasswordChangeOutput = z.strictObject({
56
- ok: z.literal(true),
57
- sessions_revoked: z.number(),
58
- tokens_revoked: z.number()
61
+ /**
62
+ * Output for `POST /password`, a `@fuzdev/fuz_schema` schema. Counts are
63
+ * returned so the UI can summarize the revoke-all cascade.
64
+ */
65
+ export const PasswordChangeOutput = object({
66
+ ok: literal(true),
67
+ sessions_revoked: pipe(number, integer, min_value(0)),
68
+ tokens_revoked: pipe(number, integer, min_value(0))
59
69
  });
60
70
  /**
61
71
  * Default maximum sessions per account.
@@ -92,9 +102,7 @@ export const account_status_route_shape = {
92
102
  description: 'Current account info (unauthenticated: 401 with bootstrap status)',
93
103
  input: AccountStatusInput,
94
104
  output: AccountStatusOutput,
95
- errors: {
96
- 401: AccountStatusUnauthenticatedError
97
- }
105
+ errors: [REST_AUTHENTICATION_REQUIRED_BOOTSTRAP]
98
106
  };
99
107
  /**
100
108
  * The four account route shapes (`/verify`, `/login`, `/logout`, `/password`)
@@ -119,8 +127,8 @@ export const create_account_route_shapes = (options) => [
119
127
  required_scope: 'surface:account_verify'
120
128
  },
121
129
  description: 'Session-validity probe for nginx auth_request (empty body; 200, 401, or 403 for a narrowed token)',
122
- input: z.null(),
123
- output: z.null()
130
+ input: literal(null),
131
+ output: literal(null)
124
132
  },
125
133
  {
126
134
  method: 'POST',
@@ -135,12 +143,7 @@ export const create_account_route_shapes = (options) => [
135
143
  // so a reservation waiting for a slot, and the Argon2 verify, hold no
136
144
  // database connection.
137
145
  transaction: false,
138
- errors: {
139
- 400: z.looseObject({
140
- error: z.enum([ERROR_INVALID_JSON_BODY, ERROR_INVALID_REQUEST_BODY])
141
- }),
142
- 401: z.looseObject({ error: z.literal(ERROR_INVALID_CREDENTIALS) })
143
- }
146
+ errors: [REST_INVALID_CREDENTIALS]
144
147
  },
145
148
  {
146
149
  method: 'POST',
@@ -167,10 +170,7 @@ export const create_account_route_shapes = (options) => [
167
170
  // and the revocations, so a reservation waiting for a slot, and the
168
171
  // Argon2 verify and hash, hold no database connection.
169
172
  transaction: false,
170
- errors: {
171
- 400: z.looseObject({
172
- error: z.enum([ERROR_INVALID_JSON_BODY, ERROR_INVALID_REQUEST_BODY])
173
- })
174
- }
173
+ // a wrong current password answers `invalid_credentials`, as login does
174
+ errors: [REST_INVALID_CREDENTIALS]
175
175
  }
176
176
  ];
@@ -227,7 +227,7 @@ export const create_account_route_specs = (deps, options) => {
227
227
  // parse time — the validated value lands canonical in
228
228
  // `c.var.validated_input`, so the per-account rate-limit key,
229
229
  // DB lookup, and audit metadata see one form. See
230
- // `primitive_schemas.ts` for the schema-layer canonicalization.
230
+ // `primitive_schemas_fuz.ts` for the schema-layer canonicalization.
231
231
  const { username, password: pw } = get_route_input(c);
232
232
  // DB lookup first so we can key the per-account rate limit by a canonical value
233
233
  // (account.id) rather than the submitted identifier. Otherwise an attacker could