@ai-matrx/records 0.26.0 → 0.27.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.
@@ -3620,9 +3620,21 @@ interface FieldPatch {
3620
3620
  /** …or the one word every other caller reaches for (see `NewFieldDeclaration`). */
3621
3621
  type?: FieldTypeWord;
3622
3622
  /**
3623
- * FLD-2. The shape of the value. The door reads it ONLY inside its behaviour
3624
- * arm, so a patch that moves `multi` alone changes nothing — send the
3625
- * behaviour word with it.
3623
+ * FLD-2. The shape of the value — one, or several.
3624
+ *
3625
+ * This comment used to say that a patch moving `multi` ALONE changed nothing
3626
+ * and that the behaviour word had to be sent with it. That was true, and it
3627
+ * was a description of a silent failure rather than a contract: the door
3628
+ * answered "saved" and the column still held one. `custom.field_update` has
3629
+ * had a real settings arm for it since 2026-09-20 (matrx-frontend
3630
+ * `migrations/campaign/fix7b_field_multi_arm.sql`), which also moves a
3631
+ * relation's `relation_max` beside it — `custom.validate_values` counts links
3632
+ * against that number, so moving `multi` without it would tick a box and
3633
+ * still refuse the second record.
3634
+ *
3635
+ * A CHOICE LIST IS THE ONE EXCEPTION, and it is refused by name rather than
3636
+ * ignored: for `select` / `multi_select`, "one answer or several" IS the
3637
+ * parity type, so send the type instead.
3626
3638
  */
3627
3639
  multi?: boolean;
3628
3640
  /** REL / FLD-11: re-point the column. The old edges are withdrawn by the door. */
@@ -3796,6 +3808,139 @@ interface EntityFieldRights {
3796
3808
  may_fill_in: boolean;
3797
3809
  }
3798
3810
 
3811
+ /** One stage of a board: the KEY the store keeps, and the LABEL a person reads. */
3812
+ interface PipelineStage {
3813
+ /** The option's stable key — what a cell holds, and what a move is written with. */
3814
+ key: string;
3815
+ /** What the column heading says. Renaming a stage rewrites no record. */
3816
+ label: string;
3817
+ /** A retired choice can still be READ on a record that holds it; it cannot be picked anew. */
3818
+ retired: boolean;
3819
+ }
3820
+ /** What each Rule of a pipeline is about. Closed, and the store is the authority. */
3821
+ declare const PIPELINE_RULE_KINDS: readonly ["moves", "requires", "who", "limit", "entry"];
3822
+ type PipelineRuleKind = (typeof PIPELINE_RULE_KINDS)[number];
3823
+ /**
3824
+ * One transition Rule, as `custom.pipeline_read` hands it back — WITH the sentence it says
3825
+ * when it refuses, because a screen that knows a rule exists but not what it refuses in
3826
+ * cannot warn anybody before they drag.
3827
+ */
3828
+ interface PipelineRule {
3829
+ id: Uuid;
3830
+ name: string;
3831
+ /** The exact words a person is shown when this Rule stops a move. */
3832
+ message: string;
3833
+ kind: PipelineRuleKind | null;
3834
+ /** The stage this Rule is about; `null` on the one Rule about the moves themselves. */
3835
+ stage: string | null;
3836
+ uses: string[];
3837
+ /** What happens when a card ARRIVES in this stage — assign, notify, start a checklist. */
3838
+ on_entry: Record<string, unknown> | null;
3839
+ version: number;
3840
+ }
3841
+ /** The whole board's definition, from `custom.pipeline_read`. */
3842
+ interface Pipeline {
3843
+ is_pipeline: boolean;
3844
+ /** Present, and it says what would make a board exist, when `is_pipeline` is false. */
3845
+ why?: string;
3846
+ table_id?: Uuid;
3847
+ /** The Field KEY that holds the stage — the twin of a Table's `type_field`. */
3848
+ stage_field?: string;
3849
+ field_id?: Uuid;
3850
+ /** What that column is called, e.g. "Stage". */
3851
+ stage_label?: string;
3852
+ /** In the order they were declared, which is the order the board draws them. */
3853
+ stages?: PipelineStage[];
3854
+ rules?: PipelineRule[];
3855
+ }
3856
+ /** One column of the board, with the store's own numbers over what this person may see. */
3857
+ interface PipelineColumn {
3858
+ stage_key: string;
3859
+ stage_label: string;
3860
+ /** 1-based, the declared order. */
3861
+ stage_position: number;
3862
+ cards: number;
3863
+ /** The total of the chosen measure, or null when no measure was asked for. */
3864
+ total: number | null;
3865
+ /** How many cards this column takes at once, or null when it takes any number. */
3866
+ wip_limit: number | null;
3867
+ /** True when the column already holds MORE than its limit — a state a board must show. */
3868
+ over_limit: boolean;
3869
+ }
3870
+ /** One column this stage demands before a card may land in it. */
3871
+ interface PipelineMissingField {
3872
+ field_id: Uuid;
3873
+ key: string;
3874
+ /** What the column is called, so a screen can ASK for it rather than only refuse. */
3875
+ label: string;
3876
+ }
3877
+ /**
3878
+ * Whether a card may go to a column, answered BEFORE the finger lets go — by the same
3879
+ * Rules, through the same evaluator, on the document the move WOULD produce.
3880
+ *
3881
+ * A board greys a column, and snaps a card back, from this. It never decides for itself.
3882
+ */
3883
+ interface PipelineVerdict {
3884
+ allowed: boolean;
3885
+ is_pipeline: boolean;
3886
+ /** The stage key the move was asked about. */
3887
+ to?: string;
3888
+ /** The store's own sentence — shown verbatim, never paraphrased by a screen. */
3889
+ why: string;
3890
+ rule?: string;
3891
+ rule_id?: Uuid;
3892
+ rule_version?: number;
3893
+ kind?: PipelineRuleKind;
3894
+ /**
3895
+ * When a stage demands columns that are empty, exactly which ones — so the screen can
3896
+ * prompt for them on entry instead of sending the person away to find them.
3897
+ */
3898
+ missing?: PipelineMissingField[];
3899
+ }
3900
+ /** What `custom.pipeline_declare` says it made or changed. */
3901
+ interface PipelineDeclared {
3902
+ table_id: Uuid;
3903
+ stage_field: string;
3904
+ field_id: Uuid;
3905
+ stages: string[];
3906
+ rules: Record<string, Uuid>;
3907
+ /** Plain sentences naming each thing this declaration wrote. */
3908
+ said: string[];
3909
+ }
3910
+ /** The declaration a person (or an agent) writes. Everything is optional but the stages. */
3911
+ interface PipelineSpec {
3912
+ stage_field: {
3913
+ key: string;
3914
+ label?: string;
3915
+ options?: string[];
3916
+ sort?: number;
3917
+ };
3918
+ transitions?: {
3919
+ from: string;
3920
+ to: string;
3921
+ }[];
3922
+ /** Stage name → the column keys that must be filled in to land there. */
3923
+ requires?: Record<string, string[]>;
3924
+ /** Stage name → the rung somebody needs on the record to move a card INTO it. */
3925
+ who?: Record<string, "viewer" | "commenter" | "editor" | "admin">;
3926
+ /** Stage name → how many cards may sit there at once. The mover is not counted. */
3927
+ limits?: Record<string, number>;
3928
+ /** Stage name → what happens when a card arrives: assign, notify, start a checklist. */
3929
+ on_entry?: Record<string, Record<string, unknown>>;
3930
+ moves_message?: string;
3931
+ requires_messages?: Record<string, string>;
3932
+ }
3933
+ /**
3934
+ * THE ONE PLACE A SCREEN DECIDES WHETHER A CARD LOOKS DRAGGABLE — and it decides on the
3935
+ * PERSON, not on the rules. Whether a particular move is allowed is
3936
+ * `pipelineTransitionRefusal`, which is the store's answer; whether this person may move
3937
+ * anything at all is their level on the record, which the read door already told us.
3938
+ *
3939
+ * Absent rather than dead: a viewer's card carries no drag handle at all, instead of one
3940
+ * that looks live and snaps back every time.
3941
+ */
3942
+ declare function mayDrag(level: string | null | undefined): boolean;
3943
+
3799
3944
  /**
3800
3945
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
3801
3946
  * door's own body, not invented here. A leaf is the node's name carrying its
@@ -6264,6 +6409,37 @@ interface RecordsClient {
6264
6409
  fieldKernelId(): Promise<RecordsResult<Uuid>>;
6265
6410
  ruleKernelId(): Promise<RecordsResult<Uuid>>;
6266
6411
  /** Every record the Rule says is a member. A saved view's list is this, not a filter a screen ran. */
6412
+ /** PRODUCTS row 7 — the whole board: its stage column, its stages in the declared
6413
+ * order, and every Rule WITH the sentence it says when it refuses. */
6414
+ pipelineRead(args: {
6415
+ table_id: Uuid;
6416
+ }): Promise<RecordsResult<Pipeline>>;
6417
+ /** The store's own count and total per column, over what this person may see. */
6418
+ pipelineBoard(args: {
6419
+ table_id: Uuid;
6420
+ measure?: string | null;
6421
+ }): Promise<RecordsResult<PipelineColumn[]>>;
6422
+ /** Whether this card may go to that column — asked BEFORE the finger lets go. */
6423
+ pipelineTransitionRefusal(args: {
6424
+ record_id: Uuid;
6425
+ to: string;
6426
+ }): Promise<RecordsResult<PipelineVerdict>>;
6427
+ /** Move a record to a stage. An ORDINARY record write, judged by the same Rules. */
6428
+ pipelineMove(args: {
6429
+ record_id: Uuid;
6430
+ to: string;
6431
+ also?: Record<string, unknown>;
6432
+ expected_version?: number | null;
6433
+ }): Promise<RecordsResult<unknown>>;
6434
+ /** Declare (or re-state) a pipeline: the stage column and its transition Rules. */
6435
+ pipelineDeclare(args: {
6436
+ table_id: Uuid;
6437
+ spec: PipelineSpec;
6438
+ }): Promise<RecordsResult<PipelineDeclared>>;
6439
+ /** Which column of this table holds its stage, or null when it is not a board. */
6440
+ tableStageField(args: {
6441
+ table_id: Uuid;
6442
+ }): Promise<RecordsResult<string | null>>;
6267
6443
  ruleMembers(args: {
6268
6444
  rule_id: Uuid;
6269
6445
  }): Promise<RecordsResult<StoredRecord[]>>;
@@ -7393,4 +7569,4 @@ declare function useFieldMutation(): UseFieldMutation;
7393
7569
  */
7394
7570
  declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
7395
7571
 
7396
- export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
7572
+ export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineMissingField, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
@@ -3620,9 +3620,21 @@ interface FieldPatch {
3620
3620
  /** …or the one word every other caller reaches for (see `NewFieldDeclaration`). */
3621
3621
  type?: FieldTypeWord;
3622
3622
  /**
3623
- * FLD-2. The shape of the value. The door reads it ONLY inside its behaviour
3624
- * arm, so a patch that moves `multi` alone changes nothing — send the
3625
- * behaviour word with it.
3623
+ * FLD-2. The shape of the value — one, or several.
3624
+ *
3625
+ * This comment used to say that a patch moving `multi` ALONE changed nothing
3626
+ * and that the behaviour word had to be sent with it. That was true, and it
3627
+ * was a description of a silent failure rather than a contract: the door
3628
+ * answered "saved" and the column still held one. `custom.field_update` has
3629
+ * had a real settings arm for it since 2026-09-20 (matrx-frontend
3630
+ * `migrations/campaign/fix7b_field_multi_arm.sql`), which also moves a
3631
+ * relation's `relation_max` beside it — `custom.validate_values` counts links
3632
+ * against that number, so moving `multi` without it would tick a box and
3633
+ * still refuse the second record.
3634
+ *
3635
+ * A CHOICE LIST IS THE ONE EXCEPTION, and it is refused by name rather than
3636
+ * ignored: for `select` / `multi_select`, "one answer or several" IS the
3637
+ * parity type, so send the type instead.
3626
3638
  */
3627
3639
  multi?: boolean;
3628
3640
  /** REL / FLD-11: re-point the column. The old edges are withdrawn by the door. */
@@ -3796,6 +3808,139 @@ interface EntityFieldRights {
3796
3808
  may_fill_in: boolean;
3797
3809
  }
3798
3810
 
3811
+ /** One stage of a board: the KEY the store keeps, and the LABEL a person reads. */
3812
+ interface PipelineStage {
3813
+ /** The option's stable key — what a cell holds, and what a move is written with. */
3814
+ key: string;
3815
+ /** What the column heading says. Renaming a stage rewrites no record. */
3816
+ label: string;
3817
+ /** A retired choice can still be READ on a record that holds it; it cannot be picked anew. */
3818
+ retired: boolean;
3819
+ }
3820
+ /** What each Rule of a pipeline is about. Closed, and the store is the authority. */
3821
+ declare const PIPELINE_RULE_KINDS: readonly ["moves", "requires", "who", "limit", "entry"];
3822
+ type PipelineRuleKind = (typeof PIPELINE_RULE_KINDS)[number];
3823
+ /**
3824
+ * One transition Rule, as `custom.pipeline_read` hands it back — WITH the sentence it says
3825
+ * when it refuses, because a screen that knows a rule exists but not what it refuses in
3826
+ * cannot warn anybody before they drag.
3827
+ */
3828
+ interface PipelineRule {
3829
+ id: Uuid;
3830
+ name: string;
3831
+ /** The exact words a person is shown when this Rule stops a move. */
3832
+ message: string;
3833
+ kind: PipelineRuleKind | null;
3834
+ /** The stage this Rule is about; `null` on the one Rule about the moves themselves. */
3835
+ stage: string | null;
3836
+ uses: string[];
3837
+ /** What happens when a card ARRIVES in this stage — assign, notify, start a checklist. */
3838
+ on_entry: Record<string, unknown> | null;
3839
+ version: number;
3840
+ }
3841
+ /** The whole board's definition, from `custom.pipeline_read`. */
3842
+ interface Pipeline {
3843
+ is_pipeline: boolean;
3844
+ /** Present, and it says what would make a board exist, when `is_pipeline` is false. */
3845
+ why?: string;
3846
+ table_id?: Uuid;
3847
+ /** The Field KEY that holds the stage — the twin of a Table's `type_field`. */
3848
+ stage_field?: string;
3849
+ field_id?: Uuid;
3850
+ /** What that column is called, e.g. "Stage". */
3851
+ stage_label?: string;
3852
+ /** In the order they were declared, which is the order the board draws them. */
3853
+ stages?: PipelineStage[];
3854
+ rules?: PipelineRule[];
3855
+ }
3856
+ /** One column of the board, with the store's own numbers over what this person may see. */
3857
+ interface PipelineColumn {
3858
+ stage_key: string;
3859
+ stage_label: string;
3860
+ /** 1-based, the declared order. */
3861
+ stage_position: number;
3862
+ cards: number;
3863
+ /** The total of the chosen measure, or null when no measure was asked for. */
3864
+ total: number | null;
3865
+ /** How many cards this column takes at once, or null when it takes any number. */
3866
+ wip_limit: number | null;
3867
+ /** True when the column already holds MORE than its limit — a state a board must show. */
3868
+ over_limit: boolean;
3869
+ }
3870
+ /** One column this stage demands before a card may land in it. */
3871
+ interface PipelineMissingField {
3872
+ field_id: Uuid;
3873
+ key: string;
3874
+ /** What the column is called, so a screen can ASK for it rather than only refuse. */
3875
+ label: string;
3876
+ }
3877
+ /**
3878
+ * Whether a card may go to a column, answered BEFORE the finger lets go — by the same
3879
+ * Rules, through the same evaluator, on the document the move WOULD produce.
3880
+ *
3881
+ * A board greys a column, and snaps a card back, from this. It never decides for itself.
3882
+ */
3883
+ interface PipelineVerdict {
3884
+ allowed: boolean;
3885
+ is_pipeline: boolean;
3886
+ /** The stage key the move was asked about. */
3887
+ to?: string;
3888
+ /** The store's own sentence — shown verbatim, never paraphrased by a screen. */
3889
+ why: string;
3890
+ rule?: string;
3891
+ rule_id?: Uuid;
3892
+ rule_version?: number;
3893
+ kind?: PipelineRuleKind;
3894
+ /**
3895
+ * When a stage demands columns that are empty, exactly which ones — so the screen can
3896
+ * prompt for them on entry instead of sending the person away to find them.
3897
+ */
3898
+ missing?: PipelineMissingField[];
3899
+ }
3900
+ /** What `custom.pipeline_declare` says it made or changed. */
3901
+ interface PipelineDeclared {
3902
+ table_id: Uuid;
3903
+ stage_field: string;
3904
+ field_id: Uuid;
3905
+ stages: string[];
3906
+ rules: Record<string, Uuid>;
3907
+ /** Plain sentences naming each thing this declaration wrote. */
3908
+ said: string[];
3909
+ }
3910
+ /** The declaration a person (or an agent) writes. Everything is optional but the stages. */
3911
+ interface PipelineSpec {
3912
+ stage_field: {
3913
+ key: string;
3914
+ label?: string;
3915
+ options?: string[];
3916
+ sort?: number;
3917
+ };
3918
+ transitions?: {
3919
+ from: string;
3920
+ to: string;
3921
+ }[];
3922
+ /** Stage name → the column keys that must be filled in to land there. */
3923
+ requires?: Record<string, string[]>;
3924
+ /** Stage name → the rung somebody needs on the record to move a card INTO it. */
3925
+ who?: Record<string, "viewer" | "commenter" | "editor" | "admin">;
3926
+ /** Stage name → how many cards may sit there at once. The mover is not counted. */
3927
+ limits?: Record<string, number>;
3928
+ /** Stage name → what happens when a card arrives: assign, notify, start a checklist. */
3929
+ on_entry?: Record<string, Record<string, unknown>>;
3930
+ moves_message?: string;
3931
+ requires_messages?: Record<string, string>;
3932
+ }
3933
+ /**
3934
+ * THE ONE PLACE A SCREEN DECIDES WHETHER A CARD LOOKS DRAGGABLE — and it decides on the
3935
+ * PERSON, not on the rules. Whether a particular move is allowed is
3936
+ * `pipelineTransitionRefusal`, which is the store's answer; whether this person may move
3937
+ * anything at all is their level on the record, which the read door already told us.
3938
+ *
3939
+ * Absent rather than dead: a viewer's card carries no drag handle at all, instead of one
3940
+ * that looks live and snaps back every time.
3941
+ */
3942
+ declare function mayDrag(level: string | null | undefined): boolean;
3943
+
3799
3944
  /**
3800
3945
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
3801
3946
  * door's own body, not invented here. A leaf is the node's name carrying its
@@ -6264,6 +6409,37 @@ interface RecordsClient {
6264
6409
  fieldKernelId(): Promise<RecordsResult<Uuid>>;
6265
6410
  ruleKernelId(): Promise<RecordsResult<Uuid>>;
6266
6411
  /** Every record the Rule says is a member. A saved view's list is this, not a filter a screen ran. */
6412
+ /** PRODUCTS row 7 — the whole board: its stage column, its stages in the declared
6413
+ * order, and every Rule WITH the sentence it says when it refuses. */
6414
+ pipelineRead(args: {
6415
+ table_id: Uuid;
6416
+ }): Promise<RecordsResult<Pipeline>>;
6417
+ /** The store's own count and total per column, over what this person may see. */
6418
+ pipelineBoard(args: {
6419
+ table_id: Uuid;
6420
+ measure?: string | null;
6421
+ }): Promise<RecordsResult<PipelineColumn[]>>;
6422
+ /** Whether this card may go to that column — asked BEFORE the finger lets go. */
6423
+ pipelineTransitionRefusal(args: {
6424
+ record_id: Uuid;
6425
+ to: string;
6426
+ }): Promise<RecordsResult<PipelineVerdict>>;
6427
+ /** Move a record to a stage. An ORDINARY record write, judged by the same Rules. */
6428
+ pipelineMove(args: {
6429
+ record_id: Uuid;
6430
+ to: string;
6431
+ also?: Record<string, unknown>;
6432
+ expected_version?: number | null;
6433
+ }): Promise<RecordsResult<unknown>>;
6434
+ /** Declare (or re-state) a pipeline: the stage column and its transition Rules. */
6435
+ pipelineDeclare(args: {
6436
+ table_id: Uuid;
6437
+ spec: PipelineSpec;
6438
+ }): Promise<RecordsResult<PipelineDeclared>>;
6439
+ /** Which column of this table holds its stage, or null when it is not a board. */
6440
+ tableStageField(args: {
6441
+ table_id: Uuid;
6442
+ }): Promise<RecordsResult<string | null>>;
6267
6443
  ruleMembers(args: {
6268
6444
  rule_id: Uuid;
6269
6445
  }): Promise<RecordsResult<StoredRecord[]>>;
@@ -7393,4 +7569,4 @@ declare function useFieldMutation(): UseFieldMutation;
7393
7569
  */
7394
7570
  declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
7395
7571
 
7396
- export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
7572
+ export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineMissingField, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, ok, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
@@ -1849,6 +1849,12 @@ var DOORS = {
1849
1849
  tableKernelId: "table_kernel_id",
1850
1850
  // A saved view references its membership Rule, and the STORE decides who is
1851
1851
  // in it — the screen never re-implements the predicate.
1852
+ pipelineDeclare: "pipeline_declare",
1853
+ pipelineRead: "pipeline_read",
1854
+ pipelineBoard: "pipeline_board",
1855
+ pipelineTransitionRefusal: "pipeline_transition_refusal",
1856
+ pipelineMove: "pipeline_move",
1857
+ tableStageField: "table_stage_field",
1852
1858
  ruleMembers: "rule_members",
1853
1859
  ruleMembership: "rule_membership",
1854
1860
  ruleRun: "rule_run",
@@ -2640,6 +2646,54 @@ function createRecordsClient(config) {
2640
2646
  async ruleKernelId() {
2641
2647
  return callDoor(DOORS.ruleKernelId, {}, "ruleKernelId");
2642
2648
  },
2649
+ async pipelineRead({ table_id }) {
2650
+ return callDoor(
2651
+ DOORS.pipelineRead,
2652
+ { p_organization_id: org, p_table_id: table_id },
2653
+ "pipelineRead"
2654
+ );
2655
+ },
2656
+ async pipelineBoard({ table_id, measure }) {
2657
+ return callDoor(
2658
+ DOORS.pipelineBoard,
2659
+ { p_organization_id: org, p_table_id: table_id, p_measure: measure ?? null },
2660
+ "pipelineBoard"
2661
+ );
2662
+ },
2663
+ async pipelineTransitionRefusal({ record_id, to }) {
2664
+ return callDoor(
2665
+ DOORS.pipelineTransitionRefusal,
2666
+ { p_organization_id: org, p_record_id: record_id, p_to: to },
2667
+ "pipelineTransitionRefusal"
2668
+ );
2669
+ },
2670
+ async pipelineMove({ record_id, to, also, expected_version }) {
2671
+ return callDoor(
2672
+ DOORS.pipelineMove,
2673
+ {
2674
+ p_organization_id: org,
2675
+ p_record_id: record_id,
2676
+ p_to: to,
2677
+ p_also: also ?? {},
2678
+ p_expected_version: expected_version ?? null
2679
+ },
2680
+ "pipelineMove"
2681
+ );
2682
+ },
2683
+ async pipelineDeclare({ table_id, spec }) {
2684
+ return callDoor(
2685
+ DOORS.pipelineDeclare,
2686
+ { p_organization_id: org, p_table_id: table_id, p_spec: spec },
2687
+ "pipelineDeclare"
2688
+ );
2689
+ },
2690
+ async tableStageField({ table_id }) {
2691
+ return callDoor(
2692
+ DOORS.tableStageField,
2693
+ { p_organization_id: org, p_table_id: table_id },
2694
+ "tableStageField"
2695
+ );
2696
+ },
2643
2697
  async ruleMembers({ rule_id }) {
2644
2698
  return callDoor(
2645
2699
  DOORS.ruleMembers,
@@ -4312,6 +4366,12 @@ function looksLikeAnId(value) {
4312
4366
  return typeof value === "string" && UUID.test(value);
4313
4367
  }
4314
4368
 
4369
+ // src/pipeline.ts
4370
+ var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
4371
+ function mayDrag(level) {
4372
+ return level === "editor" || level === "admin" || level === "owner";
4373
+ }
4374
+
4315
4375
  // src/rule.ts
4316
4376
  function publicFormPath(formId) {
4317
4377
  return `/f/${formId}`;
@@ -4629,6 +4689,7 @@ export {
4629
4689
  PARITY_FIELD_TYPES,
4630
4690
  PERMISSION_LEVELS,
4631
4691
  PER_VALUE_ACCESS_WORDS,
4692
+ PIPELINE_RULE_KINDS,
4632
4693
  REFUSALS_WORTH_REPEATING,
4633
4694
  RELATION_BINDINGS,
4634
4695
  RELATION_CARDINALITIES,
@@ -4659,6 +4720,7 @@ export {
4659
4720
  isRecordsErr,
4660
4721
  isTheChosen,
4661
4722
  looksLikeAnId,
4723
+ mayDrag,
4662
4724
  measureKey,
4663
4725
  memoryStore,
4664
4726
  mintClientKey,