@fuzdev/fuz_app 0.169.0 → 0.171.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 +19 -21
- package/dist/actions/action_codegen.d.ts +27 -18
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +90 -90
- package/dist/actions/action_event.d.ts +0 -8
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +7 -6
- package/dist/actions/action_event_data.d.ts +4 -4
- package/dist/actions/action_rpc.d.ts +1 -1
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +6 -7
- package/dist/actions/action_spec.d.ts +8 -10
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +1 -1
- package/dist/actions/action_types.d.ts +4 -4
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +2 -2
- package/dist/actions/broadcast_api.d.ts +2 -2
- package/dist/actions/broadcast_api.js +4 -4
- package/dist/actions/compile_action_registry.d.ts +6 -7
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/compile_action_registry.js +8 -9
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +3 -2
- package/dist/actions/perform_action.d.ts +6 -6
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +11 -10
- package/dist/actions/socket.svelte.d.ts +1 -1
- package/dist/actions/socket.svelte.js +2 -2
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +2 -1
- package/dist/auth/CLAUDE.md +11 -11
- package/dist/auth/admin_action_specs.d.ts +24 -24
- package/dist/auth/audit_emitter.d.ts +6 -7
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +11 -22
- package/dist/auth/audit_log_ddl.d.ts +1 -1
- package/dist/auth/audit_log_ddl.js +1 -1
- package/dist/auth/audit_log_queries.d.ts +0 -13
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +3 -3
- package/dist/auth/audit_log_schema.d.ts +14 -15
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +1 -1
- package/dist/auth/auth_ddl.d.ts +1 -1
- package/dist/auth/auth_ddl.js +1 -1
- package/dist/auth/cell_action_specs.d.ts +54 -54
- package/dist/auth/cell_actions.d.ts +2 -2
- package/dist/auth/cell_actions.js +5 -5
- package/dist/auth/middleware.d.ts +6 -2
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +14 -2
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +7 -9
- package/dist/auth/role_grant_offer_action_specs.d.ts +6 -6
- package/dist/auth/role_grant_offer_ddl.d.ts +1 -1
- package/dist/auth/role_grant_offer_ddl.js +1 -1
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +2 -3
- package/dist/auth/self_service_role_actions.d.ts +1 -1
- package/dist/auth/self_service_role_actions.js +1 -1
- package/dist/env/env_schemas.d.ts +1 -2
- package/dist/env/env_schemas.d.ts.map +1 -1
- package/dist/env/env_schemas.js +3 -4
- package/dist/http/CLAUDE.md +30 -31
- package/dist/http/auth_shape.d.ts +14 -32
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +14 -49
- package/dist/http/error_schemas.d.ts +18 -18
- package/dist/http/json_text.d.ts +53 -0
- package/dist/http/json_text.d.ts.map +1 -0
- package/dist/http/json_text.js +152 -0
- package/dist/http/jsonrpc_helpers.js +1 -1
- package/dist/http/route_error_check.d.ts +2 -2
- package/dist/http/route_error_check.d.ts.map +1 -1
- package/dist/http/route_error_check.js +2 -3
- package/dist/http/route_errors.d.ts +4 -4
- package/dist/http/route_errors.d.ts.map +1 -1
- package/dist/http/route_errors.js +0 -13
- package/dist/http/route_result.d.ts +2 -1
- package/dist/http/route_result.d.ts.map +1 -1
- package/dist/http/route_spec.d.ts +34 -37
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +31 -31
- package/dist/http/schema_helpers.d.ts +77 -68
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +54 -77
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +6 -8
- package/dist/primitive_schemas.d.ts +9 -17
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +9 -17
- package/dist/realtime/sse.d.ts +3 -3
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +2 -2
- package/dist/schema_issues.d.ts +39 -147
- package/dist/schema_issues.d.ts.map +1 -1
- package/dist/schema_issues.js +39 -352
- package/dist/schema_meta.d.ts +63 -136
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +37 -184
- package/dist/sensitivity.d.ts +3 -5
- package/dist/sensitivity.d.ts.map +1 -1
- package/dist/sensitivity.js +3 -5
- package/dist/testing/CLAUDE.md +20 -22
- package/dist/testing/adversarial_headers.js +2 -2
- package/dist/testing/adversarial_input_cases.d.ts +19 -18
- package/dist/testing/adversarial_input_cases.d.ts.map +1 -1
- package/dist/testing/adversarial_input_cases.js +31 -46
- package/dist/testing/assertions.d.ts +2 -2
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +3 -3
- package/dist/testing/cross_backend/account_lifecycle.js +2 -2
- package/dist/testing/cross_backend/action_manifest.d.ts +10 -9
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +4 -3
- package/dist/testing/cross_backend/cell_crud.js +1 -1
- package/dist/testing/cross_backend/conformance_rpc_auth.d.ts +0 -62
- package/dist/testing/cross_backend/conformance_rpc_auth.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +3 -3
- package/dist/testing/cross_backend/cross_rpc.d.ts +3 -4
- package/dist/testing/cross_backend/cross_rpc.d.ts.map +1 -1
- package/dist/testing/cross_backend/cross_rpc.js +4 -4
- package/dist/testing/cross_backend/differential.js +2 -2
- package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +16 -11
- package/dist/testing/cross_backend/origin_conformance.d.ts +9 -9
- package/dist/testing/cross_backend/query_shape.js +1 -1
- package/dist/testing/cross_backend/rpc_success_fixtures.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +1 -1
- package/dist/testing/cross_backend/setup.d.ts +25 -3
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +4 -4
- package/dist/testing/cross_backend/sse_round_trip.js +2 -2
- package/dist/testing/cross_backend/testing_origin_check.d.ts +4 -4
- package/dist/testing/cross_backend/token_lifetime.js +3 -3
- package/dist/testing/cross_backend/wire_shapes.js +1 -1
- package/dist/testing/cross_backend/ws_envelope.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_envelope.js +8 -0
- package/dist/testing/cross_backend/ws_round_trip.js +1 -1
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +1 -1
- package/dist/testing/integration.js +2 -2
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +2 -2
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +2 -2
- package/dist/testing/rpc_attack_surface.js +1 -1
- package/dist/testing/rpc_envelope_cases.d.ts +10 -3
- package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
- package/dist/testing/rpc_envelope_cases.js +22 -1
- package/dist/testing/rpc_helpers.d.ts +12 -14
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +9 -10
- package/dist/testing/schema_generators.d.ts +67 -60
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +154 -159
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +2 -2
- package/dist/testing/surface_invariants.d.ts +1 -1
- package/dist/testing/surface_invariants.js +1 -1
- package/dist/ui/form_state.svelte.d.ts +1 -1
- package/dist/ui/form_state.svelte.js +1 -1
- package/package.json +5 -7
- package/dist/zod.d.ts +0 -116
- package/dist/zod.d.ts.map +0 -1
- package/dist/zod.js +0 -218
- package/dist/zod_schemas.d.ts +0 -100
- package/dist/zod_schemas.d.ts.map +0 -1
- package/dist/zod_schemas.js +0 -157
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
14
|
+
import { parse } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
15
|
import { assert_row } from '../db/assert_row.js';
|
|
15
16
|
import { columns_sql, iso8601_timestamp_expr, qualify_columns } from '../db/sql_columns.js';
|
|
16
|
-
import { parse_any } from '../schema_issues.js';
|
|
17
17
|
import { AUDIT_LOG_DEFAULT_LIMIT, builtin_audit_log_config } from './audit_log_schema.js';
|
|
18
18
|
/**
|
|
19
19
|
* The full `audit_log` column set, named explicitly so a row read fails loud
|
|
@@ -46,7 +46,7 @@ export const AUDIT_LOG_COLUMNS = [
|
|
|
46
46
|
export const audit_log_expr = iso8601_timestamp_expr(AUDIT_LOG_COLUMNS, ['created_at']);
|
|
47
47
|
/**
|
|
48
48
|
* Process-wide counter for audit metadata validation failures. `query_audit_log`
|
|
49
|
-
* increments on `
|
|
49
|
+
* increments on a `parse` mismatch and writes the row anyway (fail-open —
|
|
50
50
|
* schema drift should not break auth flows). Independent of the
|
|
51
51
|
* unknown-event-type counter — `create_audit_log_config` keeps the two in
|
|
52
52
|
* sync, but a hand-rolled `AuditLogConfig` (or a cast escape) can have a
|
|
@@ -105,7 +105,7 @@ export const query_audit_log = async (deps, input, config = builtin_audit_log_co
|
|
|
105
105
|
if (input.metadata != null) {
|
|
106
106
|
const schema = config.metadata_schemas[input.event_type];
|
|
107
107
|
if (schema) {
|
|
108
|
-
const result =
|
|
108
|
+
const result = parse(schema, input.metadata);
|
|
109
109
|
if (!result.ok) {
|
|
110
110
|
audit_metadata_validation_failures++;
|
|
111
111
|
console.error(`[audit_log] metadata mismatch for '${input.event_type}':`, result.issues);
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
13
|
+
import { type AnySchema, type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
14
|
import { Uuid } from '../primitive_schemas.js';
|
|
15
|
-
import { type ValidationSchema } from '../schema_issues.js';
|
|
16
15
|
/**
|
|
17
16
|
* All tracked auth event types. Frozen to convert accidental in-process
|
|
18
17
|
* mutation (test cross-contamination, cast escapes) into loud TypeErrors.
|
|
@@ -742,7 +741,7 @@ export interface AuditLogInput<T extends string = AuditEventType> {
|
|
|
742
741
|
* Configuration bundle for audit-log event types and metadata schemas.
|
|
743
742
|
*
|
|
744
743
|
* Lets consumers extend the closed `AUDIT_EVENT_TYPES` enum with their own
|
|
745
|
-
* event strings (and
|
|
744
|
+
* event strings (and `@fuzdev/fuz_schema` metadata schemas) without
|
|
746
745
|
* forking. Pass to
|
|
747
746
|
* `create_audit_emitter` (or `query_audit_log` for in-tx call sites) as the
|
|
748
747
|
* optional `config` argument; both default to `builtin_audit_log_config`.
|
|
@@ -763,7 +762,7 @@ export interface AuditLogConfig {
|
|
|
763
762
|
* Per-event-type metadata schemas. Missing entries skip metadata
|
|
764
763
|
* validation for that type (row still written; metadata stored as raw JSONB).
|
|
765
764
|
*/
|
|
766
|
-
readonly metadata_schemas: Readonly<Record<string,
|
|
765
|
+
readonly metadata_schemas: Readonly<Record<string, AnySchema>>;
|
|
767
766
|
}
|
|
768
767
|
/** Builtin fuz_app audit-log config — every existing event type and its metadata schema. */
|
|
769
768
|
export declare const builtin_audit_log_config: AuditLogConfig;
|
|
@@ -771,15 +770,15 @@ export declare const builtin_audit_log_config: AuditLogConfig;
|
|
|
771
770
|
export interface CreateAuditLogConfigOptions {
|
|
772
771
|
/**
|
|
773
772
|
* Extra event types keyed by event-type string. Value is a metadata
|
|
774
|
-
* schema
|
|
773
|
+
* schema (`@fuzdev/fuz_schema`), or `null` to register the type
|
|
775
774
|
* without validation (row still written, metadata stored as raw JSONB).
|
|
776
775
|
*
|
|
777
776
|
* Collisions with builtin event-type strings throw at construction, and so
|
|
778
|
-
* does a value that is neither `null` nor a schema
|
|
779
|
-
* Schemas are run via `
|
|
777
|
+
* does a value that is neither `null` nor a schema.
|
|
778
|
+
* Schemas are run via `parse` at insert time; mismatches log + count
|
|
780
779
|
* but never throw (fail-open — see the drift counters in `auth/audit_log_queries.ts`).
|
|
781
780
|
*/
|
|
782
|
-
extra_events?: Readonly<Record<string,
|
|
781
|
+
extra_events?: Readonly<Record<string, AnySchema | null>>;
|
|
783
782
|
}
|
|
784
783
|
/**
|
|
785
784
|
* Build an `AuditLogConfig` by merging fuz_app builtins with consumer extras.
|
|
@@ -793,7 +792,7 @@ export interface CreateAuditLogConfigOptions {
|
|
|
793
792
|
* `AppDeps.audit` emitter. Builtin handlers omit the `audit_log_config`
|
|
794
793
|
* slot and pick up `builtin_audit_log_config`.
|
|
795
794
|
*
|
|
796
|
-
* @throws Error when an `extra_events` key collides with a builtin event type or fails `AuditEventTypeName` format validation, or its value is neither `null` nor a schema
|
|
795
|
+
* @throws Error when an `extra_events` key collides with a builtin event type or fails `AuditEventTypeName` format validation, or its value is neither `null` nor a schema
|
|
797
796
|
*/
|
|
798
797
|
export declare const create_audit_log_config: (options?: CreateAuditLogConfigOptions) => AuditLogConfig;
|
|
799
798
|
/** Default page size for audit log listings. */
|
|
@@ -837,25 +836,25 @@ export declare const AuditLogEventJson: import("@fuzdev/fuz_schema/schema.ts").S
|
|
|
837
836
|
account_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
838
837
|
created_at: string;
|
|
839
838
|
ip: string | null;
|
|
840
|
-
metadata: Record<string, unknown> | null;
|
|
841
839
|
seq: number;
|
|
842
840
|
event_type: string;
|
|
843
841
|
outcome: "success" | "failure";
|
|
844
842
|
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
845
843
|
target_account_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
846
844
|
target_actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
845
|
+
metadata: Record<string, unknown> | null;
|
|
847
846
|
}, {
|
|
848
847
|
id: string;
|
|
849
848
|
account_id: string | null;
|
|
850
849
|
created_at: string;
|
|
851
850
|
ip: string | null;
|
|
852
|
-
metadata: Record<string, unknown> | null;
|
|
853
851
|
seq: number;
|
|
854
852
|
event_type: string;
|
|
855
853
|
outcome: "success" | "failure";
|
|
856
854
|
actor_id: string | null;
|
|
857
855
|
target_account_id: string | null;
|
|
858
856
|
target_actor_id: string | null;
|
|
857
|
+
metadata: Record<string, unknown> | null;
|
|
859
858
|
}, "object", {
|
|
860
859
|
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<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | 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<"lazy"> | 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<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | 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<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
|
|
861
860
|
readonly '~types'?: {
|
|
@@ -902,13 +901,13 @@ export declare const AuditLogEventWithUsernamesJson: import("@fuzdev/fuz_schema/
|
|
|
902
901
|
created_at: string;
|
|
903
902
|
username: string | null;
|
|
904
903
|
ip: string | null;
|
|
905
|
-
metadata: Record<string, unknown> | null;
|
|
906
904
|
seq: number;
|
|
907
905
|
event_type: string;
|
|
908
906
|
outcome: "success" | "failure";
|
|
909
907
|
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
910
908
|
target_account_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
911
909
|
target_actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
910
|
+
metadata: Record<string, unknown> | null;
|
|
912
911
|
target_username: string | null;
|
|
913
912
|
}, {
|
|
914
913
|
id: string;
|
|
@@ -916,13 +915,13 @@ export declare const AuditLogEventWithUsernamesJson: import("@fuzdev/fuz_schema/
|
|
|
916
915
|
created_at: string;
|
|
917
916
|
username: string | null;
|
|
918
917
|
ip: string | null;
|
|
919
|
-
metadata: Record<string, unknown> | null;
|
|
920
918
|
seq: number;
|
|
921
919
|
event_type: string;
|
|
922
920
|
outcome: "success" | "failure";
|
|
923
921
|
actor_id: string | null;
|
|
924
922
|
target_account_id: string | null;
|
|
925
923
|
target_actor_id: string | null;
|
|
924
|
+
metadata: Record<string, unknown> | null;
|
|
926
925
|
target_username: string | null;
|
|
927
926
|
}, "object", {
|
|
928
927
|
username: import("@fuzdev/fuz_schema/schema.ts").Schema<string | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
|
|
@@ -972,13 +971,13 @@ export declare const RoleGrantHistoryEventJson: import("@fuzdev/fuz_schema/schem
|
|
|
972
971
|
created_at: string;
|
|
973
972
|
username: string | null;
|
|
974
973
|
ip: string | null;
|
|
975
|
-
metadata: Record<string, unknown> | null;
|
|
976
974
|
seq: number;
|
|
977
975
|
event_type: string;
|
|
978
976
|
outcome: "success" | "failure";
|
|
979
977
|
actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
980
978
|
target_account_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
981
979
|
target_actor_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null;
|
|
980
|
+
metadata: Record<string, unknown> | null;
|
|
982
981
|
target_username: string | null;
|
|
983
982
|
}, {
|
|
984
983
|
id: string;
|
|
@@ -986,13 +985,13 @@ export declare const RoleGrantHistoryEventJson: import("@fuzdev/fuz_schema/schem
|
|
|
986
985
|
created_at: string;
|
|
987
986
|
username: string | null;
|
|
988
987
|
ip: string | null;
|
|
989
|
-
metadata: Record<string, unknown> | null;
|
|
990
988
|
seq: number;
|
|
991
989
|
event_type: string;
|
|
992
990
|
outcome: "success" | "failure";
|
|
993
991
|
actor_id: string | null;
|
|
994
992
|
target_account_id: string | null;
|
|
995
993
|
target_actor_id: string | null;
|
|
994
|
+
metadata: Record<string, unknown> | null;
|
|
996
995
|
target_username: string | null;
|
|
997
996
|
}, "object", {
|
|
998
997
|
username: import("@fuzdev/fuz_schema/schema.ts").Schema<string | null, string | null, "nullable", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit_log_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"audit_log_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAkBN,KAAK,SAAS,EACd,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAoC,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAmBjF;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it the `audit_log_config`
|
|
472
472
|
* slot and pick up `builtin_audit_log_config`.
|
|
473
473
|
*
|
|
474
|
-
* @throws Error when an `extra_events` key collides with a builtin event type or fails `AuditEventTypeName` format validation, or its value is neither `null` nor a schema
|
|
474
|
+
* @throws Error when an `extra_events` key collides with a builtin event type or fails `AuditEventTypeName` format validation, or its value is neither `null` nor a schema
|
|
475
475
|
*/
|
|
476
476
|
export const create_audit_log_config = (options) => {
|
|
477
477
|
const extras = options?.extra_events;
|
package/dist/auth/auth_ddl.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Consumed by `auth/migrations.ts`. Paired with `auth/audit_log_ddl.ts`
|
|
7
7
|
* (audit table) and `auth/role_grant_offer_ddl.ts` (offer table) — DDL lives
|
|
8
|
-
* in `*_ddl.ts`,
|
|
8
|
+
* in `*_ddl.ts`, schemas in `*_schema.ts`.
|
|
9
9
|
*
|
|
10
10
|
* These strings are the body of the frozen `full_auth_schema` migration —
|
|
11
11
|
* never edit them (see the `auth/migrations.ts` module doc for the
|
package/dist/auth/auth_ddl.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Consumed by `auth/migrations.ts`. Paired with `auth/audit_log_ddl.ts`
|
|
7
7
|
* (audit table) and `auth/role_grant_offer_ddl.ts` (offer table) — DDL lives
|
|
8
|
-
* in `*_ddl.ts`,
|
|
8
|
+
* in `*_ddl.ts`, schemas in `*_schema.ts`.
|
|
9
9
|
*
|
|
10
10
|
* These strings are the body of the frozen `full_auth_schema` migration —
|
|
11
11
|
* never edit them (see the `auth/migrations.ts` module doc for the
|
|
@@ -350,8 +350,8 @@ export declare const CellCreateInput: import("@fuzdev/fuz_schema/schema.ts").Sch
|
|
|
350
350
|
summary?: string | undefined;
|
|
351
351
|
} & Record<string, unknown>;
|
|
352
352
|
kind?: string | null | undefined;
|
|
353
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
354
353
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
354
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
355
355
|
parent_id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null | undefined;
|
|
356
356
|
visibility?: "private" | "public" | undefined;
|
|
357
357
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -361,8 +361,8 @@ export declare const CellCreateInput: import("@fuzdev/fuz_schema/schema.ts").Sch
|
|
|
361
361
|
summary?: string | undefined;
|
|
362
362
|
} & Record<string, unknown>;
|
|
363
363
|
kind?: string | null | undefined;
|
|
364
|
-
path?: string | null | undefined;
|
|
365
364
|
acting?: string | undefined;
|
|
365
|
+
path?: string | null | undefined;
|
|
366
366
|
parent_id?: string | null | undefined;
|
|
367
367
|
visibility?: "private" | "public" | undefined;
|
|
368
368
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -559,12 +559,12 @@ export type CellCreateOutput = Infer<typeof CellCreateOutput>;
|
|
|
559
559
|
*/
|
|
560
560
|
export declare const CellGetInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
561
561
|
id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
562
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
563
562
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
563
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
564
564
|
}, {
|
|
565
565
|
id?: string | undefined;
|
|
566
|
-
path?: string | undefined;
|
|
567
566
|
acting?: string | undefined;
|
|
567
|
+
path?: string | undefined;
|
|
568
568
|
}, "object", {
|
|
569
569
|
id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined, string | undefined, "optional", 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<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | 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<"lazy"> | 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<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | 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<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
|
|
570
570
|
readonly '~types'?: {
|
|
@@ -598,18 +598,18 @@ export type CellGetInput = Infer<typeof CellGetInput>;
|
|
|
598
598
|
* `cell_field_list({source_id})` when truncated.
|
|
599
599
|
*/
|
|
600
600
|
export declare const CellGetOutput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
601
|
-
items: {
|
|
602
|
-
created_at: string;
|
|
603
|
-
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
604
|
-
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
605
|
-
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
606
|
-
}[];
|
|
607
601
|
fields: {
|
|
608
602
|
name: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellFieldName">;
|
|
609
603
|
created_at: string;
|
|
610
604
|
source_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
611
605
|
target_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
612
606
|
}[];
|
|
607
|
+
items: {
|
|
608
|
+
created_at: string;
|
|
609
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
610
|
+
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
611
|
+
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
612
|
+
}[];
|
|
613
613
|
cell: {
|
|
614
614
|
kind: string | null;
|
|
615
615
|
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
@@ -636,18 +636,18 @@ export declare const CellGetOutput: import("@fuzdev/fuz_schema/schema.ts").Schem
|
|
|
636
636
|
can_edit: boolean;
|
|
637
637
|
can_grant: boolean;
|
|
638
638
|
}, {
|
|
639
|
-
items: {
|
|
640
|
-
created_at: string;
|
|
641
|
-
parent_id: string;
|
|
642
|
-
position: string;
|
|
643
|
-
child_id: string;
|
|
644
|
-
}[];
|
|
645
639
|
fields: {
|
|
646
640
|
name: string;
|
|
647
641
|
created_at: string;
|
|
648
642
|
source_id: string;
|
|
649
643
|
target_id: string;
|
|
650
644
|
}[];
|
|
645
|
+
items: {
|
|
646
|
+
created_at: string;
|
|
647
|
+
parent_id: string;
|
|
648
|
+
position: string;
|
|
649
|
+
child_id: string;
|
|
650
|
+
}[];
|
|
651
651
|
cell: {
|
|
652
652
|
kind: string | null;
|
|
653
653
|
id: string;
|
|
@@ -874,8 +874,8 @@ export type CellGetOutput = Infer<typeof CellGetOutput>;
|
|
|
874
874
|
*/
|
|
875
875
|
export declare const CellUpdateInput: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
876
876
|
cell_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
877
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
878
877
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
878
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
879
879
|
data?: ({
|
|
880
880
|
label?: string | undefined;
|
|
881
881
|
summary?: string | undefined;
|
|
@@ -883,8 +883,8 @@ export declare const CellUpdateInput: import("@fuzdev/fuz_schema/schema.ts").Sch
|
|
|
883
883
|
visibility?: "private" | "public" | undefined;
|
|
884
884
|
}, {
|
|
885
885
|
cell_id: string;
|
|
886
|
-
path?: string | null | undefined;
|
|
887
886
|
acting?: string | undefined;
|
|
887
|
+
path?: string | null | undefined;
|
|
888
888
|
data?: ({
|
|
889
889
|
label?: string | undefined;
|
|
890
890
|
summary?: string | undefined;
|
|
@@ -2147,8 +2147,8 @@ export declare const cell_create_action_spec: {
|
|
|
2147
2147
|
summary?: string | undefined;
|
|
2148
2148
|
} & Record<string, unknown>;
|
|
2149
2149
|
kind?: string | null | undefined;
|
|
2150
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
2151
2150
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
2151
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
2152
2152
|
parent_id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null | undefined;
|
|
2153
2153
|
visibility?: "private" | "public" | undefined;
|
|
2154
2154
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -2158,8 +2158,8 @@ export declare const cell_create_action_spec: {
|
|
|
2158
2158
|
summary?: string | undefined;
|
|
2159
2159
|
} & Record<string, unknown>;
|
|
2160
2160
|
kind?: string | null | undefined;
|
|
2161
|
-
path?: string | null | undefined;
|
|
2162
2161
|
acting?: string | undefined;
|
|
2162
|
+
path?: string | null | undefined;
|
|
2163
2163
|
parent_id?: string | null | undefined;
|
|
2164
2164
|
visibility?: "private" | "public" | undefined;
|
|
2165
2165
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -2359,12 +2359,12 @@ export declare const cell_get_action_spec: {
|
|
|
2359
2359
|
side_effects: false;
|
|
2360
2360
|
input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
2361
2361
|
id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
2362
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
2363
2362
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
2363
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
2364
2364
|
}, {
|
|
2365
2365
|
id?: string | undefined;
|
|
2366
|
-
path?: string | undefined;
|
|
2367
2366
|
acting?: string | undefined;
|
|
2367
|
+
path?: string | undefined;
|
|
2368
2368
|
}, "object", {
|
|
2369
2369
|
id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined, string | undefined, "optional", 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<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | 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<"lazy"> | 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<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | 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<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
|
|
2370
2370
|
readonly '~types'?: {
|
|
@@ -2386,18 +2386,18 @@ export declare const cell_get_action_spec: {
|
|
|
2386
2386
|
}>>;
|
|
2387
2387
|
}>;
|
|
2388
2388
|
output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
2389
|
-
items: {
|
|
2390
|
-
created_at: string;
|
|
2391
|
-
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2392
|
-
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
2393
|
-
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2394
|
-
}[];
|
|
2395
2389
|
fields: {
|
|
2396
2390
|
name: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellFieldName">;
|
|
2397
2391
|
created_at: string;
|
|
2398
2392
|
source_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2399
2393
|
target_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2400
2394
|
}[];
|
|
2395
|
+
items: {
|
|
2396
|
+
created_at: string;
|
|
2397
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2398
|
+
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
2399
|
+
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2400
|
+
}[];
|
|
2401
2401
|
cell: {
|
|
2402
2402
|
kind: string | null;
|
|
2403
2403
|
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
@@ -2424,18 +2424,18 @@ export declare const cell_get_action_spec: {
|
|
|
2424
2424
|
can_edit: boolean;
|
|
2425
2425
|
can_grant: boolean;
|
|
2426
2426
|
}, {
|
|
2427
|
-
items: {
|
|
2428
|
-
created_at: string;
|
|
2429
|
-
parent_id: string;
|
|
2430
|
-
position: string;
|
|
2431
|
-
child_id: string;
|
|
2432
|
-
}[];
|
|
2433
2427
|
fields: {
|
|
2434
2428
|
name: string;
|
|
2435
2429
|
created_at: string;
|
|
2436
2430
|
source_id: string;
|
|
2437
2431
|
target_id: string;
|
|
2438
2432
|
}[];
|
|
2433
|
+
items: {
|
|
2434
|
+
created_at: string;
|
|
2435
|
+
parent_id: string;
|
|
2436
|
+
position: string;
|
|
2437
|
+
child_id: string;
|
|
2438
|
+
}[];
|
|
2439
2439
|
cell: {
|
|
2440
2440
|
kind: string | null;
|
|
2441
2441
|
id: string;
|
|
@@ -2666,8 +2666,8 @@ export declare const cell_update_action_spec: {
|
|
|
2666
2666
|
side_effects: true;
|
|
2667
2667
|
input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
2668
2668
|
cell_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
2669
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
2670
2669
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
2670
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
2671
2671
|
data?: ({
|
|
2672
2672
|
label?: string | undefined;
|
|
2673
2673
|
summary?: string | undefined;
|
|
@@ -2675,8 +2675,8 @@ export declare const cell_update_action_spec: {
|
|
|
2675
2675
|
visibility?: "private" | "public" | undefined;
|
|
2676
2676
|
}, {
|
|
2677
2677
|
cell_id: string;
|
|
2678
|
-
path?: string | null | undefined;
|
|
2679
2678
|
acting?: string | undefined;
|
|
2679
|
+
path?: string | null | undefined;
|
|
2680
2680
|
data?: ({
|
|
2681
2681
|
label?: string | undefined;
|
|
2682
2682
|
summary?: string | undefined;
|
|
@@ -3943,8 +3943,8 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
3943
3943
|
summary?: string | undefined;
|
|
3944
3944
|
} & Record<string, unknown>;
|
|
3945
3945
|
kind?: string | null | undefined;
|
|
3946
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
3947
3946
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
3947
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
3948
3948
|
parent_id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | null | undefined;
|
|
3949
3949
|
visibility?: "private" | "public" | undefined;
|
|
3950
3950
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -3954,8 +3954,8 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
3954
3954
|
summary?: string | undefined;
|
|
3955
3955
|
} & Record<string, unknown>;
|
|
3956
3956
|
kind?: string | null | undefined;
|
|
3957
|
-
path?: string | null | undefined;
|
|
3958
3957
|
acting?: string | undefined;
|
|
3958
|
+
path?: string | null | undefined;
|
|
3959
3959
|
parent_id?: string | null | undefined;
|
|
3960
3960
|
visibility?: "private" | "public" | undefined;
|
|
3961
3961
|
policy?: ({} & Record<string, unknown>) | null | undefined;
|
|
@@ -4154,12 +4154,12 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
4154
4154
|
side_effects: false;
|
|
4155
4155
|
input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
4156
4156
|
id?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
4157
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
4158
4157
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
4158
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | undefined;
|
|
4159
4159
|
}, {
|
|
4160
4160
|
id?: string | undefined;
|
|
4161
|
-
path?: string | undefined;
|
|
4162
4161
|
acting?: string | undefined;
|
|
4162
|
+
path?: string | undefined;
|
|
4163
4163
|
}, "object", {
|
|
4164
4164
|
id: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined, string | undefined, "optional", 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<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | 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<"lazy"> | 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<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | 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<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
|
|
4165
4165
|
readonly '~types'?: {
|
|
@@ -4181,18 +4181,18 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
4181
4181
|
}>>;
|
|
4182
4182
|
}>;
|
|
4183
4183
|
output: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
4184
|
-
items: {
|
|
4185
|
-
created_at: string;
|
|
4186
|
-
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4187
|
-
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
4188
|
-
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4189
|
-
}[];
|
|
4190
4184
|
fields: {
|
|
4191
4185
|
name: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellFieldName">;
|
|
4192
4186
|
created_at: string;
|
|
4193
4187
|
source_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4194
4188
|
target_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4195
4189
|
}[];
|
|
4190
|
+
items: {
|
|
4191
|
+
created_at: string;
|
|
4192
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4193
|
+
position: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellItemPosition">;
|
|
4194
|
+
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4195
|
+
}[];
|
|
4196
4196
|
cell: {
|
|
4197
4197
|
kind: string | null;
|
|
4198
4198
|
id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
@@ -4219,18 +4219,18 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
4219
4219
|
can_edit: boolean;
|
|
4220
4220
|
can_grant: boolean;
|
|
4221
4221
|
}, {
|
|
4222
|
-
items: {
|
|
4223
|
-
created_at: string;
|
|
4224
|
-
parent_id: string;
|
|
4225
|
-
position: string;
|
|
4226
|
-
child_id: string;
|
|
4227
|
-
}[];
|
|
4228
4222
|
fields: {
|
|
4229
4223
|
name: string;
|
|
4230
4224
|
created_at: string;
|
|
4231
4225
|
source_id: string;
|
|
4232
4226
|
target_id: string;
|
|
4233
4227
|
}[];
|
|
4228
|
+
items: {
|
|
4229
|
+
created_at: string;
|
|
4230
|
+
parent_id: string;
|
|
4231
|
+
position: string;
|
|
4232
|
+
child_id: string;
|
|
4233
|
+
}[];
|
|
4234
4234
|
cell: {
|
|
4235
4235
|
kind: string | null;
|
|
4236
4236
|
id: string;
|
|
@@ -4460,8 +4460,8 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
4460
4460
|
side_effects: true;
|
|
4461
4461
|
input: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
4462
4462
|
cell_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
4463
|
-
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
4464
4463
|
acting?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid"> | undefined;
|
|
4464
|
+
path?: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "CellPath"> | null | undefined;
|
|
4465
4465
|
data?: ({
|
|
4466
4466
|
label?: string | undefined;
|
|
4467
4467
|
summary?: string | undefined;
|
|
@@ -4469,8 +4469,8 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
4469
4469
|
visibility?: "private" | "public" | undefined;
|
|
4470
4470
|
}, {
|
|
4471
4471
|
cell_id: string;
|
|
4472
|
-
path?: string | null | undefined;
|
|
4473
4472
|
acting?: string | undefined;
|
|
4473
|
+
path?: string | null | undefined;
|
|
4474
4474
|
data?: ({
|
|
4475
4475
|
label?: string | undefined;
|
|
4476
4476
|
summary?: string | undefined;
|
|
@@ -114,7 +114,7 @@ export type CellCreateVerdict = {
|
|
|
114
114
|
* It runs after the manage and root-only gates, so it decides validity, never
|
|
115
115
|
* authority: throw `jsonrpc_errors.invalid_params` with
|
|
116
116
|
* `ERROR_CELL_POLICY_INVALID` (or a reason of the consumer's), or a
|
|
117
|
-
* `
|
|
117
|
+
* `SchemaError`, which the handler turns into
|
|
118
118
|
* `invalid_params`. **Omitted
|
|
119
119
|
* refuses every policy** (`ERROR_CELL_POLICY_UNSUPPORTED`, the Rust trait's
|
|
120
120
|
* default): an authorizer that reads no policy stores none.
|
|
@@ -133,7 +133,7 @@ export interface CellCreateAuthorize {
|
|
|
133
133
|
* existing cell's on an update carrying `data` (`kind` is write-once), the
|
|
134
134
|
* source's for every row a clone writes (on the merged data). It accepts or
|
|
135
135
|
* throws, never rewrites: the handler stores the caller's `data` as sent, and
|
|
136
|
-
* it must not mutate it. A thrown `
|
|
136
|
+
* it must not mutate it. A thrown `SchemaError`
|
|
137
137
|
* (`parse_or_throw`) becomes the standard `invalid_params` JSON-RPC error so
|
|
138
138
|
* per-kind validation failures surface to clients with code -32602 (not
|
|
139
139
|
* -32603 / internal); throw a `JsonrpcError`
|
|
@@ -171,7 +171,7 @@ export const create_cell_actions = (deps) => {
|
|
|
171
171
|
const { validate_data, authorize_create } = deps;
|
|
172
172
|
/**
|
|
173
173
|
* Run the optional `validate_data` deps callback and convert any thrown
|
|
174
|
-
* `
|
|
174
|
+
* `SchemaError` (`is_schema_validation_error`) into the
|
|
175
175
|
* standard `invalid_params` JSON-RPC error so per-kind validation
|
|
176
176
|
* failures surface to clients with code -32602 (not -32603 / internal).
|
|
177
177
|
* The dispatcher only converts validation failures of wire-level input
|
|
@@ -185,7 +185,7 @@ export const create_cell_actions = (deps) => {
|
|
|
185
185
|
}
|
|
186
186
|
catch (err) {
|
|
187
187
|
if (is_schema_validation_error(err)) {
|
|
188
|
-
throw jsonrpc_errors.invalid_params('cell.data shape validation failed', dev_only(() => ({ issues: to_wire_issues(err.issues
|
|
188
|
+
throw jsonrpc_errors.invalid_params('cell.data shape validation failed', dev_only(() => ({ issues: to_wire_issues(err.issues) })));
|
|
189
189
|
}
|
|
190
190
|
throw err;
|
|
191
191
|
}
|
|
@@ -193,7 +193,7 @@ export const create_cell_actions = (deps) => {
|
|
|
193
193
|
/**
|
|
194
194
|
* Validate a non-null policy write through the mounted authorizer's
|
|
195
195
|
* `validate_policy` — `ERROR_CELL_POLICY_UNSUPPORTED` when there is none
|
|
196
|
-
* (no authorizer, or one without the member). A thrown
|
|
196
|
+
* (no authorizer, or one without the member). A thrown
|
|
197
197
|
* `SchemaError` becomes `invalid_params`, as `validate_data_or_throw` does.
|
|
198
198
|
*/
|
|
199
199
|
const validate_policy_write = (policy) => {
|
|
@@ -204,7 +204,7 @@ export const create_cell_actions = (deps) => {
|
|
|
204
204
|
}
|
|
205
205
|
catch (err) {
|
|
206
206
|
if (is_schema_validation_error(err)) {
|
|
207
|
-
throw jsonrpc_errors.invalid_params('cell.policy validation failed', dev_only(() => ({ issues: to_wire_issues(err.issues
|
|
207
|
+
throw jsonrpc_errors.invalid_params('cell.policy validation failed', dev_only(() => ({ issues: to_wire_issues(err.issues) })));
|
|
208
208
|
}
|
|
209
209
|
throw err;
|
|
210
210
|
}
|
|
@@ -319,7 +319,7 @@ export const create_cell_actions = (deps) => {
|
|
|
319
319
|
row = await query_cell_create(ctx, {
|
|
320
320
|
// Boundary cast: `CellData` is structurally JSON-compatible at
|
|
321
321
|
// runtime (loose object of JSON-safe values), but its inferred
|
|
322
|
-
// type carries `T | undefined` from
|
|
322
|
+
// type carries `T | undefined` from `optional` which doesn't
|
|
323
323
|
// extend `Json`. The DB column is JSONB; the cast trusts the
|
|
324
324
|
// schema-validated runtime shape.
|
|
325
325
|
data: input.data,
|