@fuzdev/fuz_app 0.166.0 → 0.168.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 +10 -9
- 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_dispatcher.d.ts +1 -1
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +1 -1
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +1 -1
- package/dist/actions/action_event_data.d.ts +260 -65
- package/dist/actions/action_event_data.d.ts.map +1 -1
- package/dist/actions/action_event_data.js +11 -11
- package/dist/actions/action_event_types.d.ts +5 -14
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_event_types.js +3 -3
- package/dist/actions/action_rpc.js +5 -5
- package/dist/actions/action_spec.d.ts +8 -26
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +4 -4
- package/dist/actions/broadcast_api.d.ts +1 -1
- package/dist/actions/broadcast_api.js +1 -1
- package/dist/actions/cancel.d.ts +17 -9
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +3 -3
- package/dist/actions/heartbeat.d.ts +3 -4
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +4 -4
- package/dist/actions/peer_ping.d.ts +63 -23
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +20 -19
- package/dist/actions/peer_request.d.ts +6 -3
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/peer_request.js +8 -2
- package/dist/actions/perform_action.d.ts +1 -1
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/transports.d.ts +2 -3
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +0 -4
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +4 -3
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +6 -5
- package/dist/auth/CLAUDE.md +10 -8
- 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/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 +9 -8
- package/dist/http/jsonrpc.d.ts +231 -152
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +55 -85
- package/dist/http/jsonrpc_errors.d.ts +22 -4
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +37 -4
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +13 -12
- package/dist/testing/CLAUDE.md +6 -3
- 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/peer_ping_ws.d.ts +3 -2
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +49 -2
- package/dist/testing/rpc_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +13 -14
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +11 -11
- package/dist/testing/transports/ws_client.js +1 -1
- package/dist/ui/SurfaceExplorer.svelte +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_item_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_item_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"cell_item_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_item_action_specs.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { meta } from '@fuzdev/fuz_schema/meta.ts';
|
|
13
|
+
import { array, boolean, brand, literal, object, optional, pipe, regex } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
14
|
import { FRACTIONAL_INDEX_LENGTH_MAX, FRACTIONAL_INDEX_REGEX } from '@fuzdev/fuz_util/fractional_index.ts';
|
|
15
|
-
import { ActingActor } from '../
|
|
15
|
+
import { ActingActor, bounded_string, Timestamp, Uuid } from '../primitive_schemas_fuz.js';
|
|
16
16
|
import { CellRelationListLimit } from './cell_relation_list_limit.js';
|
|
17
17
|
// -- Error reasons ----------------------------------------------------------
|
|
18
18
|
/** Error reason — `cell_item_list` got neither or both of `parent_id` and `child_id`. */
|
|
@@ -37,24 +37,22 @@ export const ERROR_CELL_ITEM_POSITION_TAKEN = 'cell_item_position_taken';
|
|
|
37
37
|
* contract; the no-trailing-`'0'` invariant lives in the helper, not the
|
|
38
38
|
* wire.
|
|
39
39
|
*/
|
|
40
|
-
export const CellItemPosition = bounded_string({ min: 1, max: FRACTIONAL_INDEX_LENGTH_MAX })
|
|
41
|
-
.regex(FRACTIONAL_INDEX_REGEX)
|
|
42
|
-
.brand('CellItemPosition');
|
|
40
|
+
export const CellItemPosition = brand(pipe(bounded_string({ min: 1, max: FRACTIONAL_INDEX_LENGTH_MAX }), regex(FRACTIONAL_INDEX_REGEX)), 'CellItemPosition');
|
|
43
41
|
/**
|
|
44
42
|
* Wire-format for a `cell_item` row.
|
|
45
43
|
*
|
|
46
44
|
* `position` is branded `CellItemPosition` so consumers that round-trip
|
|
47
45
|
* the value back into a `position_after` / `position` input field don't
|
|
48
46
|
* need a cast at every call site. Wire ingress is validated by the
|
|
49
|
-
* `CellItemPosition`
|
|
47
|
+
* `CellItemPosition` schema (alphabet + length); wire egress trusts
|
|
50
48
|
* the DB CHECK constraint that backs `cell_item.position`, so the
|
|
51
49
|
* server-side `to_item_json` casts a raw string from `CellItemRow`.
|
|
52
50
|
*/
|
|
53
|
-
export const ItemJson =
|
|
51
|
+
export const ItemJson = object({
|
|
54
52
|
parent_id: Uuid,
|
|
55
53
|
position: CellItemPosition,
|
|
56
54
|
child_id: Uuid,
|
|
57
|
-
created_at:
|
|
55
|
+
created_at: Timestamp
|
|
58
56
|
});
|
|
59
57
|
// -- cell_item_insert -------------------------------------------------------
|
|
60
58
|
/**
|
|
@@ -63,37 +61,37 @@ export const ItemJson = z.strictObject({
|
|
|
63
61
|
* client-side. Returns `cell_item_position_taken` on `(parent_id,
|
|
64
62
|
* position)` unique violation; client refreshes bracket and retries.
|
|
65
63
|
*/
|
|
66
|
-
export const CellItemInsertInput =
|
|
67
|
-
parent_id:
|
|
68
|
-
child_id:
|
|
69
|
-
position:
|
|
64
|
+
export const CellItemInsertInput = object({
|
|
65
|
+
parent_id: meta(Uuid, { description: 'Cell to insert into.' }),
|
|
66
|
+
child_id: meta(Uuid, { description: 'Cell to insert as a child.' }),
|
|
67
|
+
position: meta(CellItemPosition, {
|
|
70
68
|
description: 'Fractional-indexing key. Client-computed via `fractional_index_between`.'
|
|
71
69
|
}),
|
|
72
70
|
acting: ActingActor
|
|
73
71
|
});
|
|
74
|
-
export const CellItemInsertOutput =
|
|
72
|
+
export const CellItemInsertOutput = object({ item: ItemJson });
|
|
75
73
|
// -- cell_item_move ---------------------------------------------------------
|
|
76
74
|
/**
|
|
77
75
|
* Input for `cell_item_move`. Move within the same parent (cross-parent
|
|
78
76
|
* moves are a future extension).
|
|
79
77
|
*/
|
|
80
|
-
export const CellItemMoveInput =
|
|
81
|
-
parent_id:
|
|
82
|
-
position:
|
|
83
|
-
new_position:
|
|
78
|
+
export const CellItemMoveInput = object({
|
|
79
|
+
parent_id: meta(Uuid, { description: 'Parent cell.' }),
|
|
80
|
+
position: meta(CellItemPosition, { description: 'Current position of the row to move.' }),
|
|
81
|
+
new_position: meta(CellItemPosition, { description: 'New fractional-indexing key.' }),
|
|
84
82
|
acting: ActingActor
|
|
85
83
|
});
|
|
86
|
-
export const CellItemMoveOutput =
|
|
84
|
+
export const CellItemMoveOutput = object({ item: ItemJson });
|
|
87
85
|
// -- cell_item_delete -------------------------------------------------------
|
|
88
86
|
/** Input for `cell_item_delete`. Idempotent on the slot key. */
|
|
89
|
-
export const CellItemDeleteInput =
|
|
90
|
-
parent_id:
|
|
91
|
-
position:
|
|
87
|
+
export const CellItemDeleteInput = object({
|
|
88
|
+
parent_id: meta(Uuid, { description: 'Parent cell.' }),
|
|
89
|
+
position: meta(CellItemPosition, { description: 'Slot to delete.' }),
|
|
92
90
|
acting: ActingActor
|
|
93
91
|
});
|
|
94
|
-
export const CellItemDeleteOutput =
|
|
95
|
-
ok:
|
|
96
|
-
deleted:
|
|
92
|
+
export const CellItemDeleteOutput = object({
|
|
93
|
+
ok: literal(true),
|
|
94
|
+
deleted: boolean
|
|
97
95
|
});
|
|
98
96
|
// -- cell_item_list ---------------------------------------------------------
|
|
99
97
|
/**
|
|
@@ -110,23 +108,21 @@ export const CellItemDeleteOutput = z.strictObject({
|
|
|
110
108
|
* `position_after` (return rows with `position > position_after`); the
|
|
111
109
|
* reverse listing has no cursor, oldest item first.
|
|
112
110
|
*/
|
|
113
|
-
export const CellItemListInput =
|
|
114
|
-
|
|
115
|
-
parent_id: Uuid.optional().meta({
|
|
111
|
+
export const CellItemListInput = meta(object({
|
|
112
|
+
parent_id: meta(optional(Uuid), {
|
|
116
113
|
description: 'List forward items whose parent is this cell.'
|
|
117
114
|
}),
|
|
118
|
-
child_id:
|
|
115
|
+
child_id: meta(optional(Uuid), {
|
|
119
116
|
description: 'List reverse parents whose child is this cell.'
|
|
120
117
|
}),
|
|
121
|
-
position_after:
|
|
118
|
+
position_after: meta(optional(CellItemPosition), {
|
|
122
119
|
description: 'Cursor for forward pagination — return rows whose position > this.'
|
|
123
120
|
}),
|
|
124
121
|
limit: CellRelationListLimit,
|
|
125
122
|
acting: ActingActor
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
items: z.array(ItemJson)
|
|
123
|
+
}), { empty_input_handler_guarded: true });
|
|
124
|
+
export const CellItemListOutput = object({
|
|
125
|
+
items: array(ItemJson)
|
|
130
126
|
});
|
|
131
127
|
// -- Action specs -----------------------------------------------------------
|
|
132
128
|
export const cell_item_insert_action_spec = {
|
|
@@ -40,7 +40,7 @@ export const to_item_json = (row) => ({
|
|
|
40
40
|
parent_id: row.parent_id,
|
|
41
41
|
// `cell.position` is a DB-shape string; brand at the wire boundary so
|
|
42
42
|
// consumers can round-trip it without casting (the DB CHECK constraint
|
|
43
|
-
// is the runtime validator on egress, the
|
|
43
|
+
// is the runtime validator on egress, the `CellItemPosition` schema is the validator
|
|
44
44
|
// on ingress).
|
|
45
45
|
position: row.position,
|
|
46
46
|
child_id: row.child_id,
|
|
@@ -6,30 +6,79 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { type Infer } from '@fuzdev/fuz_schema/schema.ts';
|
|
10
10
|
/** Metadata envelope for `cell_item_insert`. */
|
|
11
|
-
export declare const CellItemInsertAuditMetadata:
|
|
12
|
-
parent_id:
|
|
13
|
-
position:
|
|
14
|
-
child_id:
|
|
15
|
-
},
|
|
16
|
-
|
|
11
|
+
export declare const CellItemInsertAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
12
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
13
|
+
position: string;
|
|
14
|
+
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
15
|
+
} & Record<string, unknown>, {
|
|
16
|
+
parent_id: string;
|
|
17
|
+
position: string;
|
|
18
|
+
child_id: string;
|
|
19
|
+
} & Record<string, unknown>, "loose_object", {
|
|
20
|
+
parent_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">)[]> & {
|
|
21
|
+
readonly '~types'?: {
|
|
22
|
+
readonly input: string;
|
|
23
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
24
|
+
} | undefined;
|
|
25
|
+
};
|
|
26
|
+
position: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
27
|
+
child_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">)[]> & {
|
|
28
|
+
readonly '~types'?: {
|
|
29
|
+
readonly input: string;
|
|
30
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
export type CellItemInsertAuditMetadata = Infer<typeof CellItemInsertAuditMetadata>;
|
|
17
35
|
/**
|
|
18
36
|
* Metadata envelope for `cell_item_move`. Carries both old and new
|
|
19
37
|
* position so the audit trail shows the reorder without a join back to
|
|
20
38
|
* the live row.
|
|
21
39
|
*/
|
|
22
|
-
export declare const CellItemMoveAuditMetadata:
|
|
23
|
-
parent_id:
|
|
24
|
-
position_old:
|
|
25
|
-
position_new:
|
|
26
|
-
},
|
|
27
|
-
|
|
40
|
+
export declare const CellItemMoveAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
41
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
42
|
+
position_old: string;
|
|
43
|
+
position_new: string;
|
|
44
|
+
} & Record<string, unknown>, {
|
|
45
|
+
parent_id: string;
|
|
46
|
+
position_old: string;
|
|
47
|
+
position_new: string;
|
|
48
|
+
} & Record<string, unknown>, "loose_object", {
|
|
49
|
+
parent_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">)[]> & {
|
|
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
|
+
position_old: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
56
|
+
position_new: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
57
|
+
}>;
|
|
58
|
+
export type CellItemMoveAuditMetadata = Infer<typeof CellItemMoveAuditMetadata>;
|
|
28
59
|
/** Metadata envelope for `cell_item_delete`. */
|
|
29
|
-
export declare const CellItemDeleteAuditMetadata:
|
|
30
|
-
parent_id:
|
|
31
|
-
position:
|
|
32
|
-
child_id:
|
|
33
|
-
},
|
|
34
|
-
|
|
60
|
+
export declare const CellItemDeleteAuditMetadata: import("@fuzdev/fuz_schema/schema.ts").Schema<{
|
|
61
|
+
parent_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
62
|
+
position: string;
|
|
63
|
+
child_id: import("@fuzdev/fuz_schema/schema.ts").Branded<string, "Uuid">;
|
|
64
|
+
} & Record<string, unknown>, {
|
|
65
|
+
parent_id: string;
|
|
66
|
+
position: string;
|
|
67
|
+
child_id: string;
|
|
68
|
+
} & Record<string, unknown>, "loose_object", {
|
|
69
|
+
parent_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">)[]> & {
|
|
70
|
+
readonly '~types'?: {
|
|
71
|
+
readonly input: string;
|
|
72
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
73
|
+
} | undefined;
|
|
74
|
+
};
|
|
75
|
+
position: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
76
|
+
child_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">)[]> & {
|
|
77
|
+
readonly '~types'?: {
|
|
78
|
+
readonly input: string;
|
|
79
|
+
readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>;
|
|
80
|
+
} | undefined;
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
export type CellItemDeleteAuditMetadata = Infer<typeof CellItemDeleteAuditMetadata>;
|
|
35
84
|
//# sourceMappingURL=cell_item_audit_metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_item_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_item_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"cell_item_audit_metadata.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_item_audit_metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAIhF,gDAAgD;AAChD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAItC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEhF,gDAAgD;AAChD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAItC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import { Uuid } from '../
|
|
9
|
+
import { loose_object, string } from '@fuzdev/fuz_schema/schema.ts';
|
|
10
|
+
import { Uuid } from '../primitive_schemas_fuz.js';
|
|
11
11
|
/** Metadata envelope for `cell_item_insert`. */
|
|
12
|
-
export const CellItemInsertAuditMetadata =
|
|
12
|
+
export const CellItemInsertAuditMetadata = loose_object({
|
|
13
13
|
parent_id: Uuid,
|
|
14
|
-
position:
|
|
14
|
+
position: string,
|
|
15
15
|
child_id: Uuid
|
|
16
16
|
});
|
|
17
17
|
/**
|
|
@@ -19,14 +19,14 @@ export const CellItemInsertAuditMetadata = z.looseObject({
|
|
|
19
19
|
* position so the audit trail shows the reorder without a join back to
|
|
20
20
|
* the live row.
|
|
21
21
|
*/
|
|
22
|
-
export const CellItemMoveAuditMetadata =
|
|
22
|
+
export const CellItemMoveAuditMetadata = loose_object({
|
|
23
23
|
parent_id: Uuid,
|
|
24
|
-
position_old:
|
|
25
|
-
position_new:
|
|
24
|
+
position_old: string,
|
|
25
|
+
position_new: string
|
|
26
26
|
});
|
|
27
27
|
/** Metadata envelope for `cell_item_delete`. */
|
|
28
|
-
export const CellItemDeleteAuditMetadata =
|
|
28
|
+
export const CellItemDeleteAuditMetadata = loose_object({
|
|
29
29
|
parent_id: Uuid,
|
|
30
|
-
position:
|
|
30
|
+
position: string,
|
|
31
31
|
child_id: Uuid
|
|
32
32
|
});
|
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import { z } from 'zod';
|
|
14
13
|
/** Cap on a relation-list page, forward and reverse alike. */
|
|
15
14
|
export declare const CELL_RELATION_LIST_LIMIT_MAX = 500;
|
|
16
15
|
/** The page size a relation list that omits `limit` gets, forward and reverse alike. */
|
|
17
16
|
export declare const CELL_RELATION_LIST_LIMIT_DEFAULT = 50;
|
|
18
17
|
/** The `limit` input of `cell_field_list` and `cell_item_list`. */
|
|
19
|
-
export declare const CellRelationListLimit:
|
|
18
|
+
export declare const CellRelationListLimit: import("@fuzdev/fuz_schema/schema.ts").Schema<number | undefined, number | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<number, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>>>>;
|
|
20
19
|
//# sourceMappingURL=cell_relation_list_limit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_relation_list_limit.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_relation_list_limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"cell_relation_list_limit.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_relation_list_limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,8DAA8D;AAC9D,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,wFAAwF;AACxF,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,2SAKjC,CAAC"}
|
|
@@ -10,18 +10,13 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { meta } from '@fuzdev/fuz_schema/meta.ts';
|
|
14
|
+
import { integer, max_value, min_value, number, optional, pipe } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
15
|
/** Cap on a relation-list page, forward and reverse alike. */
|
|
15
16
|
export const CELL_RELATION_LIST_LIMIT_MAX = 500;
|
|
16
17
|
/** The page size a relation list that omits `limit` gets, forward and reverse alike. */
|
|
17
18
|
export const CELL_RELATION_LIST_LIMIT_DEFAULT = 50;
|
|
18
19
|
/** The `limit` input of `cell_field_list` and `cell_item_list`. */
|
|
19
|
-
export const CellRelationListLimit =
|
|
20
|
-
.number()
|
|
21
|
-
.int()
|
|
22
|
-
.positive()
|
|
23
|
-
.max(CELL_RELATION_LIST_LIMIT_MAX)
|
|
24
|
-
.optional()
|
|
25
|
-
.meta({
|
|
20
|
+
export const CellRelationListLimit = meta(optional(pipe(number, integer, min_value(1), max_value(CELL_RELATION_LIST_LIMIT_MAX))), {
|
|
26
21
|
description: `The most edges a page holds, each one whose other end the caller can view — forward and reverse alike: default ${CELL_RELATION_LIST_LIMIT_DEFAULT}, max ${CELL_RELATION_LIST_LIMIT_MAX}.`
|
|
27
22
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `cell.moderation` read rules, in pure and SQL form side by side.
|
|
3
3
|
*
|
|
4
|
-
* `moderation` is
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `moderation` is `null` or one of the three markers below: the create
|
|
5
|
+
* authorizer's verdict and `cell_moderate` write nothing else, and `CellJson`
|
|
6
|
+
* refuses any other on the wire. Each rule names the markers it admits.
|
|
7
7
|
*
|
|
8
8
|
* **Audience admission** — `cell_moderation_admits_audience` and
|
|
9
9
|
* `cell_moderation_admits_audience_sql`: unmoderated (`null`) or `'approved'`.
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
* **Stewardship** — `cell_moderation_is_stewardable` and
|
|
18
18
|
* `cell_moderation_is_stewardable_sql`: exactly `'pending'` or `'rejected'`, the
|
|
19
19
|
* states in which the governing root's manager reads a contribution its
|
|
20
|
-
* audience can't (`can_steward_cell`).
|
|
21
|
-
* nor stewardable, so only its owner and admins read it.
|
|
20
|
+
* audience can't (`can_steward_cell`).
|
|
22
21
|
*
|
|
23
22
|
* The pure and SQL forms are written once each here, next to each other, over
|
|
24
23
|
* the same literal constants; every predicate and query composes them rather
|
|
@@ -34,8 +33,8 @@ export declare const CELL_MODERATION_APPROVED = "approved";
|
|
|
34
33
|
export declare const CELL_MODERATION_REJECTED = "rejected";
|
|
35
34
|
/**
|
|
36
35
|
* Whether a cell's `moderation` marker admits it to an audience beyond its
|
|
37
|
-
* owner — unmoderated (`null`) or `'approved'`; `'pending'
|
|
38
|
-
*
|
|
36
|
+
* owner — unmoderated (`null`) or `'approved'`; `'pending'` and `'rejected'`
|
|
37
|
+
* do not.
|
|
39
38
|
*
|
|
40
39
|
* @param moderation - the cell's `moderation` column
|
|
41
40
|
* @returns whether the public and grant read arms may admit the cell
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_moderation.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/db/cell_moderation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cell_moderation.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/db/cell_moderation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,YAAY,CAAC;AAEjD,sDAAsD;AACtD,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAAI,YAAY,MAAM,GAAG,IAAI,KAAG,OACb,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,GAAI,OAAO,MAAM,KAAG,MACmB,CAAC;AAExF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GAAI,YAAY,MAAM,GAAG,IAAI,KAAG,OACO,CAAC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,GAAI,OAAO,MAAM,KAAG,MACoB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `cell.moderation` read rules, in pure and SQL form side by side.
|
|
3
3
|
*
|
|
4
|
-
* `moderation` is
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `moderation` is `null` or one of the three markers below: the create
|
|
5
|
+
* authorizer's verdict and `cell_moderate` write nothing else, and `CellJson`
|
|
6
|
+
* refuses any other on the wire. Each rule names the markers it admits.
|
|
7
7
|
*
|
|
8
8
|
* **Audience admission** — `cell_moderation_admits_audience` and
|
|
9
9
|
* `cell_moderation_admits_audience_sql`: unmoderated (`null`) or `'approved'`.
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
* **Stewardship** — `cell_moderation_is_stewardable` and
|
|
18
18
|
* `cell_moderation_is_stewardable_sql`: exactly `'pending'` or `'rejected'`, the
|
|
19
19
|
* states in which the governing root's manager reads a contribution its
|
|
20
|
-
* audience can't (`can_steward_cell`).
|
|
21
|
-
* nor stewardable, so only its owner and admins read it.
|
|
20
|
+
* audience can't (`can_steward_cell`).
|
|
22
21
|
*
|
|
23
22
|
* The pure and SQL forms are written once each here, next to each other, over
|
|
24
23
|
* the same literal constants; every predicate and query composes them rather
|
|
@@ -34,8 +33,8 @@ export const CELL_MODERATION_APPROVED = 'approved';
|
|
|
34
33
|
export const CELL_MODERATION_REJECTED = 'rejected';
|
|
35
34
|
/**
|
|
36
35
|
* Whether a cell's `moderation` marker admits it to an audience beyond its
|
|
37
|
-
* owner — unmoderated (`null`) or `'approved'`; `'pending'
|
|
38
|
-
*
|
|
36
|
+
* owner — unmoderated (`null`) or `'approved'`; `'pending'` and `'rejected'`
|
|
37
|
+
* do not.
|
|
39
38
|
*
|
|
40
39
|
* @param moderation - the cell's `moderation` column
|
|
41
40
|
* @returns whether the public and grant read arms may admit the cell
|
package/dist/http/CLAUDE.md
CHANGED
|
@@ -30,7 +30,7 @@ effects, see ../../../docs/architecture.md.
|
|
|
30
30
|
- `http/client_ip.ts` — `get_client_ip(c)` — reads the resolved IP off the context (set by `proxy.ts`'s middleware). Split out of `proxy.ts` so it's hono-free: dispatch + route modules that only _read_ the IP don't pull `hono/utils/ipaddr`, keeping cross-process test surfaces free of the optional `hono` peer.
|
|
31
31
|
- `http/ip_canonical.ts` — RFC 5952 IPv6 canonicalization + IPv4-mapped collapse, `rate_limit_ip_key` (an IPv6 client's `/64`), and its own `parse_ipv4_bits` / `parse_ipv6_bits` (the grammar of Rust's `IpAddr::from_str`); `IP_LITERAL_CHARS` regex. Imports nothing — the dispatcher keys its IP limiter through it, so it must stay hono-free (`src/test/hono_free_modules.test.ts` walks every `src/lib` module's graph).
|
|
32
32
|
- `http/origin.ts` — origin allowlist: the strict pattern grammar shared with the Rust spine, typed refusals, and the Origin-only middleware.
|
|
33
|
-
- `http/jsonrpc.ts` — JSON-RPC 2.0 envelope schemas (MCP superset), `JsonrpcErrorCode
|
|
33
|
+
- `http/jsonrpc.ts` — JSON-RPC 2.0 envelope schemas (MCP superset, fuz_schema), `JsonrpcErrorCode`.
|
|
34
34
|
- `http/jsonrpc_errors.ts` — `ThrownJsonrpcError`, `jsonrpc_errors` throwers, HTTP-status mappings.
|
|
35
35
|
- `http/jsonrpc_helpers.ts` — message builders, type guards, input/result normalizers, and `classify_jsonrpc_message`, the one envelope classifier both transports run.
|
|
36
36
|
- `http/health_schema.ts` — `HEALTH_PATH` + the `HealthResponse` schema (a fuz_schema `object`), browser-safe, shared by the health route spec and the client probe (`ui/backend_probe.svelte.ts`).
|
|
@@ -490,12 +490,12 @@ schemas), `http/jsonrpc_errors.ts` runtime (throwable + map),
|
|
|
490
490
|
`http/jsonrpc_helpers.ts` plumbing (builders, guards, converters).
|
|
491
491
|
|
|
492
492
|
Follows JSON-RPC 2.0 spec with a partial **MCP superset** posture — params
|
|
493
|
-
are object-only (no positional arrays) and
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
are object-only (no positional arrays), and the envelopes are fuz_schema
|
|
494
|
+
`loose_object`s that keep members a reader passes over; result is any value
|
|
495
|
+
(`unknown`, which needs its key) since the per-action `spec.output` is the
|
|
496
496
|
actual contract and the MCP object-only result constraint would reject any
|
|
497
|
-
spec declaring
|
|
498
|
-
|
|
497
|
+
spec declaring a null or primitive output on the wire. A parse returns the
|
|
498
|
+
frame itself, not a copy.
|
|
499
499
|
|
|
500
500
|
`_meta` is intentionally **not** envelope-validated — that lives in
|
|
501
501
|
per-action schemas so mismatches surface as `invalid_params` rather than
|
|
@@ -551,11 +551,12 @@ which holds a declaration to the same rules.
|
|
|
551
551
|
- `to_thrown_jsonrpc_error(err)` — the one thrown → wire conversion: the `JsonrpcErrorObject` a `ThrownJsonrpcError` carries, recognized by a realm-global `Symbol.for` brand on its prototype (so one from a second fuz_app copy is read too), when its `code` is a JSON-RPC error code; else `null` — a foreign error class with a JSON-RPC-shaped `code` (another library's RPC error) or a `DOMException` included. Read by the REST catch layer, `perform_action`, `create_jsonrpc_error_response_from_thrown`, the frontend HTTP and WS transports, and `ActionEvent`'s handler-throw normalization, each masking everything else its own way
|
|
552
552
|
- `jsonrpc_error_code_to_http_status` / `http_status_to_jsonrpc_error_code` (fall back to 500 / `internal_error`) — the code → status table is module-private; `HTTP_STATUS_TO_JSONRPC_ERROR_CODE` (frozen) is the reverse over the base set
|
|
553
553
|
- `register_jsonrpc_error_code(code, http_status)` — declares a consumer code's status (see **Consumer codes** above)
|
|
554
|
-
- Envelope schemas in `http/jsonrpc.ts
|
|
554
|
+
- Envelope schemas in `http/jsonrpc.ts` (fuz_schema): `JsonrpcRequest`, `JsonrpcNotification`, `JsonrpcResponse`, `JsonrpcErrorResponse`, `JsonrpcResponseOrError`, `JsonrpcErrorObject`, `JsonrpcErrorCode` (`JsonrpcServerErrorCode` an integer in the server range, as `is_jsonrpc_error_code` reads it). Also `JsonrpcRequestId`, `JsonrpcMethod`, `JsonrpcResult`, and the params. `JsonrpcMessage`, `JsonrpcMessageFromClientToServer`, and `JsonrpcMessageFromServerToClient` are types only
|
|
555
|
+
- `parse_inbound_jsonrpc_error(error)` — a peer's error reply read as the Rust `parse_inbound_error` reads it: a code off the base set (a consumer's code included) is `internal_error`, a non-string message `'peer error'`, an own `data` kept as sent; what `PendingPeerRequests.resolve` hands the caller
|
|
555
556
|
- Builders in `http/jsonrpc_helpers.ts`: `create_jsonrpc_request`, `create_jsonrpc_notification`, `create_jsonrpc_response`, `create_jsonrpc_error_response`, `create_jsonrpc_error_response_from_thrown` (preserves code/message/data on a thrown JSON-RPC error, via `to_thrown_jsonrpc_error`; plain `Error` → `internal_error` with `{stack}` in DEV)
|
|
556
557
|
- Type guards: `is_jsonrpc_request_id` (rejects NaN/Infinity), `is_jsonrpc_object`, `is_jsonrpc_request` / `_notification` / `_response` / `_error_response`
|
|
557
558
|
- Converters: `to_jsonrpc_message_id`, `to_jsonrpc_params` (normalizes primitives to `{value}`)
|
|
558
|
-
- Classifier: `classify_jsonrpc_message(json)` → `ClassifiedJsonrpcMessage` (`request` / `notification` / `response` / `invalid`, the last carrying the error and the id to answer it on), twin of the Rust `fuz_http::classify` in order and answers. The WS frame handler and the HTTP POST handler switch on it, each keeping its transport's arms: WS refuses batches before it, routes `cancel` and peer responses, and checks duplicate ids and the in-flight ceiling after; POST answers a notification or a response `invalid_request` on `id: null`. Only a refused request envelope carries data — the schema's issues, DEV-only. A `request` carries the frame as parsed, validated but not rebuilt, so an own `__proto__` key in `params` reaches the dispatcher, which refuses it (`ERROR_PARAMS_PROTO_KEY`) as on GET and the Rust spine (a
|
|
559
|
+
- Classifier: `classify_jsonrpc_message(json)` → `ClassifiedJsonrpcMessage` (`request` / `notification` / `response` / `invalid`, the last carrying the error and the id to answer it on), twin of the Rust `fuz_http::classify` in order and answers. The WS frame handler and the HTTP POST handler switch on it, each keeping its transport's arms: WS refuses batches before it, routes `cancel` and peer responses, and checks duplicate ids and the in-flight ceiling after; POST answers a notification or a response `invalid_request` on `id: null`. Only a refused request envelope carries data — the schema's issues, DEV-only. A `request` carries the frame as parsed, validated but not rebuilt, so an own `__proto__` key in `params` reaches the dispatcher, which refuses it (`ERROR_PARAMS_PROTO_KEY`) as on GET and the Rust spine (a rebuilt copy would drop it).
|
|
559
560
|
|
|
560
561
|
Handlers can `throw jsonrpc_errors.*` — `apply_route_specs`' error-catch
|
|
561
562
|
layer converts to the flat REST body (`{error: <reason>, message?, ...rest_data}`)
|