auth/cell_field_action_specs.ts

Cell-field RPC specs — declarative contract for the three named-relation verbs (set / delete / list).

(source_id, name) → target_id edges modeled after JSON object key/value pairs. One target per (source_id, name) pair: re-setting a name overwrites the prior target. cell_field_list is bidirectional: pass source_id for forward fields, target_id for reverse upfields (the latter has 2-layer authz — see handler).

view source

Declarations
#

14 declarations

all_cell_field_action_specs
#

auth/cell_field_action_specs.ts view source

readonly [{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: $ZodBranded<...>; target_id: $ZodBranded<...>; acting: ZodOptional<...>; }, $strict>; output: Zo... import {all_cell_field_action_specs} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

All cell_field action specs — composed into all_cell_action_specs.

cell_field_delete_action_spec
#

auth/cell_field_action_specs.ts view source

also exported from auth/cell_action_specs.ts

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: $ZodBranded<...>; acting: ZodOptional<...>; }, $strict>; output: ZodObject<...>; async: true; description:... import {cell_field_delete_action_spec} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

cell_field_list_action_spec
#

auth/cell_field_action_specs.ts view source

also exported from auth/cell_action_specs.ts

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "optional"; actor: "optional"; }; side_effects: false; input: ZodObject<{ source_id: ZodOptional<$ZodBranded<ZodUUID, "Uuid", "out">>; target_id: ZodOptional<...>; name_after: ZodOptional<...>; limit: ZodOptional<...>; acting: ZodOpt... import {cell_field_list_action_spec} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

CELL_FIELD_NAME_REGEX
#

auth/cell_field_action_specs.ts view source

RegExp import {CELL_FIELD_NAME_REGEX} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Field name grammar — fuz snake_case identifier convention. Anchored ^[a-z][a-z0-9_]{0,63}$: leading letter, alphanumeric + underscore trailing, 64-char cap. No reserved names yet.

cell_field_set_action_spec
#

auth/cell_field_action_specs.ts view source

also exported from auth/cell_action_specs.ts

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: true; input: ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: $ZodBranded<...>; target_id: $ZodBranded<...>; acting: ZodOptional<...>; }, $strict>; output: ZodObject<..... import {cell_field_set_action_spec} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

CellFieldDeleteInput
#

auth/cell_field_action_specs.ts view source

ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: $ZodBranded<ZodString, "CellFieldName", "out">; acting: ZodOptional<$ZodBranded<ZodUUID, "Uuid", "out">>; }, $strict> import type {CellFieldDeleteInput} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Input for cell_field_delete. Idempotent: a successful response is returned even when no row matched.

CellFieldDeleteOutput
#

CellFieldListInput
#

auth/cell_field_action_specs.ts view source

ZodObject<{ source_id: ZodOptional<$ZodBranded<ZodUUID, "Uuid", "out">>; target_id: ZodOptional<$ZodBranded<ZodUUID, "Uuid", "out">>; name_after: ZodOptional<...>; limit: ZodOptional<...>; acting: ZodOptional<...>; }, $strict> import type {CellFieldListInput} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Input for cell_field_list. Pass source_id for forward fields or target_id for reverse upfields — exactly one (the schema rejects both / neither). Reverse listing has 2-layer authz (target view-check gates the call; per-source view-check filters the rows).

Forward listing supports cursor pagination via name_after (return rows whose name > name_after lex). The reverse listing doesn't paginate (the result set is small in practice — number of sources pointing at a given target).

CellFieldListOutput
#

auth/cell_field_action_specs.ts view source

ZodObject<{ fields: ZodArray<ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: ZodString; target_id: $ZodBranded<ZodUUID, "Uuid", "out">; created_at: ZodString; }, $strict>>; }, $strict> import type {CellFieldListOutput} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

CellFieldName
#

CellFieldSetInput
#

auth/cell_field_action_specs.ts view source

ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: $ZodBranded<ZodString, "CellFieldName", "out">; target_id: $ZodBranded<ZodUUID, "Uuid", "out">; acting: ZodOptional<...>; }, $strict> import type {CellFieldSetInput} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Input for cell_field_set. UPSERT on (source_id, name) — re-issuing the same input updates target_id and bumps created_at.

CellFieldSetOutput
#

auth/cell_field_action_specs.ts view source

ZodObject<{ field: ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: ZodString; target_id: $ZodBranded<ZodUUID, "Uuid", "out">; created_at: ZodString; }, $strict>; }, $strict> import type {CellFieldSetOutput} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

ERROR_CELL_FIELD_LIST_REQUIRES_SOURCE_OR_TARGET
#

auth/cell_field_action_specs.ts view source

"cell_field_list_requires_source_or_target" import {ERROR_CELL_FIELD_LIST_REQUIRES_SOURCE_OR_TARGET} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Error reason — cell_field_list got neither source_id nor target_id.

FieldJson
#

auth/cell_field_action_specs.ts view source

ZodObject<{ source_id: $ZodBranded<ZodUUID, "Uuid", "out">; name: ZodString; target_id: $ZodBranded<ZodUUID, "Uuid", "out">; created_at: ZodString; }, $strict> import type {FieldJson} from '@fuzdev/fuz_app/auth/cell_field_action_specs.js';

Wire-format for a cell_field row. ISO created_at, branded UUIDs.

Depends on
#

Imported by
#