@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.
- package/README.md +2 -1
- package/dist/actions/action_event_data.d.ts +1 -1
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +4 -0
- package/dist/actions/action_spec.d.ts +3 -3
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/auth/CLAUDE.md +39 -36
- package/dist/auth/account_action_specs.d.ts +441 -115
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +47 -46
- package/dist/auth/account_route_schema.d.ts +98 -62
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +45 -45
- package/dist/auth/account_routes.js +1 -1
- package/dist/auth/account_schema.d.ts +54 -27
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +16 -18
- package/dist/auth/admin_action_specs.d.ts +76 -76
- package/dist/auth/admin_action_specs.js +2 -4
- package/dist/auth/admin_actions.d.ts +4 -4
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +3 -3
- package/dist/auth/all_cell_actions.d.ts +3 -3
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +1 -1
- package/dist/auth/api_token.d.ts +4 -4
- package/dist/auth/api_token.d.ts.map +1 -1
- package/dist/auth/api_token.js +3 -3
- package/dist/auth/audit_log_route_schema.d.ts +1 -1
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +4 -5
- package/dist/auth/audit_log_schema.d.ts +46 -66
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +34 -30
- package/dist/auth/bootstrap_route_schema.d.ts +146 -52
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +33 -19
- package/dist/auth/cell_grant_action_specs.d.ts +1 -1
- package/dist/auth/cell_grant_action_specs.js +1 -1
- package/dist/auth/cell_grant_actions.d.ts +4 -4
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +1 -1
- package/dist/auth/credential_type_schema.d.ts +16 -29
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +14 -18
- package/dist/auth/daemon_token.d.ts +4 -4
- package/dist/auth/daemon_token.d.ts.map +1 -1
- package/dist/auth/daemon_token.js +3 -3
- package/dist/auth/daemon_token_middleware.d.ts +1 -1
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +5 -5
- package/dist/auth/grant_path_schema.d.ts +15 -29
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +13 -17
- package/dist/auth/middleware.js +4 -4
- package/dist/auth/migrations.js +1 -1
- package/dist/auth/name_schema.d.ts +7 -6
- package/dist/auth/name_schema.d.ts.map +1 -1
- package/dist/auth/name_schema.js +8 -9
- package/dist/auth/password.d.ts +15 -7
- package/dist/auth/password.d.ts.map +1 -1
- package/dist/auth/password.js +16 -9
- package/dist/auth/role_grant_offer_action_specs.d.ts +2 -2
- package/dist/auth/role_grant_offer_action_specs.js +2 -2
- package/dist/auth/role_grant_offer_actions.d.ts +4 -4
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +3 -3
- package/dist/auth/role_grant_offer_notifications.js +2 -2
- package/dist/auth/role_grant_offer_schema.d.ts +2 -2
- package/dist/auth/role_grant_offer_schema.js +2 -2
- package/dist/auth/role_schema.d.ts +47 -55
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +29 -35
- package/dist/auth/scope_kind_schema.d.ts +22 -26
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/scope_kind_schema.js +19 -19
- package/dist/auth/self_service_role_action_specs.js +1 -1
- package/dist/auth/self_service_role_actions.d.ts +6 -6
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +7 -6
- package/dist/auth/signup_route_schema.d.ts +71 -21
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +17 -19
- package/dist/auth/standard_rpc_actions.d.ts +1 -1
- package/dist/auth/standard_rpc_actions.js +1 -1
- package/dist/auth/token_lifetime.d.ts +33 -9
- package/dist/auth/token_lifetime.d.ts.map +1 -1
- package/dist/auth/token_lifetime.js +8 -7
- package/dist/auth/token_scope.d.ts +99 -25
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +57 -35
- package/dist/db/CLAUDE.md +2 -1
- package/dist/db/file_fact_url.d.ts +11 -6
- package/dist/db/file_fact_url.d.ts.map +1 -1
- package/dist/db/file_fact_url.js +5 -5
- package/dist/db/schema_ready.d.ts +0 -5
- package/dist/db/schema_ready.d.ts.map +1 -1
- package/dist/db/schema_ready.js +0 -5
- package/dist/http/CLAUDE.md +104 -71
- package/dist/http/auth_shape.d.ts +48 -29
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +12 -85
- package/dist/http/body_limit.d.ts +12 -0
- package/dist/http/body_limit.d.ts.map +1 -1
- package/dist/http/body_limit.js +15 -0
- package/dist/http/body_limit_schema.d.ts +20 -0
- package/dist/http/body_limit_schema.d.ts.map +1 -0
- package/dist/http/body_limit_schema.js +20 -0
- package/dist/http/common_routes.d.ts +1 -1
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +11 -14
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +59 -69
- package/dist/http/dev_route_error_check.d.ts +70 -0
- package/dist/http/dev_route_error_check.d.ts.map +1 -0
- package/dist/http/dev_route_error_check.js +119 -0
- package/dist/http/error_schemas.d.ts +365 -189
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +256 -149
- package/dist/http/health_schema.d.ts +10 -6
- package/dist/http/health_schema.d.ts.map +1 -1
- package/dist/http/health_schema.js +3 -3
- package/dist/http/middleware_spec.d.ts +8 -3
- package/dist/http/middleware_spec.d.ts.map +1 -1
- package/dist/http/origin.d.ts +12 -43
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/origin.js +10 -6
- package/dist/http/route_error_check.d.ts +158 -0
- package/dist/http/route_error_check.d.ts.map +1 -0
- package/dist/http/route_error_check.js +247 -0
- package/dist/http/route_errors.d.ts +80 -0
- package/dist/http/route_errors.d.ts.map +1 -0
- package/dist/http/route_errors.js +83 -0
- package/dist/http/route_spec.d.ts +33 -17
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +48 -62
- package/dist/http/schema_helpers.d.ts +0 -33
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +0 -45
- package/dist/http/surface.d.ts +19 -12
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +25 -38
- package/dist/http/surface_query.d.ts +11 -2
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +7 -1
- package/dist/primitive_schemas.d.ts +2 -19
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +2 -20
- package/dist/primitive_schemas_fuz.d.ts +39 -5
- package/dist/primitive_schemas_fuz.d.ts.map +1 -1
- package/dist/primitive_schemas_fuz.js +36 -7
- package/dist/rate_limiter.d.ts +13 -0
- package/dist/rate_limiter.d.ts.map +1 -1
- package/dist/rate_limiter.js +20 -2
- package/dist/schema_issues.d.ts +29 -11
- package/dist/schema_issues.d.ts.map +1 -1
- package/dist/schema_issues.js +11 -10
- package/dist/schema_meta.d.ts +8 -1
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +2 -1
- package/dist/server/app_server.d.ts +3 -1
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +24 -10
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +8 -31
- package/dist/server/surface_route.d.ts.map +1 -1
- package/dist/server/surface_route.js +5 -6
- package/dist/server/x_accel.d.ts +12 -7
- package/dist/server/x_accel.d.ts.map +1 -1
- package/dist/server/x_accel.js +7 -9
- package/dist/testing/CLAUDE.md +55 -44
- package/dist/testing/admin_integration.d.ts +3 -3
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +2 -2
- package/dist/testing/adversarial_404.d.ts +4 -18
- package/dist/testing/adversarial_404.d.ts.map +1 -1
- package/dist/testing/adversarial_404.js +19 -51
- package/dist/testing/adversarial_headers.d.ts +3 -4
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +8 -6
- package/dist/testing/adversarial_input.d.ts.map +1 -1
- package/dist/testing/adversarial_input.js +18 -17
- package/dist/testing/assertions.d.ts +33 -11
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +52 -12
- package/dist/testing/attack_surface.d.ts +5 -35
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +29 -91
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +2 -1
- package/dist/testing/cross_backend/action_manifest.d.ts +126 -56
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +11 -11
- package/dist/testing/cross_backend/action_manifest_parity.d.ts +1 -1
- package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.js +2 -1
- package/dist/testing/cross_backend/conformance_table.js +1 -1
- package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +2 -2
- package/dist/testing/cross_backend/fact_serving.js +3 -3
- package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +39 -6
- package/dist/testing/cross_backend/origin_conformance.d.ts +278 -102
- package/dist/testing/cross_backend/origin_conformance.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin_conformance.js +21 -21
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +3 -3
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.js +7 -1
- package/dist/testing/cross_backend/setup.d.ts +14 -1
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +68 -48
- package/dist/testing/cross_backend/spine_suites.d.ts +3 -3
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/standard.d.ts +4 -4
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_origin_check.d.ts +147 -71
- package/dist/testing/cross_backend/testing_origin_check.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_origin_check.js +16 -13
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +70 -27
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +34 -1
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +5 -4
- package/dist/testing/error_coverage.d.ts +24 -34
- package/dist/testing/error_coverage.d.ts.map +1 -1
- package/dist/testing/error_coverage.js +46 -89
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +6 -14
- package/dist/testing/integration_helpers.d.ts +37 -9
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +86 -40
- package/dist/testing/middleware.d.ts +3 -5
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +5 -4
- package/dist/testing/rate_limiting.d.ts +1 -1
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +5 -4
- package/dist/testing/round_trip.d.ts.map +1 -1
- package/dist/testing/round_trip.js +5 -3
- package/dist/testing/schema_generators.d.ts +10 -3
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +23 -11
- package/dist/testing/stubs.d.ts +10 -1
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +15 -5
- package/dist/testing/surface_invariants.d.ts +36 -115
- package/dist/testing/surface_invariants.d.ts.map +1 -1
- package/dist/testing/surface_invariants.js +106 -269
- package/dist/testing/token_scope_fixtures.d.ts +24 -0
- package/dist/testing/token_scope_fixtures.d.ts.map +1 -0
- package/dist/testing/token_scope_fixtures.js +49 -0
- package/dist/testing/transports/bootstrap.d.ts +1 -1
- package/dist/testing/transports/bootstrap.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.js +13 -12
- package/dist/ui/BootstrapForm.svelte +4 -2
- package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
- package/dist/ui/CLAUDE.md +4 -2
- package/dist/ui/SignupForm.svelte +4 -2
- package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.js +2 -8
- package/dist/ui/backend_probe.svelte.js +3 -3
- package/dist/ui/table_state.svelte.d.ts.map +1 -1
- package/dist/ui/table_state.svelte.js +1 -8
- package/dist/ui/ui_fetch.d.ts +12 -2
- package/dist/ui/ui_fetch.d.ts.map +1 -1
- package/dist/ui/ui_fetch.js +22 -4
- package/package.json +1 -1
- package/dist/auth/audit_log_schema_fuz.d.ts +0 -53
- package/dist/auth/audit_log_schema_fuz.d.ts.map +0 -1
- package/dist/auth/audit_log_schema_fuz.js +0 -50
- package/dist/auth/role_schema_fuz.d.ts +0 -30
- package/dist/auth/role_schema_fuz.d.ts.map +0 -1
- package/dist/auth/role_schema_fuz.js +0 -30
- package/dist/auth/scope_kind_schema_fuz.d.ts +0 -31
- package/dist/auth/scope_kind_schema_fuz.d.ts.map +0 -1
- package/dist/auth/scope_kind_schema_fuz.js +0 -31
|
@@ -13,26 +13,90 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
17
|
+
/**
|
|
18
|
+
* The longest `token` `POST /bootstrap` takes, in UTF-16 code units: the token
|
|
19
|
+
* file's cap, `MAX_SECURE_FILE_SIZE` bytes. A token that can match the file is
|
|
20
|
+
* at most that many bytes in UTF-8, and no more code units than bytes, so the
|
|
21
|
+
* bound refuses none that could match. A longer one is a malformed body, a
|
|
22
|
+
* `400 invalid_request_body` refused before the bootstrap window or the token
|
|
23
|
+
* file is read, with no audit row. Twin of the Rust spine's
|
|
24
|
+
* `BOOTSTRAP_TOKEN_LENGTH_MAX`, which counts the same units.
|
|
25
|
+
*/
|
|
26
|
+
export declare const BOOTSTRAP_TOKEN_LENGTH_MAX = 4096;
|
|
27
|
+
/**
|
|
28
|
+
* Input for `POST /bootstrap`, a `@fuzdev/fuz_schema` schema. `token` is the
|
|
29
|
+
* one-shot token file contents, 1 to `BOOTSTRAP_TOKEN_LENGTH_MAX` UTF-16 code
|
|
30
|
+
* units.
|
|
31
|
+
*/
|
|
32
|
+
export declare const BootstrapInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
33
|
+
username: string;
|
|
34
|
+
token: string;
|
|
35
|
+
password: string;
|
|
36
|
+
}, {
|
|
37
|
+
username: string;
|
|
38
|
+
token: string;
|
|
39
|
+
password: string;
|
|
40
|
+
}, "object", {
|
|
41
|
+
token: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
|
|
42
|
+
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>>>;
|
|
43
|
+
password: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
|
|
44
|
+
}>;
|
|
45
|
+
export type BootstrapInput = Infer<typeof BootstrapInput>;
|
|
46
|
+
/**
|
|
47
|
+
* Output for `POST /bootstrap`, a `@fuzdev/fuz_schema` schema. Session cookie
|
|
48
|
+
* is the operative side effect. Its `username` is the account row's,
|
|
49
|
+
* `UsernameCanonical`.
|
|
50
|
+
*/
|
|
51
|
+
export declare const BootstrapOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
52
|
+
account: {
|
|
53
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
54
|
+
username: string;
|
|
55
|
+
};
|
|
56
|
+
actor: {
|
|
57
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
58
|
+
};
|
|
59
|
+
ok: true;
|
|
60
|
+
}, {
|
|
61
|
+
account: {
|
|
62
|
+
id: string;
|
|
63
|
+
username: string;
|
|
64
|
+
};
|
|
65
|
+
actor: {
|
|
66
|
+
id: string;
|
|
67
|
+
};
|
|
68
|
+
ok: true;
|
|
69
|
+
}, "object", {
|
|
70
|
+
ok: import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>;
|
|
71
|
+
account: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
72
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
73
|
+
username: string;
|
|
74
|
+
}, {
|
|
75
|
+
id: string;
|
|
76
|
+
username: string;
|
|
77
|
+
}, "object", {
|
|
78
|
+
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">)[]> & {
|
|
79
|
+
readonly '~types'?: {
|
|
80
|
+
readonly input: string;
|
|
81
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
82
|
+
} | undefined;
|
|
83
|
+
};
|
|
84
|
+
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>>>;
|
|
85
|
+
}>;
|
|
86
|
+
actor: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
87
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
88
|
+
}, {
|
|
89
|
+
id: string;
|
|
90
|
+
}, "object", {
|
|
91
|
+
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">)[]> & {
|
|
92
|
+
readonly '~types'?: {
|
|
93
|
+
readonly input: string;
|
|
94
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
95
|
+
} | undefined;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
}>;
|
|
99
|
+
export type BootstrapOutput = Infer<typeof BootstrapOutput>;
|
|
36
100
|
/**
|
|
37
101
|
* The `POST /bootstrap` route shape minus its handler — pure hono-free data.
|
|
38
102
|
* `create_bootstrap_route_specs` spreads this and attaches the live handler;
|
|
@@ -49,38 +113,68 @@ export declare const bootstrap_route_shape: {
|
|
|
49
113
|
mints_credential: true;
|
|
50
114
|
description: string;
|
|
51
115
|
transaction: false;
|
|
52
|
-
input:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
password:
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
116
|
+
input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
117
|
+
username: string;
|
|
118
|
+
token: string;
|
|
119
|
+
password: string;
|
|
120
|
+
}, {
|
|
121
|
+
username: string;
|
|
122
|
+
token: string;
|
|
123
|
+
password: string;
|
|
124
|
+
}, "object", {
|
|
125
|
+
token: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
|
|
126
|
+
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>>>;
|
|
127
|
+
password: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
|
|
128
|
+
}>;
|
|
129
|
+
output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
130
|
+
account: {
|
|
131
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
132
|
+
username: string;
|
|
133
|
+
};
|
|
134
|
+
actor: {
|
|
135
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
136
|
+
};
|
|
137
|
+
ok: true;
|
|
138
|
+
}, {
|
|
139
|
+
account: {
|
|
140
|
+
id: string;
|
|
141
|
+
username: string;
|
|
142
|
+
};
|
|
143
|
+
actor: {
|
|
144
|
+
id: string;
|
|
145
|
+
};
|
|
146
|
+
ok: true;
|
|
147
|
+
}, "object", {
|
|
148
|
+
ok: import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>;
|
|
149
|
+
account: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
150
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
151
|
+
username: string;
|
|
152
|
+
}, {
|
|
153
|
+
id: string;
|
|
154
|
+
username: string;
|
|
155
|
+
}, "object", {
|
|
156
|
+
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">)[]> & {
|
|
157
|
+
readonly '~types'?: {
|
|
158
|
+
readonly input: string;
|
|
159
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
160
|
+
} | undefined;
|
|
161
|
+
};
|
|
162
|
+
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>>>;
|
|
163
|
+
}>;
|
|
164
|
+
actor: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
165
|
+
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
166
|
+
}, {
|
|
167
|
+
id: string;
|
|
168
|
+
}, "object", {
|
|
169
|
+
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">)[]> & {
|
|
170
|
+
readonly '~types'?: {
|
|
171
|
+
readonly input: string;
|
|
172
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
173
|
+
} | undefined;
|
|
174
|
+
};
|
|
175
|
+
}>;
|
|
176
|
+
}>;
|
|
67
177
|
rate_limit: "ip";
|
|
68
|
-
errors:
|
|
69
|
-
400: z.ZodObject<{
|
|
70
|
-
error: z.ZodEnum<{
|
|
71
|
-
invalid_request_body: "invalid_request_body";
|
|
72
|
-
invalid_json_body: "invalid_json_body";
|
|
73
|
-
}>;
|
|
74
|
-
}, z.core.$loose>;
|
|
75
|
-
401: z.ZodObject<{
|
|
76
|
-
error: z.ZodLiteral<"invalid_token">;
|
|
77
|
-
}, z.core.$loose>;
|
|
78
|
-
403: z.ZodObject<{
|
|
79
|
-
error: z.ZodLiteral<"already_bootstrapped">;
|
|
80
|
-
}, z.core.$loose>;
|
|
81
|
-
404: z.ZodObject<{
|
|
82
|
-
error: z.ZodLiteral<"token_file_missing">;
|
|
83
|
-
}, z.core.$loose>;
|
|
84
|
-
};
|
|
178
|
+
errors: (import("../http/error_schemas.js").RestErrorDef<401, "invalid_token", Record<never, never>> | import("../http/error_schemas.js").RestErrorDef<403, "already_bootstrapped", Record<never, never>> | import("../http/error_schemas.js").RestErrorDef<404, "token_file_missing", Record<never, never>>)[];
|
|
85
179
|
};
|
|
86
180
|
//# sourceMappingURL=bootstrap_route_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap_route_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/bootstrap_route_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"bootstrap_route_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/bootstrap_route_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAON,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAYtC;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;EAMzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWI,CAAC"}
|
|
@@ -13,21 +13,42 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { meta } from '@fuzdev/fuz_schema/meta.ts';
|
|
17
|
+
import { literal, max_length, min_length, object, pipe, string } from '@fuzdev/fuz_schema/schema.ts';
|
|
18
|
+
import { Username, UsernameCanonical, Uuid } from '../primitive_schemas_fuz.js';
|
|
18
19
|
import { Password } from './password.js';
|
|
19
|
-
import {
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
import { REST_ALREADY_BOOTSTRAPPED, REST_INVALID_TOKEN, REST_TOKEN_FILE_MISSING } from '../http/error_schemas.js';
|
|
21
|
+
/**
|
|
22
|
+
* The longest `token` `POST /bootstrap` takes, in UTF-16 code units: the token
|
|
23
|
+
* file's cap, `MAX_SECURE_FILE_SIZE` bytes. A token that can match the file is
|
|
24
|
+
* at most that many bytes in UTF-8, and no more code units than bytes, so the
|
|
25
|
+
* bound refuses none that could match. A longer one is a malformed body, a
|
|
26
|
+
* `400 invalid_request_body` refused before the bootstrap window or the token
|
|
27
|
+
* file is read, with no audit row. Twin of the Rust spine's
|
|
28
|
+
* `BOOTSTRAP_TOKEN_LENGTH_MAX`, which counts the same units.
|
|
29
|
+
*/
|
|
30
|
+
export const BOOTSTRAP_TOKEN_LENGTH_MAX = 4096;
|
|
31
|
+
/**
|
|
32
|
+
* Input for `POST /bootstrap`, a `@fuzdev/fuz_schema` schema. `token` is the
|
|
33
|
+
* one-shot token file contents, 1 to `BOOTSTRAP_TOKEN_LENGTH_MAX` UTF-16 code
|
|
34
|
+
* units.
|
|
35
|
+
*/
|
|
36
|
+
export const BootstrapInput = object({
|
|
37
|
+
token: meta(pipe(string, min_length(1), max_length(BOOTSTRAP_TOKEN_LENGTH_MAX)), {
|
|
38
|
+
sensitivity: 'secret'
|
|
39
|
+
}),
|
|
23
40
|
username: Username,
|
|
24
41
|
password: Password
|
|
25
42
|
});
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Output for `POST /bootstrap`, a `@fuzdev/fuz_schema` schema. Session cookie
|
|
45
|
+
* is the operative side effect. Its `username` is the account row's,
|
|
46
|
+
* `UsernameCanonical`.
|
|
47
|
+
*/
|
|
48
|
+
export const BootstrapOutput = object({
|
|
49
|
+
ok: literal(true),
|
|
50
|
+
account: object({ id: Uuid, username: UsernameCanonical }),
|
|
51
|
+
actor: object({ id: Uuid })
|
|
31
52
|
});
|
|
32
53
|
/**
|
|
33
54
|
* The `POST /bootstrap` route shape minus its handler — pure hono-free data.
|
|
@@ -45,12 +66,5 @@ export const bootstrap_route_shape = {
|
|
|
45
66
|
input: BootstrapInput,
|
|
46
67
|
output: BootstrapOutput,
|
|
47
68
|
rate_limit: 'ip',
|
|
48
|
-
errors:
|
|
49
|
-
400: z.looseObject({
|
|
50
|
-
error: z.enum([ERROR_INVALID_JSON_BODY, ERROR_INVALID_REQUEST_BODY])
|
|
51
|
-
}),
|
|
52
|
-
401: z.looseObject({ error: z.literal(ERROR_INVALID_TOKEN) }),
|
|
53
|
-
403: z.looseObject({ error: z.literal(ERROR_ALREADY_BOOTSTRAPPED) }),
|
|
54
|
-
404: z.looseObject({ error: z.literal(ERROR_TOKEN_FILE_MISSING) })
|
|
55
|
-
}
|
|
69
|
+
errors: [REST_INVALID_TOKEN, REST_ALREADY_BOOTSTRAPPED, REST_TOKEN_FILE_MISSING]
|
|
56
70
|
};
|
|
@@ -25,7 +25,7 @@ export declare const ERROR_CELL_GRANT_NOT_FOUND: "cell_grant_not_found";
|
|
|
25
25
|
export declare const ERROR_CELL_GRANT_PRINCIPAL_IS_OWNER: "cell_grant_principal_is_owner";
|
|
26
26
|
/**
|
|
27
27
|
* Error reason — role-shaped principal references a role string not
|
|
28
|
-
* registered in the role
|
|
28
|
+
* registered in the role registry. Would produce a dead grant row that
|
|
29
29
|
* no role_grant could match.
|
|
30
30
|
*/
|
|
31
31
|
export declare const ERROR_CELL_GRANT_UNKNOWN_ROLE: "cell_grant_unknown_role";
|
|
@@ -28,7 +28,7 @@ export const ERROR_CELL_GRANT_NOT_FOUND = 'cell_grant_not_found';
|
|
|
28
28
|
export const ERROR_CELL_GRANT_PRINCIPAL_IS_OWNER = 'cell_grant_principal_is_owner';
|
|
29
29
|
/**
|
|
30
30
|
* Error reason — role-shaped principal references a role string not
|
|
31
|
-
* registered in the role
|
|
31
|
+
* registered in the role registry. Would produce a dead grant row that
|
|
32
32
|
* no role_grant could match.
|
|
33
33
|
*/
|
|
34
34
|
export const ERROR_CELL_GRANT_UNKNOWN_ROLE = 'cell_grant_unknown_role';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - `cell_grant_create` — admin / owner only. Refuses a cell whose
|
|
13
13
|
* `moderation` doesn't admit an audience (403 `cell_grant_unapproved`,
|
|
14
14
|
* after the manage gate). Validates role-shaped
|
|
15
|
-
* principals against the role
|
|
15
|
+
* principals against the role registry; rejects owner-as-principal.
|
|
16
16
|
* Actor-shaped principals carry a pre-resolved `actor_id` (callers pick
|
|
17
17
|
* via `actor_search`). Idempotent — re-granting the same principal
|
|
18
18
|
* updates `level` via UPSERT. A mounted `authorize_grant_create` is asked
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* @module
|
|
39
39
|
*/
|
|
40
40
|
import { type ActionContext, type RpcAction } from '../actions/action_types.js';
|
|
41
|
-
import type {
|
|
41
|
+
import type { RoleRegistry } from './role_schema.js';
|
|
42
42
|
import type { ActionFactoryDeps } from './deps.js';
|
|
43
43
|
import type { RequestActorContext } from './request_context.js';
|
|
44
44
|
import type { Uuid } from '../primitive_schemas.js';
|
|
@@ -128,7 +128,7 @@ export type CellGrantRevokeAuthorize = (auth: RequestActorContext, input: CellGr
|
|
|
128
128
|
/**
|
|
129
129
|
* Dependencies for `create_cell_grant_actions`.
|
|
130
130
|
*
|
|
131
|
-
* `roles` is the role
|
|
131
|
+
* `roles` is the role registry — read for the role-validity gate on
|
|
132
132
|
* `cell_grant_create`; `authorize_grant_create` is the optional consumer gate
|
|
133
133
|
* (`CellGrantCreateAuthorize`) and `authorize_grant_revoke` the optional
|
|
134
134
|
* steward widening of `cell_grant_revoke` (`CellGrantRevokeAuthorize`). The
|
|
@@ -136,7 +136,7 @@ export type CellGrantRevokeAuthorize = (auth: RequestActorContext, input: CellGr
|
|
|
136
136
|
* fire-and-forget plumbing.
|
|
137
137
|
*/
|
|
138
138
|
export type CellGrantActionDeps = ActionFactoryDeps & {
|
|
139
|
-
roles:
|
|
139
|
+
roles: RoleRegistry;
|
|
140
140
|
authorize_grant_create?: CellGrantCreateAuthorize;
|
|
141
141
|
authorize_grant_revoke?: CellGrantRevokeAuthorize;
|
|
142
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_grant_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAGN,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cell_grant_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAGN,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EASN,KAAK,oBAAoB,EAMzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAKN,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,MAAM,6BAA6B,CAAC;AAOrC;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC7C,gCAAgC;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,iDAAiD;IACjD,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAC7B,iEAAiE;IACjE,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACrC,sEAAsE;IACtE,SAAS,EAAE,4BAA4B,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACtC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,aAAa,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C,+BAA+B;IAC/B,QAAQ,EAAE,IAAI,CAAC;IACf,gCAAgC;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,iDAAiD;IACjD,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAC7B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,QAAQ,EAAE,IAAI,CAAC;IACf,mCAAmC;IACnC,KAAK,EAAE,cAAc,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACtC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,aAAa,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IACrD,KAAK,EAAE,YAAY,CAAC;IACpB,sBAAsB,CAAC,EAAE,wBAAwB,CAAC;IAClD,sBAAsB,CAAC,EAAE,wBAAwB,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,YAAY,KAAG,SAShD,CAAC;AA4EH,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,GAAI,MAAM,mBAAmB,KAAG,KAAK,CAAC,SAAS,CAwJpF,CAAC"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - `cell_grant_create` — admin / owner only. Refuses a cell whose
|
|
13
13
|
* `moderation` doesn't admit an audience (403 `cell_grant_unapproved`,
|
|
14
14
|
* after the manage gate). Validates role-shaped
|
|
15
|
-
* principals against the role
|
|
15
|
+
* principals against the role registry; rejects owner-as-principal.
|
|
16
16
|
* Actor-shaped principals carry a pre-resolved `actor_id` (callers pick
|
|
17
17
|
* via `actor_search`). Idempotent — re-granting the same principal
|
|
18
18
|
* updates `level` via UPSERT. A mounted `authorize_grant_create` is asked
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
* `BuiltinCredentialType` is the closed set middleware sets on the Hono
|
|
16
16
|
* context (`hono_context.ts`) and the audit log records — middleware only
|
|
17
17
|
* ever authenticates through a builtin. Consumer-declared types live in
|
|
18
|
-
* the registry `
|
|
18
|
+
* the registry `create_credential_type_registry` builds, consulted when
|
|
19
19
|
* validating `RoleSpec.required_credential_types`.
|
|
20
20
|
*
|
|
21
21
|
* @module
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
23
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Valid credential-type name strings: the shared name grammar
|
|
26
26
|
* (`auth/name_schema.ts`), runs of lowercase letters joined by single
|
|
27
27
|
* underscores, at most `NAME_LENGTH_MAX` characters.
|
|
28
28
|
*/
|
|
29
|
-
export declare const CredentialTypeName:
|
|
30
|
-
export type CredentialTypeName =
|
|
29
|
+
export declare const CredentialTypeName: 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>>>;
|
|
30
|
+
export type CredentialTypeName = Infer<typeof CredentialTypeName>;
|
|
31
31
|
/** Cookie-based session credential. */
|
|
32
32
|
export declare const CREDENTIAL_TYPE_SESSION = "session";
|
|
33
33
|
/**
|
|
@@ -41,13 +41,8 @@ export declare const CREDENTIAL_TYPE_API_TOKEN = "api_token";
|
|
|
41
41
|
export declare const CREDENTIAL_TYPE_DAEMON_TOKEN = "daemon_token";
|
|
42
42
|
/** The builtin credential-type names as a const tuple. */
|
|
43
43
|
export declare const BUILTIN_CREDENTIAL_TYPES: readonly ["session", "api_token", "daemon_token"];
|
|
44
|
-
/**
|
|
45
|
-
export
|
|
46
|
-
session: "session";
|
|
47
|
-
api_token: "api_token";
|
|
48
|
-
daemon_token: "daemon_token";
|
|
49
|
-
}>;
|
|
50
|
-
export type BuiltinCredentialType = z.infer<typeof BuiltinCredentialType>;
|
|
44
|
+
/** A builtin credential-type name, the closed set middleware authenticates through. */
|
|
45
|
+
export type BuiltinCredentialType = (typeof BUILTIN_CREDENTIAL_TYPES)[number];
|
|
51
46
|
/**
|
|
52
47
|
* Per-credential-type metadata. `description` is admin-UI-facing copy
|
|
53
48
|
* (mirrors `RoleSpec.description` and `ScopeKindMeta.description`).
|
|
@@ -62,20 +57,12 @@ export interface CredentialTypeMeta {
|
|
|
62
57
|
* Typed `ReadonlyMap` for the contract — but JS Maps don't honor
|
|
63
58
|
* `Object.freeze` for `.set` / `.delete` / `.clear` (they mutate
|
|
64
59
|
* internal slots, not own properties), so freeze adds no runtime guard
|
|
65
|
-
* here. Read once at startup by `
|
|
60
|
+
* here. Read once at startup by `create_credential_type_registry`;
|
|
66
61
|
* runtime mutation has no effect on already-built schemas.
|
|
67
62
|
*/
|
|
68
63
|
export declare const builtin_credential_type_meta: ReadonlyMap<string, CredentialTypeMeta>;
|
|
69
|
-
/** The result of `
|
|
70
|
-
export interface
|
|
71
|
-
/**
|
|
72
|
-
* Zod schema that validates credential-type name strings against the
|
|
73
|
-
* registered set (builtins + consumer-declared). Use at I/O
|
|
74
|
-
* boundaries (admin UIs, codegen) and as the construction-time check
|
|
75
|
-
* inside `create_role_schema` for every
|
|
76
|
-
* `RoleSpec.required_credential_types` entry.
|
|
77
|
-
*/
|
|
78
|
-
CredentialType: z.ZodType<string>;
|
|
64
|
+
/** The result of `create_credential_type_registry` — the metadata map. */
|
|
65
|
+
export interface CredentialTypeRegistry {
|
|
79
66
|
/**
|
|
80
67
|
* Map of every registered credential-type to its metadata. Keyed by
|
|
81
68
|
* name. Read at startup by admin / codegen surfaces.
|
|
@@ -83,31 +70,31 @@ export interface CredentialTypeSchemaResult {
|
|
|
83
70
|
credential_types: ReadonlyMap<string, CredentialTypeMeta>;
|
|
84
71
|
}
|
|
85
72
|
/**
|
|
86
|
-
* Create a credential-type
|
|
73
|
+
* Create a credential-type registry from the builtin set plus optional
|
|
87
74
|
* consumer-declared additions.
|
|
88
75
|
*
|
|
89
76
|
* Builtins (`session`, `api_token`, `daemon_token`) are always present;
|
|
90
77
|
* consumer entries that collide with a builtin name throw at
|
|
91
|
-
* construction. Pass the result into `
|
|
78
|
+
* construction. Pass the result into `create_role_registry`'s optional
|
|
92
79
|
* `credential_types` parameter so each role's
|
|
93
80
|
* `required_credential_types` entries are validated against this set
|
|
94
81
|
* at construction time.
|
|
95
82
|
*
|
|
96
83
|
* @param consumer_types - optional consumer-declared credential-type set with optional metadata
|
|
97
|
-
* @returns `{
|
|
84
|
+
* @returns `{credential_types}` — the metadata map
|
|
98
85
|
*
|
|
99
86
|
* @throws Error if any `consumer_types` key fails `CredentialTypeName` (its grammar or its length cap), collides with a builtin name, or appears more than once
|
|
100
87
|
*
|
|
101
88
|
* @example
|
|
102
89
|
* ```ts
|
|
103
90
|
* // simple — builtins only
|
|
104
|
-
* const {
|
|
91
|
+
* const {credential_types} = create_credential_type_registry();
|
|
105
92
|
*
|
|
106
93
|
* // with consumer extensions
|
|
107
|
-
* const {
|
|
94
|
+
* const {credential_types} = create_credential_type_registry({
|
|
108
95
|
* sso_assertion: {description: 'OIDC SSO assertion bound to an IdP-asserted account.'},
|
|
109
96
|
* });
|
|
110
97
|
* ```
|
|
111
98
|
*/
|
|
112
|
-
export declare const
|
|
99
|
+
export declare const create_credential_type_registry: (consumer_types?: Record<string, CredentialTypeMeta>) => CredentialTypeRegistry;
|
|
113
100
|
//# sourceMappingURL=credential_type_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential_type_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/credential_type_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"credential_type_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/credential_type_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAuB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAI/E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,0MAAwC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAIlE,uCAAuC;AACvC,eAAO,MAAM,uBAAuB,YAAY,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,cAAc,CAAC;AAErD,yEAAyE;AACzE,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAE3D,0DAA0D;AAC1D,eAAO,MAAM,wBAAwB,mDAI3B,CAAC;AAEX,uFAAuF;AACvF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAa/E,CAAC;AAEH,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,+BAA+B,GAC3C,iBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAM,KACrD,sBAwBF,CAAC"}
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
* `BuiltinCredentialType` is the closed set middleware sets on the Hono
|
|
16
16
|
* context (`hono_context.ts`) and the audit log records — middleware only
|
|
17
17
|
* ever authenticates through a builtin. Consumer-declared types live in
|
|
18
|
-
* the registry `
|
|
18
|
+
* the registry `create_credential_type_registry` builds, consulted when
|
|
19
19
|
* validating `RoleSpec.required_credential_types`.
|
|
20
20
|
*
|
|
21
21
|
* @module
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
23
|
+
import { format_issue, parse } from '@fuzdev/fuz_schema/schema.ts';
|
|
24
24
|
import { create_name_schema } from './name_schema.js';
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Valid credential-type name strings: the shared name grammar
|
|
27
27
|
* (`auth/name_schema.ts`), runs of lowercase letters joined by single
|
|
28
28
|
* underscores, at most `NAME_LENGTH_MAX` characters.
|
|
29
29
|
*/
|
|
@@ -46,15 +46,13 @@ export const BUILTIN_CREDENTIAL_TYPES = [
|
|
|
46
46
|
CREDENTIAL_TYPE_API_TOKEN,
|
|
47
47
|
CREDENTIAL_TYPE_DAEMON_TOKEN
|
|
48
48
|
];
|
|
49
|
-
/** Zod enum for builtin credential types only. */
|
|
50
|
-
export const BuiltinCredentialType = z.enum(BUILTIN_CREDENTIAL_TYPES);
|
|
51
49
|
/**
|
|
52
50
|
* Builtin credential-type metadata. Not overridable by consumers.
|
|
53
51
|
*
|
|
54
52
|
* Typed `ReadonlyMap` for the contract — but JS Maps don't honor
|
|
55
53
|
* `Object.freeze` for `.set` / `.delete` / `.clear` (they mutate
|
|
56
54
|
* internal slots, not own properties), so freeze adds no runtime guard
|
|
57
|
-
* here. Read once at startup by `
|
|
55
|
+
* here. Read once at startup by `create_credential_type_registry`;
|
|
58
56
|
* runtime mutation has no effect on already-built schemas.
|
|
59
57
|
*/
|
|
60
58
|
export const builtin_credential_type_meta = new Map([
|
|
@@ -72,39 +70,39 @@ export const builtin_credential_type_meta = new Map([
|
|
|
72
70
|
]
|
|
73
71
|
]);
|
|
74
72
|
/**
|
|
75
|
-
* Create a credential-type
|
|
73
|
+
* Create a credential-type registry from the builtin set plus optional
|
|
76
74
|
* consumer-declared additions.
|
|
77
75
|
*
|
|
78
76
|
* Builtins (`session`, `api_token`, `daemon_token`) are always present;
|
|
79
77
|
* consumer entries that collide with a builtin name throw at
|
|
80
|
-
* construction. Pass the result into `
|
|
78
|
+
* construction. Pass the result into `create_role_registry`'s optional
|
|
81
79
|
* `credential_types` parameter so each role's
|
|
82
80
|
* `required_credential_types` entries are validated against this set
|
|
83
81
|
* at construction time.
|
|
84
82
|
*
|
|
85
83
|
* @param consumer_types - optional consumer-declared credential-type set with optional metadata
|
|
86
|
-
* @returns `{
|
|
84
|
+
* @returns `{credential_types}` — the metadata map
|
|
87
85
|
*
|
|
88
86
|
* @throws Error if any `consumer_types` key fails `CredentialTypeName` (its grammar or its length cap), collides with a builtin name, or appears more than once
|
|
89
87
|
*
|
|
90
88
|
* @example
|
|
91
89
|
* ```ts
|
|
92
90
|
* // simple — builtins only
|
|
93
|
-
* const {
|
|
91
|
+
* const {credential_types} = create_credential_type_registry();
|
|
94
92
|
*
|
|
95
93
|
* // with consumer extensions
|
|
96
|
-
* const {
|
|
94
|
+
* const {credential_types} = create_credential_type_registry({
|
|
97
95
|
* sso_assertion: {description: 'OIDC SSO assertion bound to an IdP-asserted account.'},
|
|
98
96
|
* });
|
|
99
97
|
* ```
|
|
100
98
|
*/
|
|
101
|
-
export const
|
|
99
|
+
export const create_credential_type_registry = (consumer_types = {}) => {
|
|
102
100
|
const consumer_names = Object.keys(consumer_types);
|
|
103
101
|
const seen = new Set();
|
|
104
102
|
for (const name of consumer_names) {
|
|
105
|
-
const parsed = CredentialTypeName
|
|
106
|
-
if (!parsed.
|
|
107
|
-
throw new Error(`Invalid credential-type name "${name}": ${parsed.
|
|
103
|
+
const parsed = parse(CredentialTypeName, name);
|
|
104
|
+
if (!parsed.ok) {
|
|
105
|
+
throw new Error(`Invalid credential-type name "${name}": ${format_issue(parsed.issues[0])}`);
|
|
108
106
|
}
|
|
109
107
|
if (builtin_credential_type_meta.has(name)) {
|
|
110
108
|
throw new Error(`Consumer credential-type "${name}" collides with builtin credential-type`);
|
|
@@ -114,11 +112,9 @@ export const create_credential_type_schema = (consumer_types = {}) => {
|
|
|
114
112
|
}
|
|
115
113
|
seen.add(name);
|
|
116
114
|
}
|
|
117
|
-
const all_names = [...BUILTIN_CREDENTIAL_TYPES, ...consumer_names];
|
|
118
|
-
const CredentialType = z.enum(all_names);
|
|
119
115
|
const credential_types = new Map(builtin_credential_type_meta);
|
|
120
116
|
for (const name of consumer_names) {
|
|
121
117
|
credential_types.set(name, consumer_types[name]);
|
|
122
118
|
}
|
|
123
|
-
return {
|
|
119
|
+
return { credential_types };
|
|
124
120
|
};
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
/** Daemon token format: 43 base64url characters (256 bits). */
|
|
12
|
-
export declare const DaemonToken:
|
|
13
|
-
export type DaemonToken =
|
|
10
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
11
|
+
/** Daemon token format, a `@fuzdev/fuz_schema` schema: 43 base64url characters (256 bits). */
|
|
12
|
+
export declare const DaemonToken: import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>;
|
|
13
|
+
export type DaemonToken = Infer<typeof DaemonToken>;
|
|
14
14
|
/** The `X-Daemon-Token` header name. */
|
|
15
15
|
export declare const DAEMON_TOKEN_HEADER = "X-Daemon-Token";
|
|
16
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon_token.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/daemon_token.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"daemon_token.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/daemon_token.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAgC,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAIxF,8FAA8F;AAC9F,eAAO,MAAM,WAAW,+IAGvB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEpD,wCAAwC;AACxC,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,2BAA2B;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uCAAuC;IACvC,UAAU,EAAE,IAAI,CAAC;IACjB,iFAAiF;IACjF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAO,MAExC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,EAAE,OAAO,gBAAgB,KAAG,OAgBjF,CAAC"}
|