@fuzdev/fuz_app 0.103.0 → 0.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/CLAUDE.md +29 -11
- package/dist/auth/cell_action_specs.d.ts +226 -1
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +79 -1
- package/dist/auth/cell_actions.d.ts +32 -9
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +126 -12
- package/dist/auth/cell_audit_events.d.ts +1 -1
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_events.js +3 -2
- package/dist/auth/cell_audit_metadata.d.ts +15 -0
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +11 -0
- package/dist/db/CLAUDE.md +16 -6
- package/dist/db/cell_ddl.d.ts +14 -1
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +20 -0
- package/dist/db/cell_queries.d.ts +45 -0
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +40 -3
- package/dist/testing/CLAUDE.md +25 -16
- package/dist/testing/cross_backend/cell_gated_create.d.ts +24 -0
- package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.js +177 -35
- package/dist/testing/cross_backend/expected_schema.json +3 -0
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +7 -4
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +12 -7
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts.map +1 -1
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.js +54 -15
- package/package.json +1 -1
package/dist/auth/CLAUDE.md
CHANGED
|
@@ -176,10 +176,14 @@ consumer's `validate_data` pass-through callback on `CellActionDeps`.
|
|
|
176
176
|
`visibility` / `path`), the write-once capability/identity axis; a stray
|
|
177
177
|
`kind` inside `data` is rejected fail-loud (`ERROR_CELL_KIND_IN_DATA`).
|
|
178
178
|
- `auth/cell_action_specs.ts` — `CellVisibility` enum, `CellPath` brand,
|
|
179
|
-
`CellJson`, the
|
|
180
|
-
delete / list / clone`), error reasons, and `all_cell_action_specs`
|
|
179
|
+
`CellJson`, the generic verb specs (`cell_create / get / update /
|
|
180
|
+
delete / list / clone / moderate`), error reasons, and `all_cell_action_specs`
|
|
181
181
|
(spreads in the grant / field / item / audit registries so codegen + UI
|
|
182
|
-
see one cell namespace). `CellJson` has no hub axis; `path` is global.
|
|
182
|
+
see one cell namespace). `CellJson` has no hub axis; `path` is global. The
|
|
183
|
+
directory-tree columns `parent_id` / `root_id` (containment, immutable in v1)
|
|
184
|
+
- the `moderation` lifecycle marker (`pending` / `approved` / `rejected`) are
|
|
185
|
+
top-level `CellJson` keys, peer to `visibility` (set by the create authorizer's
|
|
186
|
+
verdict + the `cell_moderate` verb, never in `data`).
|
|
183
187
|
- `auth/cell_grant_action_specs.ts` / `cell_field_action_specs.ts` /
|
|
184
188
|
`cell_item_action_specs.ts` / `cell_audit_action_specs.ts` — the
|
|
185
189
|
`cell_grant_*` (3) / `cell_field_*` (3) / `cell_item_*` (4) /
|
|
@@ -204,18 +208,32 @@ auth, ids)`: batched strict relation-read filter. Every relation read —
|
|
|
204
208
|
Two queries for the whole id-set (avoids the N+1 of a per-row check). The
|
|
205
209
|
reverse list verbs additionally cap the fetch by the wire `limit` so a
|
|
206
210
|
heavily inbound-linked target can't force an unbounded scan.
|
|
207
|
-
- `auth/cell_actions.ts` — `create_cell_actions(deps)`, the
|
|
211
|
+
- `auth/cell_actions.ts` — `create_cell_actions(deps)`, the generic
|
|
208
212
|
handlers. `cell_create` stamps `created_by` + writes the top-level `kind`
|
|
209
|
-
column; `path` writes are admin-only.
|
|
213
|
+
column; `path` writes are admin-only. It also resolves the directory tree:
|
|
214
|
+
`parent_id` (wire) → the governing `root_id` (`parent.root_id ?? parent.id`),
|
|
215
|
+
**404**-masking a hidden parent. `cell_update` gates `visibility`
|
|
210
216
|
writes on `can_manage_cell` (`ERROR_CELL_VISIBILITY_MANAGE_ONLY`) and
|
|
211
|
-
**never touches `kind`**
|
|
217
|
+
**never touches `kind`** / `parent_id` / `root_id` / `moderation` (all
|
|
218
|
+
write-once-at-birth or control-gated, never on the update patch).
|
|
212
219
|
`cell_get` bundles visibility-filtered `fields` + `items` (one over the cap
|
|
213
220
|
for truncation detection). `cell_clone` deep-walks viewable children only
|
|
214
|
-
(each clone inherits its source's `kind
|
|
215
|
-
dep (`CellCreateAuthorize` — wider
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
(each clone inherits its source's `kind`; clones are unparented). The optional
|
|
222
|
+
parent-aware `authorize_create` dep (`CellCreateAuthorize` — wider input
|
|
223
|
+
`{kind, data, parent_id, root_id, root_data, scope_id}` than `validate_data`,
|
|
224
|
+
returning a `CellCreateVerdict` `{allow:false} | {allow:true, moderation_required}`)
|
|
225
|
+
gates create by capability; it runs after the validator + the parent-resolve.
|
|
226
|
+
A **viewable**-parent / root-creation deny is **403** `cell_create_forbidden`
|
|
227
|
+
(the create-path **404** mask is reserved for a hidden parent); `Allow` folds
|
|
228
|
+
the moderation outcome (born `pending`+private vs `approved`+author-visibility).
|
|
229
|
+
The authorizer is **pure** — the handler reads the governing root's `data`
|
|
230
|
+
in-tx and hands it over as `root_data`, so a directory policy resolves
|
|
231
|
+
`root.data.policy[kind]` without its own DB read (which also dodges the
|
|
232
|
+
single-connection PGlite deadlock). `None`/omitted = open create (the default;
|
|
233
|
+
mirrors `validate_data`). `cell_moderate` is the `pending → approved | rejected`
|
|
234
|
+
transition, gated on `can_manage_cell` of the **governing root** (admin / root
|
|
235
|
+
owner — the author lands a 403, the anti-self-approval guard); approve flips
|
|
236
|
+
`moderation → approved` + `visibility → public`, reject sets `rejected`.
|
|
219
237
|
- `auth/cell_grant_actions.ts` / `cell_field_actions.ts` /
|
|
220
238
|
`cell_item_actions.ts` / `cell_audit_actions.ts` — the relation + ACL +
|
|
221
239
|
audit handlers, exporting `to_grant_json` / `to_field_json` /
|
|
@@ -71,6 +71,29 @@ export declare const ERROR_CELL_KIND_IN_DATA: "cell_kind_in_data";
|
|
|
71
71
|
* `null | non-empty-string` (twin of the Rust `ERROR_CELL_KIND_EMPTY`).
|
|
72
72
|
*/
|
|
73
73
|
export declare const ERROR_CELL_KIND_EMPTY: "cell_kind_empty";
|
|
74
|
+
/**
|
|
75
|
+
* Error reason — the parent-aware `CellCreateAuthorize` denied the create for a
|
|
76
|
+
* **viewable** parent (or a root creation): "you see it, you can't contribute
|
|
77
|
+
* here." A **403** `forbidden`, distinct from the create-path **404** mask used
|
|
78
|
+
* when the parent itself isn't viewable (twin of the Rust
|
|
79
|
+
* `ERROR_CELL_CREATE_FORBIDDEN`).
|
|
80
|
+
*/
|
|
81
|
+
export declare const ERROR_CELL_CREATE_FORBIDDEN: "cell_create_forbidden";
|
|
82
|
+
/**
|
|
83
|
+
* Error reason — `cell_moderate` caller can view the contribution but lacks
|
|
84
|
+
* moderation authority over its governing root (not admin / not the root's
|
|
85
|
+
* manager). A **403** `forbidden`. The author can view their own pending
|
|
86
|
+
* contribution, so they reach this gate — and are denied here, which is the
|
|
87
|
+
* anti-self-approval guard (twin of the Rust `ERROR_CELL_MODERATE_FORBIDDEN`).
|
|
88
|
+
*/
|
|
89
|
+
export declare const ERROR_CELL_MODERATE_FORBIDDEN: "cell_moderate_forbidden";
|
|
90
|
+
/**
|
|
91
|
+
* Error reason — `cell_moderate` target has no governing root (`root_id` is
|
|
92
|
+
* null): it's a root or an unparented cell, not a gated contribution, so there
|
|
93
|
+
* is nothing to moderate. A **400** `invalid_params` (twin of the Rust
|
|
94
|
+
* `ERROR_CELL_NOT_A_CONTRIBUTION`).
|
|
95
|
+
*/
|
|
96
|
+
export declare const ERROR_CELL_NOT_A_CONTRIBUTION: "cell_not_a_contribution";
|
|
74
97
|
/**
|
|
75
98
|
* Error reason — null-auth `cell_list` caller passed a `created_by`
|
|
76
99
|
* filter. The filter is a soft account-id enumeration vector ("does
|
|
@@ -146,6 +169,9 @@ export declare const CellJson: z.ZodObject<{
|
|
|
146
169
|
public: "public";
|
|
147
170
|
}>;
|
|
148
171
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
172
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
173
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
174
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
149
175
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
150
176
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
151
177
|
created_at: z.ZodString;
|
|
@@ -170,6 +196,7 @@ export declare const CellCreateInput: z.ZodObject<{
|
|
|
170
196
|
public: "public";
|
|
171
197
|
}>>;
|
|
172
198
|
path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
|
|
199
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
|
|
173
200
|
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
174
201
|
}, z.core.$strict>;
|
|
175
202
|
export type CellCreateInput = z.infer<typeof CellCreateInput>;
|
|
@@ -187,6 +214,9 @@ export declare const CellCreateOutput: z.ZodObject<{
|
|
|
187
214
|
public: "public";
|
|
188
215
|
}>;
|
|
189
216
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
217
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
218
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
219
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
190
220
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
191
221
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
192
222
|
created_at: z.ZodString;
|
|
@@ -231,6 +261,9 @@ export declare const CellGetOutput: z.ZodObject<{
|
|
|
231
261
|
public: "public";
|
|
232
262
|
}>;
|
|
233
263
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
264
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
265
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
266
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
234
267
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
235
268
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
236
269
|
created_at: z.ZodString;
|
|
@@ -292,6 +325,9 @@ export declare const CellUpdateOutput: z.ZodObject<{
|
|
|
292
325
|
public: "public";
|
|
293
326
|
}>;
|
|
294
327
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
328
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
329
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
330
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
295
331
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
296
332
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
297
333
|
created_at: z.ZodString;
|
|
@@ -341,6 +377,8 @@ export declare const CellListInput: z.ZodDefault<z.ZodObject<{
|
|
|
341
377
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>;
|
|
342
378
|
created_by: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
343
379
|
path_prefix: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
380
|
+
root_id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
381
|
+
moderation: z.ZodOptional<z.ZodString>;
|
|
344
382
|
shared_with: z.ZodOptional<z.ZodLiteral<"me">>;
|
|
345
383
|
order_by: z.ZodOptional<z.ZodEnum<{
|
|
346
384
|
created_at: "created_at";
|
|
@@ -369,6 +407,9 @@ export declare const CellListOutput: z.ZodObject<{
|
|
|
369
407
|
public: "public";
|
|
370
408
|
}>;
|
|
371
409
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
410
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
411
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
412
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
372
413
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
373
414
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
374
415
|
created_at: z.ZodString;
|
|
@@ -422,6 +463,9 @@ export declare const CellCloneOutput: z.ZodObject<{
|
|
|
422
463
|
public: "public";
|
|
423
464
|
}>;
|
|
424
465
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
466
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
467
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
468
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
425
469
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
426
470
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
427
471
|
created_at: z.ZodString;
|
|
@@ -431,6 +475,60 @@ export declare const CellCloneOutput: z.ZodObject<{
|
|
|
431
475
|
}, z.core.$strict>;
|
|
432
476
|
}, z.core.$strict>;
|
|
433
477
|
export type CellCloneOutput = z.infer<typeof CellCloneOutput>;
|
|
478
|
+
/**
|
|
479
|
+
* The terminal transition a `cell_moderate` call applies to a gated
|
|
480
|
+
* contribution's `moderation` lifecycle. The born state (`'pending'`) is set
|
|
481
|
+
* by the create authorizer, never on the wire; the verb only moves it to a
|
|
482
|
+
* terminal state. `'approved'` publishes (also flips `visibility → 'public'`);
|
|
483
|
+
* `'rejected'` leaves it private.
|
|
484
|
+
*/
|
|
485
|
+
export declare const CellModerationDecision: z.ZodEnum<{
|
|
486
|
+
rejected: "rejected";
|
|
487
|
+
approved: "approved";
|
|
488
|
+
}>;
|
|
489
|
+
export type CellModerationDecision = z.infer<typeof CellModerationDecision>;
|
|
490
|
+
/**
|
|
491
|
+
* Input for `cell_moderate` — the `pending → approved | rejected` transition,
|
|
492
|
+
* gated on moderation authority over the **governing root** (admin / root
|
|
493
|
+
* owner in v1), not the contribution (which the author manages, and could
|
|
494
|
+
* otherwise self-approve). 404 when the target isn't viewable; 403 when it is
|
|
495
|
+
* but the caller isn't a root manager (the author lands here).
|
|
496
|
+
*/
|
|
497
|
+
export declare const CellModerateInput: z.ZodObject<{
|
|
498
|
+
cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
499
|
+
moderation: z.ZodEnum<{
|
|
500
|
+
rejected: "rejected";
|
|
501
|
+
approved: "approved";
|
|
502
|
+
}>;
|
|
503
|
+
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
504
|
+
}, z.core.$strict>;
|
|
505
|
+
export type CellModerateInput = z.infer<typeof CellModerateInput>;
|
|
506
|
+
export declare const CellModerateOutput: z.ZodObject<{
|
|
507
|
+
cell: z.ZodObject<{
|
|
508
|
+
id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
509
|
+
path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
510
|
+
data: z.ZodObject<{
|
|
511
|
+
label: z.ZodOptional<z.ZodString>;
|
|
512
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
513
|
+
}, z.core.$loose>;
|
|
514
|
+
kind: z.ZodNullable<z.ZodString>;
|
|
515
|
+
visibility: z.ZodEnum<{
|
|
516
|
+
private: "private";
|
|
517
|
+
public: "public";
|
|
518
|
+
}>;
|
|
519
|
+
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
520
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
521
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
522
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
523
|
+
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
524
|
+
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
525
|
+
created_at: z.ZodString;
|
|
526
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
527
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
528
|
+
grant_count: z.ZodNumber;
|
|
529
|
+
}, z.core.$strict>;
|
|
530
|
+
}, z.core.$strict>;
|
|
531
|
+
export type CellModerateOutput = z.infer<typeof CellModerateOutput>;
|
|
434
532
|
export declare const cell_create_action_spec: {
|
|
435
533
|
method: string;
|
|
436
534
|
kind: "request_response";
|
|
@@ -451,6 +549,7 @@ export declare const cell_create_action_spec: {
|
|
|
451
549
|
public: "public";
|
|
452
550
|
}>>;
|
|
453
551
|
path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
|
|
552
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
|
|
454
553
|
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
455
554
|
}, z.core.$strict>;
|
|
456
555
|
output: z.ZodObject<{
|
|
@@ -467,6 +566,9 @@ export declare const cell_create_action_spec: {
|
|
|
467
566
|
public: "public";
|
|
468
567
|
}>;
|
|
469
568
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
569
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
570
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
571
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
470
572
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
471
573
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
472
574
|
created_at: z.ZodString;
|
|
@@ -507,6 +609,9 @@ export declare const cell_get_action_spec: {
|
|
|
507
609
|
public: "public";
|
|
508
610
|
}>;
|
|
509
611
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
612
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
613
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
614
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
510
615
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
511
616
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
512
617
|
created_at: z.ZodString;
|
|
@@ -571,6 +676,9 @@ export declare const cell_update_action_spec: {
|
|
|
571
676
|
public: "public";
|
|
572
677
|
}>;
|
|
573
678
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
679
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
680
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
681
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
574
682
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
575
683
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
576
684
|
created_at: z.ZodString;
|
|
@@ -621,6 +729,8 @@ export declare const cell_list_action_spec: {
|
|
|
621
729
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>;
|
|
622
730
|
created_by: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
623
731
|
path_prefix: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
732
|
+
root_id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
733
|
+
moderation: z.ZodOptional<z.ZodString>;
|
|
624
734
|
shared_with: z.ZodOptional<z.ZodLiteral<"me">>;
|
|
625
735
|
order_by: z.ZodOptional<z.ZodEnum<{
|
|
626
736
|
created_at: "created_at";
|
|
@@ -648,6 +758,9 @@ export declare const cell_list_action_spec: {
|
|
|
648
758
|
public: "public";
|
|
649
759
|
}>;
|
|
650
760
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
761
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
762
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
763
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
651
764
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
652
765
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
653
766
|
created_at: z.ZodString;
|
|
@@ -705,6 +818,55 @@ export declare const cell_clone_action_spec: {
|
|
|
705
818
|
public: "public";
|
|
706
819
|
}>;
|
|
707
820
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
821
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
822
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
823
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
824
|
+
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
825
|
+
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
826
|
+
created_at: z.ZodString;
|
|
827
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
828
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
829
|
+
grant_count: z.ZodNumber;
|
|
830
|
+
}, z.core.$strict>;
|
|
831
|
+
}, z.core.$strict>;
|
|
832
|
+
async: true;
|
|
833
|
+
rate_limit: "account";
|
|
834
|
+
description: string;
|
|
835
|
+
};
|
|
836
|
+
export declare const cell_moderate_action_spec: {
|
|
837
|
+
method: string;
|
|
838
|
+
kind: "request_response";
|
|
839
|
+
initiator: "frontend";
|
|
840
|
+
auth: {
|
|
841
|
+
account: "required";
|
|
842
|
+
actor: "required";
|
|
843
|
+
};
|
|
844
|
+
side_effects: true;
|
|
845
|
+
input: z.ZodObject<{
|
|
846
|
+
cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
847
|
+
moderation: z.ZodEnum<{
|
|
848
|
+
rejected: "rejected";
|
|
849
|
+
approved: "approved";
|
|
850
|
+
}>;
|
|
851
|
+
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
852
|
+
}, z.core.$strict>;
|
|
853
|
+
output: z.ZodObject<{
|
|
854
|
+
cell: z.ZodObject<{
|
|
855
|
+
id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
856
|
+
path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
857
|
+
data: z.ZodObject<{
|
|
858
|
+
label: z.ZodOptional<z.ZodString>;
|
|
859
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
860
|
+
}, z.core.$loose>;
|
|
861
|
+
kind: z.ZodNullable<z.ZodString>;
|
|
862
|
+
visibility: z.ZodEnum<{
|
|
863
|
+
private: "private";
|
|
864
|
+
public: "public";
|
|
865
|
+
}>;
|
|
866
|
+
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
867
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
868
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
869
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
708
870
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
709
871
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
710
872
|
created_at: z.ZodString;
|
|
@@ -719,7 +881,7 @@ export declare const cell_clone_action_spec: {
|
|
|
719
881
|
};
|
|
720
882
|
/**
|
|
721
883
|
* All cell-layer action specs — composed by app registries. Bundles the
|
|
722
|
-
*
|
|
884
|
+
* seven generic verbs (this module), the three `cell_grant_*` specs, the
|
|
723
885
|
* three `cell_field_*` specs, the four `cell_item_*` specs, and the
|
|
724
886
|
* `cell_audit_list` spec so codegen + UI clients see a single cell
|
|
725
887
|
* namespace.
|
|
@@ -744,6 +906,7 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
744
906
|
public: "public";
|
|
745
907
|
}>>;
|
|
746
908
|
path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
|
|
909
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
|
|
747
910
|
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
748
911
|
}, z.core.$strict>;
|
|
749
912
|
output: z.ZodObject<{
|
|
@@ -760,6 +923,9 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
760
923
|
public: "public";
|
|
761
924
|
}>;
|
|
762
925
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
926
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
927
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
928
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
763
929
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
764
930
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
765
931
|
created_at: z.ZodString;
|
|
@@ -799,6 +965,9 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
799
965
|
public: "public";
|
|
800
966
|
}>;
|
|
801
967
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
968
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
969
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
970
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
802
971
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
803
972
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
804
973
|
created_at: z.ZodString;
|
|
@@ -862,6 +1031,9 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
862
1031
|
public: "public";
|
|
863
1032
|
}>;
|
|
864
1033
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
1034
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1035
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1036
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
865
1037
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
866
1038
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
867
1039
|
created_at: z.ZodString;
|
|
@@ -910,6 +1082,8 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
910
1082
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>;
|
|
911
1083
|
created_by: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
912
1084
|
path_prefix: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
1085
|
+
root_id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1086
|
+
moderation: z.ZodOptional<z.ZodString>;
|
|
913
1087
|
shared_with: z.ZodOptional<z.ZodLiteral<"me">>;
|
|
914
1088
|
order_by: z.ZodOptional<z.ZodEnum<{
|
|
915
1089
|
created_at: "created_at";
|
|
@@ -937,6 +1111,9 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
937
1111
|
public: "public";
|
|
938
1112
|
}>;
|
|
939
1113
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
1114
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1115
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1116
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
940
1117
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
941
1118
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
942
1119
|
created_at: z.ZodString;
|
|
@@ -993,6 +1170,54 @@ export declare const all_cell_action_specs: readonly [{
|
|
|
993
1170
|
public: "public";
|
|
994
1171
|
}>;
|
|
995
1172
|
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
1173
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1174
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1175
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
1176
|
+
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1177
|
+
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1178
|
+
created_at: z.ZodString;
|
|
1179
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
1180
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
1181
|
+
grant_count: z.ZodNumber;
|
|
1182
|
+
}, z.core.$strict>;
|
|
1183
|
+
}, z.core.$strict>;
|
|
1184
|
+
async: true;
|
|
1185
|
+
rate_limit: "account";
|
|
1186
|
+
description: string;
|
|
1187
|
+
}, {
|
|
1188
|
+
method: string;
|
|
1189
|
+
kind: "request_response";
|
|
1190
|
+
initiator: "frontend";
|
|
1191
|
+
auth: {
|
|
1192
|
+
account: "required";
|
|
1193
|
+
actor: "required";
|
|
1194
|
+
};
|
|
1195
|
+
side_effects: true;
|
|
1196
|
+
input: z.ZodObject<{
|
|
1197
|
+
cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
1198
|
+
moderation: z.ZodEnum<{
|
|
1199
|
+
rejected: "rejected";
|
|
1200
|
+
approved: "approved";
|
|
1201
|
+
}>;
|
|
1202
|
+
acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1203
|
+
}, z.core.$strict>;
|
|
1204
|
+
output: z.ZodObject<{
|
|
1205
|
+
cell: z.ZodObject<{
|
|
1206
|
+
id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
|
|
1207
|
+
path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
|
|
1208
|
+
data: z.ZodObject<{
|
|
1209
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1211
|
+
}, z.core.$loose>;
|
|
1212
|
+
kind: z.ZodNullable<z.ZodString>;
|
|
1213
|
+
visibility: z.ZodEnum<{
|
|
1214
|
+
private: "private";
|
|
1215
|
+
public: "public";
|
|
1216
|
+
}>;
|
|
1217
|
+
refs: z.ZodNullable<z.ZodArray<z.core.$ZodBranded<z.ZodString, "FactHash", "out">>>;
|
|
1218
|
+
parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1219
|
+
root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
1220
|
+
moderation: z.ZodNullable<z.ZodString>;
|
|
996
1221
|
created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
997
1222
|
updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
|
|
998
1223
|
created_at: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,OAAO,EAEN,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,0BAA0B,EAC1B,6BAA6B,EAC7B,2BAA2B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEN,2BAA2B,EAC3B,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;EAAgC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAO5D,OAAO,EAAC,6BAA6B,EAAE,6BAA6B,EAAE,2BAA2B,EAAC,CAAC;AACnG,OAAO,EAAC,0BAA0B,EAAE,6BAA6B,EAAE,2BAA2B,EAAC,CAAC;AAChG,OAAO,EACN,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,GAC1B,CAAC;AACF,OAAO,EAAC,2BAA2B,EAAC,CAAC;AAIrC,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,EAAG,gBAAyB,CAAC;AAE9D,yEAAyE;AACzE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAC"}
|
|
@@ -77,6 +77,29 @@ export const ERROR_CELL_KIND_IN_DATA = 'cell_kind_in_data';
|
|
|
77
77
|
* `null | non-empty-string` (twin of the Rust `ERROR_CELL_KIND_EMPTY`).
|
|
78
78
|
*/
|
|
79
79
|
export const ERROR_CELL_KIND_EMPTY = 'cell_kind_empty';
|
|
80
|
+
/**
|
|
81
|
+
* Error reason — the parent-aware `CellCreateAuthorize` denied the create for a
|
|
82
|
+
* **viewable** parent (or a root creation): "you see it, you can't contribute
|
|
83
|
+
* here." A **403** `forbidden`, distinct from the create-path **404** mask used
|
|
84
|
+
* when the parent itself isn't viewable (twin of the Rust
|
|
85
|
+
* `ERROR_CELL_CREATE_FORBIDDEN`).
|
|
86
|
+
*/
|
|
87
|
+
export const ERROR_CELL_CREATE_FORBIDDEN = 'cell_create_forbidden';
|
|
88
|
+
/**
|
|
89
|
+
* Error reason — `cell_moderate` caller can view the contribution but lacks
|
|
90
|
+
* moderation authority over its governing root (not admin / not the root's
|
|
91
|
+
* manager). A **403** `forbidden`. The author can view their own pending
|
|
92
|
+
* contribution, so they reach this gate — and are denied here, which is the
|
|
93
|
+
* anti-self-approval guard (twin of the Rust `ERROR_CELL_MODERATE_FORBIDDEN`).
|
|
94
|
+
*/
|
|
95
|
+
export const ERROR_CELL_MODERATE_FORBIDDEN = 'cell_moderate_forbidden';
|
|
96
|
+
/**
|
|
97
|
+
* Error reason — `cell_moderate` target has no governing root (`root_id` is
|
|
98
|
+
* null): it's a root or an unparented cell, not a gated contribution, so there
|
|
99
|
+
* is nothing to moderate. A **400** `invalid_params` (twin of the Rust
|
|
100
|
+
* `ERROR_CELL_NOT_A_CONTRIBUTION`).
|
|
101
|
+
*/
|
|
102
|
+
export const ERROR_CELL_NOT_A_CONTRIBUTION = 'cell_not_a_contribution';
|
|
80
103
|
/**
|
|
81
104
|
* Error reason — null-auth `cell_list` caller passed a `created_by`
|
|
82
105
|
* filter. The filter is a soft account-id enumeration vector ("does
|
|
@@ -150,6 +173,15 @@ export const CellJson = z.strictObject({
|
|
|
150
173
|
description: "Access-control tag. `'public'` admits everyone (including unauthenticated visitors); `'private'` (default) admits admin / owner / `cell_grant`-admitted callers. Top-level column, not inside `data`.",
|
|
151
174
|
}),
|
|
152
175
|
refs: z.array(FactHashSchema).nullable(),
|
|
176
|
+
parent_id: Uuid.nullable().meta({
|
|
177
|
+
description: 'Immediate container in the directory tree (the directory this cell lives in). `null` = a root (parentless). Set once at create, immutable in v1.',
|
|
178
|
+
}),
|
|
179
|
+
root_id: Uuid.nullable().meta({
|
|
180
|
+
description: 'Governing root of the directory subtree, denormalized for flat-subtree queries (`root_id = parent.root_id ?? parent.id`). `null` for a root. Set once at create, immutable in v1.',
|
|
181
|
+
}),
|
|
182
|
+
moderation: z.string().nullable().meta({
|
|
183
|
+
description: "Approval-lifecycle marker for a gated contribution (`'pending'` / `'approved'` / `'rejected'`); `null` = unmoderated. A control field with a non-author writer — peer to `visibility`, never inside `data` (set by the create authorizer's verdict, transitioned only by `cell_moderate`).",
|
|
184
|
+
}),
|
|
153
185
|
created_by: Uuid.nullable(),
|
|
154
186
|
updated_by: Uuid.nullable(),
|
|
155
187
|
created_at: z.string(),
|
|
@@ -178,6 +210,9 @@ export const CellCreateInput = z.strictObject({
|
|
|
178
210
|
path: CellPath.nullish().meta({
|
|
179
211
|
description: 'Admin-only named lookup alias. Globally unique on active rows.',
|
|
180
212
|
}),
|
|
213
|
+
parent_id: Uuid.nullish().meta({
|
|
214
|
+
description: 'Immediate container — the directory this cell is created in. Omit / null = a root (parentless). The handler resolves `root_id` from it and gates the create through the parent-aware authorizer; `root_id` / `moderation` are handler-derived, never wire input.',
|
|
215
|
+
}),
|
|
181
216
|
acting: ActingActor,
|
|
182
217
|
});
|
|
183
218
|
export const CellCreateOutput = z.strictObject({ cell: CellJson });
|
|
@@ -282,6 +317,12 @@ export const CellListInput = z
|
|
|
282
317
|
path_prefix: CellPath.optional().meta({
|
|
283
318
|
description: 'Match cells whose path starts with this.',
|
|
284
319
|
}),
|
|
320
|
+
root_id: Uuid.optional().meta({
|
|
321
|
+
description: 'Scope to a directory subtree by governing root (`cell.root_id = ?`) — the feed + mod-queue key.',
|
|
322
|
+
}),
|
|
323
|
+
moderation: z.string().optional().meta({
|
|
324
|
+
description: "Filter by moderation lifecycle marker (`'pending'` drives the moderation queue).",
|
|
325
|
+
}),
|
|
285
326
|
shared_with: z.literal('me').optional().meta({
|
|
286
327
|
description: 'Narrow to cells admitting the caller via `cell_grant`, excluding cells the caller owns. Self-only — a `Uuid` form would need cross-actor role_grant loading.',
|
|
287
328
|
}),
|
|
@@ -320,6 +361,30 @@ export const CellCloneInput = z.strictObject({
|
|
|
320
361
|
acting: ActingActor,
|
|
321
362
|
});
|
|
322
363
|
export const CellCloneOutput = z.strictObject({ cell: CellJson });
|
|
364
|
+
// -- cell_moderate ----------------------------------------------------------
|
|
365
|
+
/**
|
|
366
|
+
* The terminal transition a `cell_moderate` call applies to a gated
|
|
367
|
+
* contribution's `moderation` lifecycle. The born state (`'pending'`) is set
|
|
368
|
+
* by the create authorizer, never on the wire; the verb only moves it to a
|
|
369
|
+
* terminal state. `'approved'` publishes (also flips `visibility → 'public'`);
|
|
370
|
+
* `'rejected'` leaves it private.
|
|
371
|
+
*/
|
|
372
|
+
export const CellModerationDecision = z.enum(['approved', 'rejected']);
|
|
373
|
+
/**
|
|
374
|
+
* Input for `cell_moderate` — the `pending → approved | rejected` transition,
|
|
375
|
+
* gated on moderation authority over the **governing root** (admin / root
|
|
376
|
+
* owner in v1), not the contribution (which the author manages, and could
|
|
377
|
+
* otherwise self-approve). 404 when the target isn't viewable; 403 when it is
|
|
378
|
+
* but the caller isn't a root manager (the author lands here).
|
|
379
|
+
*/
|
|
380
|
+
export const CellModerateInput = z.strictObject({
|
|
381
|
+
cell_id: Uuid.meta({ description: 'Contribution to moderate.' }),
|
|
382
|
+
moderation: CellModerationDecision.meta({
|
|
383
|
+
description: 'Terminal decision: `approved` (publishes, visibility → public) or `rejected`.',
|
|
384
|
+
}),
|
|
385
|
+
acting: ActingActor,
|
|
386
|
+
});
|
|
387
|
+
export const CellModerateOutput = z.strictObject({ cell: CellJson });
|
|
323
388
|
// -- Action specs -----------------------------------------------------------
|
|
324
389
|
export const cell_create_action_spec = {
|
|
325
390
|
method: 'cell_create',
|
|
@@ -391,9 +456,21 @@ export const cell_clone_action_spec = {
|
|
|
391
456
|
rate_limit: 'account',
|
|
392
457
|
description: 'Clone a cell (optionally deep). New owner is the caller; `path` is always nulled. Provenance recorded only in the `cell_clone` audit row. Per-account rate-limited — `deep: true` walks `cell_item` rows and fans out, so unbounded clone is a write-amplification vector.',
|
|
393
458
|
};
|
|
459
|
+
export const cell_moderate_action_spec = {
|
|
460
|
+
method: 'cell_moderate',
|
|
461
|
+
kind: 'request_response',
|
|
462
|
+
initiator: 'frontend',
|
|
463
|
+
auth: { account: 'required', actor: 'required' },
|
|
464
|
+
side_effects: true,
|
|
465
|
+
input: CellModerateInput,
|
|
466
|
+
output: CellModerateOutput,
|
|
467
|
+
async: true,
|
|
468
|
+
rate_limit: 'account',
|
|
469
|
+
description: 'Moderate a gated contribution (`pending → approved | rejected`). Gated on moderation authority over the governing root (admin / root owner), not the contribution — so the author cannot self-approve. Approval flips `moderation → approved` + `visibility → public`; rejection sets `moderation → rejected`. 404 on an unviewable target, 403 for a viewable target whose caller is not a root manager.',
|
|
470
|
+
};
|
|
394
471
|
/**
|
|
395
472
|
* All cell-layer action specs — composed by app registries. Bundles the
|
|
396
|
-
*
|
|
473
|
+
* seven generic verbs (this module), the three `cell_grant_*` specs, the
|
|
397
474
|
* three `cell_field_*` specs, the four `cell_item_*` specs, and the
|
|
398
475
|
* `cell_audit_list` spec so codegen + UI clients see a single cell
|
|
399
476
|
* namespace.
|
|
@@ -405,6 +482,7 @@ export const all_cell_action_specs = [
|
|
|
405
482
|
cell_delete_action_spec,
|
|
406
483
|
cell_list_action_spec,
|
|
407
484
|
cell_clone_action_spec,
|
|
485
|
+
cell_moderate_action_spec,
|
|
408
486
|
...all_cell_grant_action_specs,
|
|
409
487
|
...all_cell_field_action_specs,
|
|
410
488
|
...all_cell_item_action_specs,
|