@fuzdev/fuz_app 0.161.0 → 0.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/CLAUDE.md +47 -36
- package/dist/auth/account_action_specs.d.ts +614 -150
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +56 -52
- package/dist/auth/account_route_schema.d.ts +401 -94
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +54 -39
- package/dist/auth/account_routes.js +1 -1
- package/dist/auth/account_schema.d.ts +531 -118
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +76 -58
- package/dist/auth/admin_action_specs.d.ts +1753 -240
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +28 -26
- 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_emitter.d.ts +8 -3
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +32 -9
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +4 -3
- package/dist/auth/audit_log_schema.d.ts +798 -291
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +192 -201
- package/dist/auth/bootstrap_route_schema.d.ts +173 -50
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +35 -16
- 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/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/invite_schema.d.ts +98 -26
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +21 -14
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +28 -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 +72 -72
- 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.d.ts +60 -60
- package/dist/auth/role_grant_offer_notifications.js +2 -2
- package/dist/auth/role_grant_offer_schema.d.ts +8 -8
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +10 -10
- 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 +18 -16
- 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/dev/setup.d.ts +14 -7
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +11 -6
- package/dist/primitive_schemas.d.ts +2 -22
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +2 -24
- package/dist/primitive_schemas_fuz.d.ts +56 -2
- package/dist/primitive_schemas_fuz.d.ts.map +1 -1
- package/dist/primitive_schemas_fuz.js +54 -4
- package/dist/testing/CLAUDE.md +29 -8
- 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 +1 -1
- package/dist/testing/app_server.d.ts +3 -1
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +6 -2
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +12 -13
- 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/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +43 -8
- 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/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +4 -3
- package/dist/testing/cross_backend/setup.d.ts +1 -1
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +45 -42
- 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/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +34 -1
- package/dist/testing/db_entities.d.ts +3 -1
- package/dist/testing/db_entities.d.ts.map +1 -1
- package/dist/testing/db_entities.js +4 -2
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +4 -3
- 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/SignupForm.svelte +4 -2
- package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
- package/dist/zod.d.ts +2 -1
- package/dist/zod.d.ts.map +1 -1
- package/dist/zod.js +6 -2
- package/package.json +1 -1
- package/dist/auth/audit_log_schema_fuz.d.ts +0 -39
- package/dist/auth/audit_log_schema_fuz.d.ts.map +0 -1
- package/dist/auth/audit_log_schema_fuz.js +0 -37
- 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
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"account_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/account_action_specs.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,38 +7,46 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import { z } from 'zod';
|
|
11
10
|
import { meta } from '@fuzdev/fuz_schema/meta.ts';
|
|
12
|
-
import { boolean, literal, object, pipe,
|
|
13
|
-
import { bounded_string } from '../
|
|
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 {
|
|
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 =
|
|
21
|
-
/** Input for `account_session_list`. No parameters. */
|
|
22
|
-
export const SessionListInput =
|
|
23
|
-
/** Output for `account_session_list
|
|
24
|
-
export const SessionListOutput =
|
|
25
|
-
sessions:
|
|
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;
|
|
22
|
+
/** Output for `account_session_list`, a `@fuzdev/fuz_schema` schema. */
|
|
23
|
+
export const SessionListOutput = object({
|
|
24
|
+
sessions: array(AuthSessionJson)
|
|
26
25
|
});
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Input for `account_session_revoke`, a `@fuzdev/fuz_schema` schema.
|
|
28
|
+
* `session_id` is the blake3 hash.
|
|
29
|
+
*/
|
|
30
|
+
export const SessionRevokeInput = object({
|
|
31
|
+
session_id: meta(SessionId, { description: 'Session id (blake3 hash) to revoke.' })
|
|
30
32
|
});
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
35
40
|
});
|
|
36
|
-
/** Input for `account_session_revoke_all`. No parameters. */
|
|
37
|
-
export const SessionRevokeAllInput =
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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))
|
|
42
50
|
});
|
|
43
51
|
/**
|
|
44
52
|
* Maximum length of an API token's `name`, in UTF-16 code units (what
|
|
@@ -60,61 +68,57 @@ export const ERROR_TOKEN_SCOPE_INVALID = 'token_scope_invalid';
|
|
|
60
68
|
*/
|
|
61
69
|
export const ERROR_TOKEN_LIFETIME_INVALID = 'token_lifetime_invalid';
|
|
62
70
|
/**
|
|
63
|
-
* Input for `account_token_create
|
|
71
|
+
* Input for `account_token_create`, a `@fuzdev/fuz_schema` schema.
|
|
64
72
|
*
|
|
65
73
|
* `scope` is **required** — default-deny at mint. There is deliberately no
|
|
66
74
|
* permissive default: a caller who wants full authority spells
|
|
67
75
|
* `{kind: 'full'}`, and the stored document records that they did. That is the
|
|
68
76
|
* reversal of the 2026-02 design, where the field existed but nothing depended
|
|
69
|
-
* on it. Because `scope` has no default, the object as a whole
|
|
70
|
-
* carries `.prefault({})`.
|
|
77
|
+
* on it. Because `scope` has no default, the object as a whole has none.
|
|
71
78
|
*
|
|
72
79
|
* `lifetime` follows the same rule — a never-expiring token is
|
|
73
80
|
* `{kind: 'eternal'}`, spelled out, so `expires_at IS NULL` always means
|
|
74
81
|
* "deliberately eternal" (see `auth/token_lifetime.ts`).
|
|
75
82
|
*/
|
|
76
|
-
export const TokenCreateInput =
|
|
77
|
-
name: bounded_string({ max: API_TOKEN_NAME_LENGTH_MAX })
|
|
78
|
-
.default('CLI token')
|
|
79
|
-
.meta({
|
|
83
|
+
export const TokenCreateInput = object({
|
|
84
|
+
name: meta(with_default(bounded_string({ max: API_TOKEN_NAME_LENGTH_MAX }), 'CLI token'), {
|
|
80
85
|
description: `Human-friendly label; shown in the token list. At most ${API_TOKEN_NAME_LENGTH_MAX} characters.`
|
|
81
86
|
}),
|
|
82
|
-
scope:
|
|
87
|
+
scope: meta(TokenScopeInput, {
|
|
83
88
|
description: "What the token may do. `{kind:'full'}` for full account authority, or " +
|
|
84
89
|
"`{kind:'methods',methods:[…]}` to narrow it to named RPC methods — a " +
|
|
85
90
|
'narrowed token is RPC-only and reaches no non-RPC surface that reads ' +
|
|
86
91
|
'account data or carries authority.',
|
|
87
92
|
invalid_reason: ERROR_TOKEN_SCOPE_INVALID
|
|
88
93
|
}),
|
|
89
|
-
lifetime:
|
|
94
|
+
lifetime: meta(TokenLifetimeInput, {
|
|
90
95
|
description: "How long the token lives. `{kind:'eternal'}` never expires; " +
|
|
91
96
|
"`{kind:'ttl',days:N}` expires N days from mint.",
|
|
92
97
|
invalid_reason: ERROR_TOKEN_LIFETIME_INVALID
|
|
93
98
|
})
|
|
94
99
|
});
|
|
95
|
-
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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.' }),
|
|
99
107
|
id: ApiTokenId,
|
|
100
|
-
name:
|
|
101
|
-
expires_at:
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
.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
|
+
})
|
|
105
112
|
});
|
|
106
|
-
/** Input for `account_token_list`. No parameters. */
|
|
107
|
-
export const TokenListInput =
|
|
108
|
-
/** Output for `account_token_list
|
|
109
|
-
export const TokenListOutput =
|
|
110
|
-
tokens:
|
|
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)
|
|
111
118
|
});
|
|
112
|
-
/**
|
|
113
|
-
* Input for `account_token_revoke`, a `@fuzdev/fuz_schema` schema. Its
|
|
114
|
-
* `token_id` is `ApiTokenId`'s check written inline, as `ApiTokenId` is Zod.
|
|
115
|
-
*/
|
|
119
|
+
/** Input for `account_token_revoke`, a `@fuzdev/fuz_schema` schema. */
|
|
116
120
|
export const TokenRevokeInput = object({
|
|
117
|
-
token_id: meta(
|
|
121
|
+
token_id: meta(ApiTokenId, {
|
|
118
122
|
description: 'Public API token id (e.g. `tok_<12 chars>`).'
|
|
119
123
|
})
|
|
120
124
|
});
|