auth/cell_action_specs.ts

Cell RPC action specs — the declarative contract for the generic cell verbs. App vocabulary (galleries, posts, events) lives in client-side helpers; the wire stays generic.

view source

Declarations
#

54 declarations

all_cell_action_specs
#

auth/cell_action_specs.ts view source

readonly [{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ data: { label?: string | undefined; summary?: string | undefined; } & Record<...>; ... 5 more ...; policy?: ({} & Record<...>) | ... 1 more ... | undefin... import {all_cell_action_specs} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

All cell-layer action specs — composed by app registries. Bundles the generic verbs (this module) with the cell_grant_*, cell_field_*, cell_item_*, and cell_audit_list specs so codegen + UI clients see a single cell namespace.

cell_clone_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ source_id: Branded<string, "Uuid">; acting?: Branded<...> | undefined; deep?: boolean | undefined; with_data_patch?: ({ ...; } & Record<...>) | undefined; }, { ...... import {cell_clone_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell_create_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ data: { label?: string | undefined; summary?: string | undefined; } & Record<...>; ... 5 more ...; policy?: ({} & Record<...>) | ... 1 more ... | undefined; }, { .... import {cell_create_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell_delete_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ cell_id: Branded<string, "Uuid">; acting?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...>; async: true; description: string; } import {cell_delete_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell_get_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "optional"; actor: "optional"; }; side_effects: false; input: Schema<{ id?: Branded<string, "Uuid"> | undefined; acting?: Branded<...> | undefined; path?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...... import {cell_get_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

CELL_KIND_LENGTH_MAX
#

auth/cell_action_specs.ts view source

64 import {CELL_KIND_LENGTH_MAX} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Maximum length of a cell kind on the wire, in UTF-16 code units (what String.length measures; enforced by bounded_string) — on cell_create, and on the cell_list filter. The cell layer imposes no grammar on kind; the bound is there because the tag is copied into every audit row the cell's mutations write. The same bound a cell field name carries (CELL_FIELD_NAME_REGEX), the cell layer's other machine-readable tag, and the same value as the Rust spine's CELL_KIND_LENGTH_MAX.

cell_list_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "optional"; actor: "optional"; }; side_effects: false; input: Schema<{ kind?: string | undefined; ids?: Branded<string, "Uuid">[] | undefined; ... 11 more ...; order_direction?: "asc" | ... 1 more ... | undefined; }, { ...; } | undef... import {cell_list_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

CELL_LIST_LIMIT_DEFAULT
#

CELL_LIST_LIMIT_MAX
#

auth/cell_action_specs.ts view source

200 import {CELL_LIST_LIMIT_MAX} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Soft cap on the size of a cell.list request page. Larger pages chew memory both server- and client-side; combined with the visibility predicate's filter cost, 200 is a safe ceiling.

cell_moderate_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ moderation: "approved" | "rejected"; cell_id: Branded<...>; acting?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...>; async: true; ... import {cell_moderate_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

CELL_PATH_LENGTH_MAX
#

auth/cell_action_specs.ts view source

256 import {CELL_PATH_LENGTH_MAX} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Wire form for cell.path.

At the spec level we only enforce that the value is a non-empty string with a sane upper bound — the cell layer is generic and doesn't impose a path grammar. App-side curation (well-known names like /map/main, /site/events) is admin-driven. The bound is in UTF-16 code units.

cell_policy_set_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ policy: ({} & Record<string, unknown>) | null; cell_id: Branded<...>; acting?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...>; asy... import {cell_policy_set_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

CELL_RELATIONS_BUNDLE_LIMIT
#

auth/cell_action_specs.ts view source

500 import {CELL_RELATIONS_BUNDLE_LIMIT} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Hard cap on bundled relation arrays in cell_get (per-relation LIMIT). Beyond this the response sets *_truncated: true and the client paginates via cell_item_list({parent_id, position_after}) / cell_field_list({source_id, name_after}).

cell_update_action_spec
#

auth/cell_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: Schema<{ cell_id: Branded<string, "Uuid">; data?: ({ ...; } & Record<...>) | undefined; acting?: Branded<...> | undefined; path?: Branded<...> | ... 1 more ... | undefined;... import {cell_update_action_spec} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

CellCloneInput
#

auth/cell_action_specs.ts view source

value + type

{ source_id: Branded<string, "Uuid">; acting?: Branded<string, "Uuid"> | undefined; deep?: boolean | undefined; with_data_patch?: ({ label?: string | undefined; summary?: string | undefined; } & Record<...>) | undefined; } import {CellCloneInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_clone. Source must be view-admitted by can_view_cell (404 otherwise — IDOR mask). The clone is owned by the caller; path is always nulled (admin-only paths can't auto-clone). Provenance lives only in the cell_clone audit row's source_id — no provenance fields are stamped into data.

source_id

type Branded

acting?

type Branded

deep?

type boolean

with_data_patch?

type CellData

CellCloneOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; } import {CellCloneOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell

type CellJson

CellCreateInput
#

auth/cell_action_specs.ts view source

value + type

{ data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; kind?: string | null | undefined; acting?: Branded<string, "Uuid"> | undefined; path?: Branded<...> | ... 1 more ... | undefined; visibility?: "private" | ... 1 more ... | undefined; parent_id?: Branded<...> | ... 1 more... import {CellCreateInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_create. created_by is NOT on the wire — the handler stamps it from auth.actor.id. path is admin-only; non-admin callers supplying path get ERROR_CELL_PATH_ADMIN_ONLY (forbidden).

data

type CellData

kind?

type string | null

acting?

type Branded

path?

type Branded | null

visibility?

type "private" | "public"

parent_id?

type Branded | null

policy?

type CellPolicy | null

CellCreateOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; } import {CellCreateOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell

type CellJson

CellDeleteInput
#

auth/cell_action_specs.ts view source

value + type

{ cell_id: Branded<string, "Uuid">; acting?: Branded<string, "Uuid"> | undefined; } import {CellDeleteInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell_id

type Branded

acting?

type Branded

CellDeleteOutput
#

auth/cell_action_specs.ts view source

value + type

{ ok: true; deleted: boolean; } import {CellDeleteOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

ok

type true

deleted

type boolean

CellGetInput
#

auth/cell_action_specs.ts view source

value + type

{ id?: Branded<string, "Uuid"> | undefined; acting?: Branded<string, "Uuid"> | undefined; path?: Branded<string, "CellPath"> | undefined; } import {CellGetInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_get. Pass id OR path (exactly one expected; both accepted, id takes precedence). Neither is invalid_params with ERROR_CELL_GET_REQUIRES_ID_OR_PATH, from the handler (the schema leaves both optional). The handler responds with 404 when no row matches OR when can_view_cell rejects the caller — same code so private-cell existence doesn't leak.

id?

type Branded

acting?

type Branded

path?

type Branded

CellGetOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; ... 5 more ...; can_grant: boolean; } import {CellGetOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Output for cell_get. Bundles relation arrays (fields + items) server-side via JOINs so the common "show this cell with its children" flow needs one round-trip. Targets are filtered to those the caller may view (strict target-visibility); *_truncated reports the relation's size before that filter, so it can be true while fewer than CELL_RELATIONS_BUNDLE_LIMIT edges are returned. Per-relation `LIMIT CELL_RELATIONS_BUNDLE_LIMIT`; clients paginate via cell_item_list({parent_id, position_after}) / cell_field_list({source_id}) when truncated.

cell

type CellJson

fields

type FieldJson[]

fields_truncated

type boolean

items

type ItemJson[]

items_truncated

type boolean

can_edit

type boolean

can_grant

type boolean

CellJson
#

auth/cell_action_specs.ts view source

value + type

{ kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; updated_at: string | null; ... 10 more ...; grant_count: number; } import {CellJson} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Wire form for a cell row. data is the typed-but-permissive CellData shape (kind / label / summary typed-and-optional, additional fields pass through). Per-kind shape validation is sub-API and handled by the app's validate_data deps callback (see auth/cell_actions.ts).

visibility is the access-control axis — a top-level column on the row, not a field inside data. cell_grant and visibility are the two ACL surfaces; both live as peers, not embedded in content.

path is the global namespace axis (no tenant/hub scoping).

Relations (items, fields) are NOT carried on the cell row — they live in the cell_item / cell_field sibling tables. Bundled arrays appear on CellGetOutput; other read verbs (cell_list) do not bundle.

kind

type string | null

data

type CellData

id

type Branded

created_at

type string

updated_at

type string | null

updated_by

type Branded | null

deleted_at

type string | null

created_by

type Branded | null

path

type Branded | null

visibility

type "private" | "public"

refs

type Branded[] | null

parent_id

type Branded | null

root_id

type Branded | null

moderation

type "pending" | "approved" | "rejected" | null

policy

type CellPolicy | null

grant_count

type number

CellListInput
#

auth/cell_action_specs.ts view source

value + type

{ kind?: string | undefined; ids?: Branded<string, "Uuid">[] | undefined; limit?: number | undefined; acting?: Branded<string, "Uuid"> | undefined; offset?: number | undefined; ... 8 more ...; order_direction?: "asc" | ... 1 more ... | undefined; } import {CellListInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_list. Filters are optional and combine with AND. The handler applies the SQL-side visibility predicate from query_cell_list so the page-window stays correct under pagination — post-filtering in JS would silently truncate pages.

ids is the batch-read filter — pass a list of cell ids to fetch them in one round-trip (avoids N+1 when rendering a collection's items[]). The visibility predicate still runs, so callers passing ids they can't view simply get fewer rows back. Capped at CELL_LIST_LIMIT_MAX.

shared_with: 'me' narrows to cells that admit the caller via a cell_grant row (actor-shaped or role-shaped principal) AND that the caller does not own. Authenticated only; combine with kind / path_prefix etc. to scope further. Combining with created_by: <my-actor-id> produces an empty result by definition (owner is implicit, never appears as a grant principal); we don't reject the combination at the schema layer because SQL emptiness is correct.

kind?

type string

ids?

type Branded[]

limit?

type number

acting?

type Branded

offset?

type number

created_by?

type Branded

visibility?

type "private" | "public"

root_id?

type Branded

moderation?

type "pending" | "approved" | "rejected"

ref?

type Branded

path_prefix?

type Branded

shared_with?

type "me"

order_by?

type "created_at" | "updated_at"

order_direction?

type "asc" | "desc"

CellListOutput
#

auth/cell_action_specs.ts view source

value + type

{ cells: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }[]; cell_grants?: Record<...> | undefined; } import {CellListOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cells

type CellJson[]

cell_grants?

type Record<string, GrantJson[]>

CellModerateInput
#

auth/cell_action_specs.ts view source

value + type

{ moderation: "approved" | "rejected"; cell_id: Branded<string, "Uuid">; acting?: Branded<string, "Uuid"> | undefined; } import {CellModerateInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_moderate — the pending → approved | rejected decision, plus the approved → rejected takedown, gated on moderation authority over the governing root (admin / root owner in v1), not the contribution (which the author manages, and could otherwise self-approve). 404 when the caller neither views the target nor stewards it (a root manager reads a pending or rejected contribution through the steward arm); 403 when the caller reaches it but isn't a root manager (the author lands here); 400 cell_not_pending when a root manager names a transition the contribution's state doesn't allow — approving one that is not pending, or rejecting one already rejected or never moderated.

moderation

type "approved" | "rejected"

cell_id

type Branded

acting?

type Branded

CellModerateOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; } import {CellModerateOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell

type CellJson

CellModeration
#

auth/cell_action_specs.ts view source

value + type

"pending" | "approved" | "rejected"

type "pending" | "approved" | "rejected"

import {CellModeration} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

A cell's moderation marker on the wire, when it has one: 'pending', 'approved', or 'rejected' — the markers the create authorizer's verdict and cell_moderate write, and the only ones the read rules in db/cell_moderation.ts name.

CellModerationDecision
#

auth/cell_action_specs.ts view source

value + type

"approved" | "rejected"

type "approved" | "rejected"

import {CellModerationDecision} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

The terminal transition a cell_moderate call applies to a gated contribution's moderation lifecycle. The born state ('pending') is set by the create authorizer, never on the wire; the verb only moves it to a terminal state. 'approved' publishes a pending contribution (also flips visibility → 'public'); 'rejected' holds a pending one back or takes an approved one down, leaving visibility as it was.

CellPath
#

auth/cell_action_specs.ts view source

value + type

Branded<string, "CellPath">

type Branded

import {CellPath} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Branded so the type system distinguishes a validated path from any other string. Construct by parsing it (parse(CellPath, s)) at external boundaries; the RPC dispatcher does this automatically when the wire schema (CellCreateInput, CellGetInput, CellUpdateInput, CellListInput) is parsed at the entry point. Frontend callers handing a raw string to api.cell_* cast at the callsite (as CellPath) — the runtime check still runs server-side.

external types

Infer<typeof CellPath>

CellPolicy
#

auth/cell_action_specs.ts view source

value + type

{} & Record<string, unknown>

type {} & Record<string, unknown>

import {CellPolicy} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

A root's contribution policy — any JSON object. Opaque to the spine: the consumer's create authorizer validates it (CellCreateAuthorize.validate_policy) and interprets it (CellCreateAuthorizeInput.root_policy). Loose for that reason — the keys are the consumer's. Twin of the Rust CellPolicy.

[key: string]

type unknown

CellPolicySetInput
#

auth/cell_action_specs.ts view source

value + type

{ policy: ({} & Record<string, unknown>) | null; cell_id: Branded<string, "Uuid">; acting?: Branded<string, "Uuid"> | undefined; } import {CellPolicySetInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_policy_set — replace a root's contribution policy, or clear it with null. Manage-tier on the root: 404 when the caller can't view it, 403 ERROR_CELL_POLICY_MANAGE_ONLY when they can but don't manage it (an editor grant included), 400 ERROR_CELL_POLICY_ROOT_ONLY on a cell with a parent, then the mounted authorizer's validation of a non-null policy (ERROR_CELL_POLICY_UNSUPPORTED when none can).

policy

type CellPolicy | null

cell_id

type Branded

acting?

type Branded

CellPolicySetOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; } import {CellPolicySetOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell

type CellJson

CellUpdateInput
#

auth/cell_action_specs.ts view source

value + type

{ cell_id: Branded<string, "Uuid">; data?: ({ label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>) | undefined; acting?: Branded<string, "Uuid"> | undefined; path?: Branded<...> | ... 1 more ... | undefined; visibility?: "private" | ... 1 more ... | undefined; } import {CellUpdateInput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Input for cell_update. Fields left undefined keep their existing value. path writes are admin-only (handler-enforced); non-admin callers supplying path get ERROR_CELL_PATH_ADMIN_ONLY even if no other field is changing. visibility writes require the manage tier (can_manage_cell = admin / owner) — editor-grant holders editing data cannot flip visibility (ERROR_CELL_VISIBILITY_MANAGE_ONLY).

cell_id

type Branded

data?

type CellData

acting?

type Branded

path?

type Branded | null

visibility?

type "private" | "public"

CellUpdateOutput
#

auth/cell_action_specs.ts view source

value + type

{ cell: { kind: string | null; data: { label?: string | undefined; summary?: string | undefined; } & Record<string, unknown>; id: Branded<string, "Uuid">; created_at: string; ... 11 more ...; grant_count: number; }; } import {CellUpdateOutput} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

cell

type CellJson

CellVisibility
#

auth/cell_action_specs.ts view source

value + type

"private" | "public"

type "private" | "public"

import {CellVisibility} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Cell visibility — the coarse-grained access-control axis for a cell. Sibling to cell_grant (the fine-grained allowlist of actor- / role-shaped principals at viewer / editor levels). Together they form the cell-layer access-control surface:

  • cell.visibility = 'public' admits everyone, including unauthenticated visitors. cell_grant rows still apply for edit- level admit; read is universal.
  • cell.visibility = 'private' (default) restricts read to admin / owner (created_by) / cell_grant-admitted callers.

Stored as a top-level PG enum column (cell.visibility) — NOT inside cell.data, which is content metadata only. can_view_cell reads the column directly.

ERROR_CELL_CREATE_FORBIDDEN
#

auth/cell_action_specs.ts view source

"cell_create_forbidden" import {ERROR_CELL_CREATE_FORBIDDEN} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — the parent-aware CellCreateAuthorize denied the create for a viewable parent (or a root creation): "you see it, you can't contribute here." A 403 forbidden, distinct from the create-path 404 mask used when the parent itself isn't viewable (twin of the Rust ERROR_CELL_CREATE_FORBIDDEN).

ERROR_CELL_GET_REQUIRES_ID_OR_PATH
#

auth/cell_action_specs.ts view source

"cell_get_requires_id_or_path" import {ERROR_CELL_GET_REQUIRES_ID_OR_PATH} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — input shape for cell_get lacked both id and path.

ERROR_CELL_KIND_EMPTY
#

auth/cell_action_specs.ts view source

"cell_kind_empty" import {ERROR_CELL_KIND_EMPTY} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — cell_create was given an empty-string kind. kind is a non-empty capability tag or absent (null = typeless cell); "" (a tag that tags nothing) is rejected fail-loud so kind stays a clean null | non-empty-string (twin of the Rust ERROR_CELL_KIND_EMPTY).

ERROR_CELL_KIND_IN_DATA
#

auth/cell_action_specs.ts view source

"cell_kind_in_data" import {ERROR_CELL_KIND_IN_DATA} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a kind key was supplied inside data. kind is a top-level column (cell.kind), not content metadata; accepting it inside data would create two sources of truth. Rejected fail-loud at the create / update / clone-patch boundary so the column stays canonical.

ERROR_CELL_LIST_CREATED_BY_REQUIRES_AUTH
#

auth/cell_action_specs.ts view source

"cell_list_created_by_requires_auth" import {ERROR_CELL_LIST_CREATED_BY_REQUIRES_AUTH} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — null-auth cell_list caller passed a created_by filter. The filter is a soft account-id enumeration vector ("does account X have any public cells?"), so we require an authenticated caller to use it.

ERROR_CELL_LIST_SHARED_WITH_REQUIRES_AUTH
#

auth/cell_action_specs.ts view source

"cell_list_shared_with_requires_auth" import {ERROR_CELL_LIST_SHARED_WITH_REQUIRES_AUTH} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — null-auth cell_list caller passed shared_with: 'me'. The filter resolves to the caller's account + role_grants, which only exist for an authenticated session.

ERROR_CELL_MODERATE_FORBIDDEN
#

auth/cell_action_specs.ts view source

"cell_moderate_forbidden" import {ERROR_CELL_MODERATE_FORBIDDEN} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — cell_moderate caller can view the contribution but lacks moderation authority over its governing root (not admin / not the root's manager). A 403 forbidden. The author can view their own pending contribution, so they reach this gate — and are denied here, which is the anti-self-approval guard (twin of the Rust ERROR_CELL_MODERATE_FORBIDDEN).

ERROR_CELL_NOT_A_CONTRIBUTION
#

auth/cell_action_specs.ts view source

"cell_not_a_contribution" import {ERROR_CELL_NOT_A_CONTRIBUTION} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — cell_moderate target has no governing root (root_id is null): it's a root or an unparented cell, not a gated contribution, so there is nothing to moderate. A 400 invalid_params (twin of the Rust ERROR_CELL_NOT_A_CONTRIBUTION).

ERROR_CELL_NOT_FOUND
#

auth/cell_action_specs.ts view source

"cell_not_found" import {ERROR_CELL_NOT_FOUND} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — cell id did not resolve, or caller can't view it.

ERROR_CELL_NOT_PENDING
#

auth/cell_action_specs.ts view source

"cell_not_pending" import {ERROR_CELL_NOT_PENDING} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — cell_moderate names a transition the target's moderation doesn't allow: an approval of a contribution that is not 'pending' (approved or rejected already, or never moderated), or a rejection of one that is neither 'pending' nor 'approved' (rejected already, or never moderated). A 400 invalid_params, answered to a caller holding moderation authority over the governing root (the 404 mask and the 403 come first). Without it an approval would force any reachable contribution public (twin of the Rust ERROR_CELL_NOT_PENDING).

ERROR_CELL_PATH_ADMIN_ONLY
#

auth/cell_action_specs.ts view source

"cell_path_admin_only" import {ERROR_CELL_PATH_ADMIN_ONLY} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — caller is not an admin and supplied a path write.

ERROR_CELL_PATH_TAKEN
#

auth/cell_action_specs.ts view source

"cell_path_taken" import {ERROR_CELL_PATH_TAKEN} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a path write collided with an existing active cell's path. path is globally unique on active rows (idx_cell_path_unique); the create / update handlers translate the unique-index violation into this conflict (409) reason rather than leaking a raw internal error. Soft-deleted rows free their path (the index is partial on deleted_at IS NULL), so reusing a deleted cell's path does not collide.

ERROR_CELL_POLICY_INVALID
#

auth/cell_action_specs.ts view source

"cell_policy_invalid" import {ERROR_CELL_POLICY_INVALID} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — the conventional refusal a CellCreateAuthorize.validate_policy throws for a policy it can't interpret. The spine never answers it itself (twin of the Rust ERROR_CELL_POLICY_INVALID).

ERROR_CELL_POLICY_MANAGE_ONLY
#

auth/cell_action_specs.ts view source

"cell_policy_manage_only" import {ERROR_CELL_POLICY_MANAGE_ONLY} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a cell_policy_set caller can view the root but can't manage it (not admin, not the owner — an editor grant included). A 403 forbidden; a caller who can't view the root gets the 404 mask first (twin of the Rust ERROR_CELL_POLICY_MANAGE_ONLY).

ERROR_CELL_POLICY_ROOT_ONLY
#

auth/cell_action_specs.ts view source

"cell_policy_root_only" import {ERROR_CELL_POLICY_ROOT_ONLY} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a policy write (a cell_create carrying policy, or cell_policy_set) targeted a cell with a parent. Only a root carries a contribution policy. A 400 invalid_params (twin of the Rust ERROR_CELL_POLICY_ROOT_ONLY).

ERROR_CELL_POLICY_UNSUPPORTED
#

auth/cell_action_specs.ts view source

"cell_policy_unsupported" import {ERROR_CELL_POLICY_UNSUPPORTED} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a non-null policy write found nothing to interpret it: no authorize_create is mounted, or the mounted one has no validate_policy. The policy is opaque to the spine, so the write is refused rather than stored inert. A 400 invalid_params (twin of the Rust ERROR_CELL_POLICY_UNSUPPORTED).

ERROR_CELL_REF_NOT_HELD
#

auth/cell_action_specs.ts view source

"cell_ref_not_held" import {ERROR_CELL_REF_NOT_HELD} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — a non-admin write's data introduces a fact ref the acting actor does not hold. A 403 forbidden.

A ref is new when the write's derived refs carry a hash its base doesn't — nothing on cell_create, the cell's current refs on cell_update, the source row's refs on each row cell_clone writes — and held when the acting actor has put the fact's bytes (a fact_holder row). The answer reads holder rows only, so it is the same for a fact that is stored and one that isn't. The gate is auth/cell_ref_admission.ts (twin of the Rust ERROR_CELL_REF_NOT_HELD).

ERROR_CELL_VISIBILITY_MANAGE_ONLY
#

auth/cell_action_specs.ts view source

"cell_visibility_manage_only" import {ERROR_CELL_VISIBILITY_MANAGE_ONLY} from '@fuzdev/fuz_app/auth/cell_action_specs.js';

Error reason — caller tried to write cell.visibility without the manage tier (can_manage_cell = admin / owner). Editor-grant holders may edit data but cannot flip a cell's visibility — that is a manage-tier-only operation.

Re-exports
#

Depends on
#

Imported by
#