@fuzdev/fuz_app 0.165.0 → 0.167.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/CLAUDE.md +3 -3
- package/dist/actions/action_codegen.d.ts +10 -1
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +17 -8
- 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 +24 -15
- package/dist/actions/action_spec.d.ts +2 -2
- package/dist/actions/perform_action.d.ts +2 -1
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/auth/CLAUDE.md +10 -8
- package/dist/auth/account_action_specs.d.ts +8 -8
- package/dist/auth/account_route_schema.d.ts +197 -164
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +19 -17
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +285 -294
- package/dist/auth/admin_action_specs.d.ts +64 -64
- package/dist/auth/audit_log_route_schema.d.ts +16 -8
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +4 -3
- package/dist/auth/audit_log_routes.d.ts +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +112 -111
- package/dist/auth/audit_log_schema.d.ts +22 -22
- package/dist/auth/bootstrap_route_schema.d.ts +46 -69
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +8 -7
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +100 -98
- package/dist/auth/cell_action_specs.d.ts +6092 -1092
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +96 -97
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +1 -0
- package/dist/auth/cell_audit_action_specs.d.ts +301 -69
- package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_audit_action_specs.js +21 -16
- package/dist/auth/cell_audit_actions.js +2 -2
- package/dist/auth/cell_audit_events.d.ts +2 -2
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.d.ts +93 -30
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +15 -14
- package/dist/auth/cell_authorize.d.ts +3 -3
- package/dist/auth/cell_authorize.js +3 -3
- package/dist/auth/cell_data_schema.d.ts +17 -9
- package/dist/auth/cell_data_schema.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.js +9 -7
- package/dist/auth/cell_field_action_specs.d.ts +697 -130
- package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_field_action_specs.js +25 -27
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +2 -0
- package/dist/auth/cell_field_audit_metadata.d.ts +49 -13
- package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_field_audit_metadata.js +6 -6
- package/dist/auth/cell_grant_action_specs.d.ts +1044 -208
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +36 -33
- package/dist/auth/cell_grant_actions.js +2 -2
- package/dist/auth/cell_grant_audit_metadata.d.ts +188 -40
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +12 -11
- package/dist/auth/cell_item_action_specs.d.ts +949 -175
- package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_item_action_specs.js +30 -34
- package/dist/auth/cell_item_actions.js +1 -1
- package/dist/auth/cell_item_audit_metadata.d.ts +68 -19
- package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_item_audit_metadata.js +9 -9
- package/dist/auth/cell_relation_list_limit.d.ts +1 -2
- package/dist/auth/cell_relation_list_limit.d.ts.map +1 -1
- package/dist/auth/cell_relation_list_limit.js +3 -8
- package/dist/auth/role_grant_offer_action_specs.d.ts +4 -4
- package/dist/auth/signup_route_schema.d.ts +9 -4
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +5 -3
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +170 -170
- package/dist/db/cell_moderation.d.ts +6 -7
- package/dist/db/cell_moderation.d.ts.map +1 -1
- package/dist/db/cell_moderation.js +6 -7
- package/dist/http/CLAUDE.md +48 -3
- 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 +13 -11
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +25 -28
- package/dist/http/error_schemas.d.ts +5 -1
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +5 -1
- package/dist/http/route_result.d.ts +101 -0
- package/dist/http/route_result.d.ts.map +1 -0
- package/dist/http/route_result.js +56 -0
- package/dist/http/route_spec.d.ts +110 -6
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +82 -14
- package/dist/rate_limiter.d.ts +0 -9
- package/dist/rate_limiter.d.ts.map +1 -1
- package/dist/rate_limiter.js +0 -15
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +23 -21
- package/dist/server/surface_route.d.ts +1 -1
- package/dist/server/surface_route.d.ts.map +1 -1
- package/dist/server/surface_route.js +4 -2
- package/dist/testing/CLAUDE.md +5 -3
- package/dist/testing/adversarial_404.d.ts.map +1 -1
- package/dist/testing/adversarial_404.js +12 -7
- package/dist/testing/cross_backend/cell_crud.js +2 -2
- package/dist/testing/cross_backend/cell_relations.js +2 -2
- package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
- package/dist/testing/cross_backend/login_security.js +3 -2
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.js +2 -6
- package/dist/testing/stubs.d.ts +14 -3
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +21 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_grant_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"cell_grant_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_action_specs.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { ActingActor } from '../
|
|
16
|
+
import { meta } from '@fuzdev/fuz_schema/meta.ts';
|
|
17
|
+
import { array, boolean, literal, nullable, object, one_of, optional, variant } from '@fuzdev/fuz_schema/schema.ts';
|
|
18
|
+
import { ActingActor, Timestamp, Uuid } from '../primitive_schemas_fuz.js';
|
|
19
|
+
import { RoleName } from './role_schema.js';
|
|
19
20
|
// -- Error reasons ----------------------------------------------------------
|
|
20
21
|
/** Error reason — grant id did not resolve, or caller may not see it. */
|
|
21
22
|
export const ERROR_CELL_GRANT_NOT_FOUND = 'cell_grant_not_found';
|
|
@@ -34,7 +35,7 @@ export const ERROR_CELL_GRANT_PRINCIPAL_IS_OWNER = 'cell_grant_principal_is_owne
|
|
|
34
35
|
export const ERROR_CELL_GRANT_UNKNOWN_ROLE = 'cell_grant_unknown_role';
|
|
35
36
|
/**
|
|
36
37
|
* Error reason — `cell_grant_create` on a cell whose `moderation` doesn't
|
|
37
|
-
* admit an audience (pending
|
|
38
|
+
* admit an audience (pending or rejected). A grant would
|
|
38
39
|
* extend an audience the cell doesn't have yet.
|
|
39
40
|
*/
|
|
40
41
|
export const ERROR_CELL_GRANT_UNAPPROVED = 'cell_grant_unapproved';
|
|
@@ -47,21 +48,23 @@ export const ERROR_CELL_GRANT_UNAPPROVED = 'cell_grant_unapproved';
|
|
|
47
48
|
export const ERROR_CELL_GRANT_NOT_AUTHORIZED = 'cell_grant_not_authorized';
|
|
48
49
|
// -- Shared schemas ---------------------------------------------------------
|
|
49
50
|
/** Grant level — view-only or view-plus-edit. */
|
|
50
|
-
export const CellGrantLevel =
|
|
51
|
+
export const CellGrantLevel = one_of(['viewer', 'editor']);
|
|
51
52
|
/**
|
|
52
53
|
* Wire-input principal. Discriminated by `kind`. Actor-shaped principals
|
|
53
54
|
* carry a resolved `actor_id` — the picker UI runs `actor_search` to
|
|
54
|
-
* convert a typed name to an id before this verb is called.
|
|
55
|
+
* convert a typed name to an id before this verb is called. A role-shaped
|
|
56
|
+
* principal's `role` is a `RoleName`, so a string off the name grammar is
|
|
57
|
+
* refused as `invalid_params` before the handler's role-registry check.
|
|
55
58
|
*/
|
|
56
|
-
export const CellGrantPrincipalInput =
|
|
57
|
-
|
|
58
|
-
kind:
|
|
59
|
+
export const CellGrantPrincipalInput = variant('kind', [
|
|
60
|
+
object({
|
|
61
|
+
kind: literal('actor'),
|
|
59
62
|
actor_id: Uuid
|
|
60
63
|
}),
|
|
61
|
-
|
|
62
|
-
kind:
|
|
63
|
-
role:
|
|
64
|
-
scope_id: Uuid
|
|
64
|
+
object({
|
|
65
|
+
kind: literal('role'),
|
|
66
|
+
role: RoleName,
|
|
67
|
+
scope_id: meta(optional(nullable(Uuid)), {
|
|
65
68
|
description: '`null` / omitted = any-scope grant (admits any matching-role role_grant).'
|
|
66
69
|
})
|
|
67
70
|
})
|
|
@@ -71,15 +74,15 @@ export const CellGrantPrincipalInput = z.discriminatedUnion('kind', [
|
|
|
71
74
|
* `created_at`, branded UUIDs, principal columns surfaced as-is. Caller
|
|
72
75
|
* inspects `actor_id` xor `role` to render the right principal label.
|
|
73
76
|
*/
|
|
74
|
-
export const GrantJson =
|
|
77
|
+
export const GrantJson = object({
|
|
75
78
|
id: Uuid,
|
|
76
79
|
cell_id: Uuid,
|
|
77
80
|
level: CellGrantLevel,
|
|
78
|
-
actor_id:
|
|
79
|
-
role:
|
|
80
|
-
scope_id:
|
|
81
|
-
granted_by:
|
|
82
|
-
created_at:
|
|
81
|
+
actor_id: nullable(Uuid),
|
|
82
|
+
role: nullable(RoleName),
|
|
83
|
+
scope_id: nullable(Uuid),
|
|
84
|
+
granted_by: nullable(Uuid),
|
|
85
|
+
created_at: Timestamp
|
|
83
86
|
});
|
|
84
87
|
// -- cell_grant_create ------------------------------------------------------
|
|
85
88
|
/**
|
|
@@ -87,18 +90,18 @@ export const GrantJson = z.strictObject({
|
|
|
87
90
|
* re-granting the same `(cell_id, principal)` pair updates `level` +
|
|
88
91
|
* `granted_by` rather than producing a duplicate row.
|
|
89
92
|
*/
|
|
90
|
-
export const CellGrantCreateInput =
|
|
91
|
-
cell_id:
|
|
92
|
-
level:
|
|
93
|
-
principal:
|
|
93
|
+
export const CellGrantCreateInput = object({
|
|
94
|
+
cell_id: meta(Uuid, { description: 'Cell to grant access on.' }),
|
|
95
|
+
level: meta(CellGrantLevel, { description: 'Grant level: `viewer` or `editor`.' }),
|
|
96
|
+
principal: meta(CellGrantPrincipalInput, {
|
|
94
97
|
description: 'Subject of the grant. Discriminated by `kind`.'
|
|
95
98
|
}),
|
|
96
99
|
acting: ActingActor
|
|
97
100
|
});
|
|
98
|
-
export const CellGrantCreateOutput =
|
|
101
|
+
export const CellGrantCreateOutput = object({ grant: GrantJson });
|
|
99
102
|
// -- cell_grant_revoke ------------------------------------------------------
|
|
100
|
-
export const CellGrantRevokeInput =
|
|
101
|
-
grant_id:
|
|
103
|
+
export const CellGrantRevokeInput = object({
|
|
104
|
+
grant_id: meta(Uuid, { description: 'Grant to revoke.' }),
|
|
102
105
|
acting: ActingActor
|
|
103
106
|
});
|
|
104
107
|
/**
|
|
@@ -107,17 +110,17 @@ export const CellGrantRevokeInput = z.strictObject({
|
|
|
107
110
|
* grant, ownership, admin). Always `true` for a manager's revoke; a
|
|
108
111
|
* self-revoker or a scope steward may hold no other path.
|
|
109
112
|
*/
|
|
110
|
-
export const CellGrantRevokeOutput =
|
|
111
|
-
ok:
|
|
112
|
-
still_admitted:
|
|
113
|
+
export const CellGrantRevokeOutput = object({
|
|
114
|
+
ok: literal(true),
|
|
115
|
+
still_admitted: boolean
|
|
113
116
|
});
|
|
114
117
|
// -- cell_grant_list --------------------------------------------------------
|
|
115
|
-
export const CellGrantListInput =
|
|
116
|
-
cell_id:
|
|
118
|
+
export const CellGrantListInput = object({
|
|
119
|
+
cell_id: meta(Uuid, { description: 'Cell whose grants to list.' }),
|
|
117
120
|
acting: ActingActor
|
|
118
121
|
});
|
|
119
|
-
export const CellGrantListOutput =
|
|
120
|
-
grants:
|
|
122
|
+
export const CellGrantListOutput = object({
|
|
123
|
+
grants: array(GrantJson)
|
|
121
124
|
});
|
|
122
125
|
// -- Action specs -----------------------------------------------------------
|
|
123
126
|
export const cell_grant_create_action_spec = {
|
|
@@ -127,8 +127,8 @@ export const create_cell_grant_actions = (deps) => {
|
|
|
127
127
|
// cell_get.
|
|
128
128
|
const cell = await require_manageable_cell(ctx, auth, input.cell_id);
|
|
129
129
|
// A grant extends a cell's audience, and a contribution whose moderation
|
|
130
|
-
// doesn't admit one (pending
|
|
131
|
-
//
|
|
130
|
+
// doesn't admit one (pending or rejected) has none past its author and
|
|
131
|
+
// admins — `can_view_cell`'s grant arm wouldn't admit on it —
|
|
132
132
|
// so refuse the grant rather than mint a row that would wake up on
|
|
133
133
|
// approval. After the manage gate, so a non-manager keeps the 404 mask; no
|
|
134
134
|
// admin exemption.
|
|
@@ -10,20 +10,50 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
14
|
/**
|
|
15
15
|
* Principal columns as stored on `cell_grant`. Discriminated by which
|
|
16
16
|
* keys are present: `{actor_id}` for an actor-shaped grant,
|
|
17
17
|
* `{role, scope_id}` for a role-shaped grant. Actor-shaped grants
|
|
18
18
|
* carry only the id; names are never persisted in the audit envelope.
|
|
19
19
|
*/
|
|
20
|
-
export declare const CellGrantPrincipalAuditMetadata:
|
|
21
|
-
actor_id:
|
|
22
|
-
},
|
|
23
|
-
role:
|
|
24
|
-
scope_id:
|
|
25
|
-
},
|
|
26
|
-
|
|
20
|
+
export declare const CellGrantPrincipalAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<({
|
|
21
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
22
|
+
} & Record<string, unknown>) | ({
|
|
23
|
+
role: string;
|
|
24
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
25
|
+
} & Record<string, unknown>), ({
|
|
26
|
+
actor_id: string;
|
|
27
|
+
} & Record<string, unknown>) | ({
|
|
28
|
+
role: string;
|
|
29
|
+
scope_id: string | null;
|
|
30
|
+
} & Record<string, unknown>), "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
31
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
32
|
+
} & Record<string, unknown>, {
|
|
33
|
+
actor_id: string;
|
|
34
|
+
} & Record<string, unknown>, "loose_object", {
|
|
35
|
+
actor_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">)[]> & {
|
|
36
|
+
readonly '~types'?: {
|
|
37
|
+
readonly input: string;
|
|
38
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
}>, import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
42
|
+
role: string;
|
|
43
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
44
|
+
} & Record<string, unknown>, {
|
|
45
|
+
role: string;
|
|
46
|
+
scope_id: string | null;
|
|
47
|
+
} & Record<string, unknown>, "loose_object", {
|
|
48
|
+
role: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
49
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<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">)[]> & {
|
|
50
|
+
readonly '~types'?: {
|
|
51
|
+
readonly input: string;
|
|
52
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
53
|
+
} | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
}>]>;
|
|
56
|
+
export type CellGrantPrincipalAuditMetadata = Infer<typeof CellGrantPrincipalAuditMetadata>;
|
|
27
57
|
/**
|
|
28
58
|
* Metadata envelope for `cell_grant_create`.
|
|
29
59
|
*
|
|
@@ -32,21 +62,78 @@ export type CellGrantPrincipalAuditMetadata = z.infer<typeof CellGrantPrincipalA
|
|
|
32
62
|
* via `grant_id` if needed; the design doesn't require distinguishing
|
|
33
63
|
* the two at the metadata level.
|
|
34
64
|
*/
|
|
35
|
-
export declare const CellGrantCreateAuditMetadata:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
65
|
+
export declare const CellGrantCreateAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
66
|
+
level: "viewer" | "editor";
|
|
67
|
+
cell_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
68
|
+
principal: ({
|
|
69
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
70
|
+
} & Record<string, unknown>) | ({
|
|
71
|
+
role: string;
|
|
72
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
73
|
+
} & Record<string, unknown>);
|
|
74
|
+
grant_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
75
|
+
} & Record<string, unknown>, {
|
|
76
|
+
level: "viewer" | "editor";
|
|
77
|
+
cell_id: string;
|
|
78
|
+
principal: ({
|
|
79
|
+
actor_id: string;
|
|
80
|
+
} & Record<string, unknown>) | ({
|
|
81
|
+
role: string;
|
|
82
|
+
scope_id: string | null;
|
|
83
|
+
} & Record<string, unknown>);
|
|
84
|
+
grant_id: string;
|
|
85
|
+
} & Record<string, unknown>, "loose_object", {
|
|
86
|
+
cell_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">)[]> & {
|
|
87
|
+
readonly '~types'?: {
|
|
88
|
+
readonly input: string;
|
|
89
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
90
|
+
} | undefined;
|
|
91
|
+
};
|
|
92
|
+
grant_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">)[]> & {
|
|
93
|
+
readonly '~types'?: {
|
|
94
|
+
readonly input: string;
|
|
95
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
96
|
+
} | undefined;
|
|
97
|
+
};
|
|
98
|
+
level: import("@fuzdev/fuz_schema/schema.ts").Schema<"viewer" | "editor", "viewer" | "editor", "one_of", readonly ["viewer", "editor"]>;
|
|
99
|
+
principal: import("@fuzdev/fuz_schema/schema.ts").Schema<({
|
|
100
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
101
|
+
} & Record<string, unknown>) | ({
|
|
102
|
+
role: string;
|
|
103
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
104
|
+
} & Record<string, unknown>), ({
|
|
105
|
+
actor_id: string;
|
|
106
|
+
} & Record<string, unknown>) | ({
|
|
107
|
+
role: string;
|
|
108
|
+
scope_id: string | null;
|
|
109
|
+
} & Record<string, unknown>), "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
110
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
111
|
+
} & Record<string, unknown>, {
|
|
112
|
+
actor_id: string;
|
|
113
|
+
} & Record<string, unknown>, "loose_object", {
|
|
114
|
+
actor_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">)[]> & {
|
|
115
|
+
readonly '~types'?: {
|
|
116
|
+
readonly input: string;
|
|
117
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
118
|
+
} | undefined;
|
|
119
|
+
};
|
|
120
|
+
}>, import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
121
|
+
role: string;
|
|
122
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
123
|
+
} & Record<string, unknown>, {
|
|
124
|
+
role: string;
|
|
125
|
+
scope_id: string | null;
|
|
126
|
+
} & Record<string, unknown>, "loose_object", {
|
|
127
|
+
role: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
128
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<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">)[]> & {
|
|
129
|
+
readonly '~types'?: {
|
|
130
|
+
readonly input: string;
|
|
131
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
132
|
+
} | undefined;
|
|
133
|
+
}>>;
|
|
134
|
+
}>]>;
|
|
135
|
+
}>;
|
|
136
|
+
export type CellGrantCreateAuditMetadata = Infer<typeof CellGrantCreateAuditMetadata>;
|
|
50
137
|
/**
|
|
51
138
|
* Metadata envelope for `cell_grant_revoke`.
|
|
52
139
|
*
|
|
@@ -58,21 +145,82 @@ export type CellGrantCreateAuditMetadata = z.infer<typeof CellGrantCreateAuditMe
|
|
|
58
145
|
* three — the boolean is enough for forensic review and avoids
|
|
59
146
|
* surface-doubling with parallel events.
|
|
60
147
|
*/
|
|
61
|
-
export declare const CellGrantRevokeAuditMetadata:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
148
|
+
export declare const CellGrantRevokeAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
149
|
+
level: "viewer" | "editor";
|
|
150
|
+
cell_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
151
|
+
principal: ({
|
|
152
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
153
|
+
} & Record<string, unknown>) | ({
|
|
154
|
+
role: string;
|
|
155
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
156
|
+
} & Record<string, unknown>);
|
|
157
|
+
grant_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
158
|
+
self?: true | undefined;
|
|
159
|
+
steward?: true | undefined;
|
|
160
|
+
} & Record<string, unknown>, {
|
|
161
|
+
level: "viewer" | "editor";
|
|
162
|
+
cell_id: string;
|
|
163
|
+
principal: ({
|
|
164
|
+
actor_id: string;
|
|
165
|
+
} & Record<string, unknown>) | ({
|
|
166
|
+
role: string;
|
|
167
|
+
scope_id: string | null;
|
|
168
|
+
} & Record<string, unknown>);
|
|
169
|
+
grant_id: string;
|
|
170
|
+
self?: true | undefined;
|
|
171
|
+
steward?: true | undefined;
|
|
172
|
+
} & Record<string, unknown>, "loose_object", {
|
|
173
|
+
cell_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">)[]> & {
|
|
174
|
+
readonly '~types'?: {
|
|
175
|
+
readonly input: string;
|
|
176
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
177
|
+
} | undefined;
|
|
178
|
+
};
|
|
179
|
+
grant_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">)[]> & {
|
|
180
|
+
readonly '~types'?: {
|
|
181
|
+
readonly input: string;
|
|
182
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
183
|
+
} | undefined;
|
|
184
|
+
};
|
|
185
|
+
level: import("@fuzdev/fuz_schema/schema.ts").Schema<"viewer" | "editor", "viewer" | "editor", "one_of", readonly ["viewer", "editor"]>;
|
|
186
|
+
principal: import("@fuzdev/fuz_schema/schema.ts").Schema<({
|
|
187
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
188
|
+
} & Record<string, unknown>) | ({
|
|
189
|
+
role: string;
|
|
190
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
191
|
+
} & Record<string, unknown>), ({
|
|
192
|
+
actor_id: string;
|
|
193
|
+
} & Record<string, unknown>) | ({
|
|
194
|
+
role: string;
|
|
195
|
+
scope_id: string | null;
|
|
196
|
+
} & Record<string, unknown>), "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
197
|
+
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
198
|
+
} & Record<string, unknown>, {
|
|
199
|
+
actor_id: string;
|
|
200
|
+
} & Record<string, unknown>, "loose_object", {
|
|
201
|
+
actor_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">)[]> & {
|
|
202
|
+
readonly '~types'?: {
|
|
203
|
+
readonly input: string;
|
|
204
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
205
|
+
} | undefined;
|
|
206
|
+
};
|
|
207
|
+
}>, import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
208
|
+
role: string;
|
|
209
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
210
|
+
} & Record<string, unknown>, {
|
|
211
|
+
role: string;
|
|
212
|
+
scope_id: string | null;
|
|
213
|
+
} & Record<string, unknown>, "loose_object", {
|
|
214
|
+
role: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
215
|
+
scope_id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<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">)[]> & {
|
|
216
|
+
readonly '~types'?: {
|
|
217
|
+
readonly input: string;
|
|
218
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
219
|
+
} | undefined;
|
|
220
|
+
}>>;
|
|
221
|
+
}>]>;
|
|
222
|
+
self: import("@fuzdev/fuz_schema/schema.ts").Schema<true | undefined, true | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>>>;
|
|
223
|
+
steward: import("@fuzdev/fuz_schema/schema.ts").Schema<true | undefined, true | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<true, true, "literal", true>>>;
|
|
224
|
+
}>;
|
|
225
|
+
export type CellGrantRevokeAuditMetadata = Infer<typeof CellGrantRevokeAuditMetadata>;
|
|
78
226
|
//# sourceMappingURL=cell_grant_audit_metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_grant_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"cell_grant_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_grant_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAON,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAKtC;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG1C,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE5F;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEtF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -10,17 +10,18 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
14
|
-
import { Uuid } from '../
|
|
13
|
+
import { literal, loose_object, nullable, optional, string, union } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
|
+
import { Uuid } from '../primitive_schemas_fuz.js';
|
|
15
|
+
import { CellGrantLevel } from './cell_grant_action_specs.js';
|
|
15
16
|
/**
|
|
16
17
|
* Principal columns as stored on `cell_grant`. Discriminated by which
|
|
17
18
|
* keys are present: `{actor_id}` for an actor-shaped grant,
|
|
18
19
|
* `{role, scope_id}` for a role-shaped grant. Actor-shaped grants
|
|
19
20
|
* carry only the id; names are never persisted in the audit envelope.
|
|
20
21
|
*/
|
|
21
|
-
export const CellGrantPrincipalAuditMetadata =
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
export const CellGrantPrincipalAuditMetadata = union([
|
|
23
|
+
loose_object({ actor_id: Uuid }),
|
|
24
|
+
loose_object({ role: string, scope_id: nullable(Uuid) })
|
|
24
25
|
]);
|
|
25
26
|
/**
|
|
26
27
|
* Metadata envelope for `cell_grant_create`.
|
|
@@ -30,10 +31,10 @@ export const CellGrantPrincipalAuditMetadata = z.union([
|
|
|
30
31
|
* via `grant_id` if needed; the design doesn't require distinguishing
|
|
31
32
|
* the two at the metadata level.
|
|
32
33
|
*/
|
|
33
|
-
export const CellGrantCreateAuditMetadata =
|
|
34
|
+
export const CellGrantCreateAuditMetadata = loose_object({
|
|
34
35
|
cell_id: Uuid,
|
|
35
36
|
grant_id: Uuid,
|
|
36
|
-
level:
|
|
37
|
+
level: CellGrantLevel,
|
|
37
38
|
principal: CellGrantPrincipalAuditMetadata
|
|
38
39
|
});
|
|
39
40
|
/**
|
|
@@ -47,11 +48,11 @@ export const CellGrantCreateAuditMetadata = z.looseObject({
|
|
|
47
48
|
* three — the boolean is enough for forensic review and avoids
|
|
48
49
|
* surface-doubling with parallel events.
|
|
49
50
|
*/
|
|
50
|
-
export const CellGrantRevokeAuditMetadata =
|
|
51
|
+
export const CellGrantRevokeAuditMetadata = loose_object({
|
|
51
52
|
cell_id: Uuid,
|
|
52
53
|
grant_id: Uuid,
|
|
53
|
-
level:
|
|
54
|
+
level: CellGrantLevel,
|
|
54
55
|
principal: CellGrantPrincipalAuditMetadata,
|
|
55
|
-
self:
|
|
56
|
-
steward:
|
|
56
|
+
self: optional(literal(true)),
|
|
57
|
+
steward: optional(literal(true))
|
|
57
58
|
});
|