@ai-matrx/records 0.54.0 → 0.56.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.
@@ -1,7 +1,7 @@
1
- import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-Ct7_iYEF.cjs';
2
- export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-Ct7_iYEF.cjs';
3
- import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.cjs';
4
- export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.cjs';
1
+ import { T as Timestamp, p as Uuid, R as RecordDocument, q as RecordsResult, r as RecordGraphWritten, s as RecordRead, t as ReadRow, u as Field, S as StoredRecord, v as NewFieldDeclaration, w as FieldPatch, x as RecordRevision, y as ReadValue, z as FieldProposal, A as TableProposal, C as RecordsError, W as WriteConflict, D as PgError, E as StaleWriteDetail, G as PredictedRefusal } from '../types-RxnWzAWZ.cjs';
2
+ export { H as ABSENCE_REASONS, I as ACTOR_VOCABULARY, J as AbsenceReason, K as Actor, L as COMPUTE_ON, M as CONTEXT_POLICIES, O as ComputeOn, Q as ContextPolicy, V as DECLARABLE_FIELD_KINDS, X as DELIVERIES, Y as DeclarableFieldKind, Z as Delivery, _ as ENTITY_TOKENS, $ as EntityToken, a0 as FIELD_SENSITIVITIES, a1 as FIELD_SOURCES, a2 as FRESHNESS, a3 as FieldBehavior, a4 as FieldRule, a5 as FieldSensitivity, a6 as FieldSource, a7 as FieldTypeWord, a8 as ForbiddenEnvelopeWord, a9 as Freshness, aa as HiddenFieldNotice, ab as KERNEL_TABLES, ac as KernelTableName, ad as MERGE_FIELD_MODIFIERS, ae as MERGE_FIELD_SEMANTIC_TYPES, af as MERGE_FIELD_SOURCES, ag as MergeFieldModifier, ah as MergeFieldSemanticType, ai as MergeFieldSource, aj as ON_DELETE, ak as OVERRIDE_POLICIES, al as OnDelete, am as OverridePolicy, an as PARITY_FIELD_TYPES, ao as PER_VALUE_ACCESS_WORDS, ap as ParityFieldType, aq as ParityFieldTypeDescriptor, ar as PerValueAccessWord, as as ProvenancePointer, at as RELATION_BINDINGS, au as RELATION_CARDINALITIES, av as RELATION_FLAVORS, aw as RETIRED_ACTOR_WORDS, ax as RULE_NODE_KINDS, ay as RULE_USES, az as RecordsErrorCode, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as err, b0 as isRecordsErr, b1 as ok } from '../types-RxnWzAWZ.cjs';
3
+ import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, RecordsDataSource } from '../index.cjs';
4
+ export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, ViewLayout, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.cjs';
5
5
 
6
6
  /**
7
7
  * DOOR-8. As-of on EITHER clock, and they are different questions:
@@ -111,6 +111,55 @@ interface RecordsClient {
111
111
  rows: RecordDocument[];
112
112
  ids?: Uuid[];
113
113
  }): Promise<RecordsResult<Uuid[]>>;
114
+ /**
115
+ * A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
116
+ *
117
+ * `recordWrite` and `recordWriteMany` are each ONE statement. A screen or a
118
+ * server path whose unit of work is a GRAPH — an AI artifact and the lines
119
+ * it produced, an order and its items, a research note and its citations —
120
+ * could therefore not save it as one thing: a loop is N transactions, and a
121
+ * failure on row nineteen leaves a parent standing without the lines it
122
+ * promised.
123
+ *
124
+ * `custom.record_write_graph` is one statement, so it is one transaction. It
125
+ * is NOT a second write path: it calls `custom.record_write_many` for the
126
+ * rows, `public.assoc_add` for an edge that points OUT of the store (the
127
+ * message a record was produced by), and `platform.relation_set` for the
128
+ * parent's own declared relation to its children. Same store switch, same
129
+ * editor rung on the Table, same value envelope, same undeclared-key guard,
130
+ * same history rows, same realtime notice.
131
+ *
132
+ * ONE REFUSAL REFUSES THE WHOLE GRAPH, BY NAME — the answer says which member
133
+ * failed and carries the store's own sentence about it, and nothing is
134
+ * written.
135
+ *
136
+ * Every child MUST name a `role`: it is the key of a declared RELATION field
137
+ * on the parent's Table, and an edge out of a record that names no field is
138
+ * refused by the store (REL-10 / T7) because without it nothing can read the
139
+ * relation's delete rule, its cardinality or its organization wall. The order
140
+ * children are handed in IS the order of the relation.
141
+ */
142
+ recordWriteGraph(args: {
143
+ table_id: Uuid;
144
+ parent: RecordDocument;
145
+ /** Each child: its document, the parent FIELD it fills, and optionally its own Table. */
146
+ children?: Array<{
147
+ data: RecordDocument;
148
+ role: string;
149
+ table_id?: Uuid;
150
+ position?: number;
151
+ }>;
152
+ /** Edges to things OUTSIDE the store. `direction` defaults to `"in"` — that thing produced this record. */
153
+ edges?: Array<{
154
+ entity: string;
155
+ id: Uuid;
156
+ direction?: "in" | "out";
157
+ label?: string;
158
+ role?: string;
159
+ position?: number;
160
+ metadata?: Record<string, unknown>;
161
+ }>;
162
+ }): Promise<RecordsResult<RecordGraphWritten>>;
114
163
  recordUpdate(args: {
115
164
  record_id: Uuid;
116
165
  patch: Record<string, unknown>;
@@ -303,10 +352,7 @@ interface RecordsClient {
303
352
  * wherever a grid, board, list or picker resolves more than one chip: the
304
353
  * per-id lane is what made a page of relation cells a page of requests.
305
354
  */
306
- relationWordsMany(args: {
307
- field_id: Uuid;
308
- record_ids: Uuid[];
309
- }): Promise<RecordsResult<Record<string, string>>>;
355
+ relationWordsMany(args: RelationWordsManyArgs): Promise<RecordsResult<Record<string, string>>>;
310
356
  /** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
311
357
  fieldRetire(args: {
312
358
  field_id: Uuid;
@@ -1470,6 +1516,91 @@ interface RecordsClient {
1470
1516
  ids: Uuid[];
1471
1517
  subject?: "record";
1472
1518
  }): Promise<RecordsResult<MyLevel[]>>;
1519
+ /** G1. Write ONE leaf of a Table's colors, or clear it with `null`. Editor on the Table. */
1520
+ tableDecorate(args: {
1521
+ table_id: Uuid;
1522
+ path: DecorationPath;
1523
+ value: unknown;
1524
+ }): Promise<RecordsResult<TableDecorations>>;
1525
+ /** G1. A Table's colors as a screen paints them, with what went stale named. */
1526
+ tableDecorations(args: {
1527
+ table_id: Uuid;
1528
+ }): Promise<RecordsResult<TableDecorations>>;
1529
+ /** G1. The layout a grid opens with: platform → organization knob → the view's own. */
1530
+ gridLayout(args: {
1531
+ table_id: Uuid;
1532
+ view_id?: Uuid | null;
1533
+ }): Promise<RecordsResult<GridLayout>>;
1534
+ /** G3. The older grid's formula text → the store's expression. Never refuses a typo: answers ok:false. */
1535
+ formulaParse(args: {
1536
+ table_id: Uuid;
1537
+ text: string;
1538
+ }): Promise<RecordsResult<FormulaParse>>;
1539
+ /** G2. Declare a Table's row actions — the whole list. Editor on the Table. */
1540
+ actionDeclare(args: {
1541
+ table_id: Uuid;
1542
+ actions: RowAction[];
1543
+ }): Promise<RecordsResult<RowAction[]>>;
1544
+ /** G2. A Table's row actions, each saying whether it can run here. */
1545
+ rowActions(args: {
1546
+ table_id: Uuid;
1547
+ }): Promise<RecordsResult<{
1548
+ actions: RowAction[];
1549
+ stale: unknown[];
1550
+ }>>;
1551
+ /**
1552
+ * G2. Run one action on a selection, in ONE transaction. A refusal changed NOTHING; read
1553
+ * every record and field that refused with `actionRefusals(result.error)`.
1554
+ */
1555
+ actionRun(args: {
1556
+ action_id: Uuid;
1557
+ record_ids: Uuid[];
1558
+ }): Promise<RecordsResult<ActionRunResult>>;
1559
+ /** G4. Send every change to this Table's records to an https webhook. Admin. The secret is shown once. */
1560
+ tableWebhookDeclare(args: {
1561
+ table_id: Uuid;
1562
+ target_url: string;
1563
+ events?: RecordEvent[] | null;
1564
+ description?: string | null;
1565
+ }): Promise<RecordsResult<TableWebhookDeclared>>;
1566
+ /** G4. The webhooks a Table sends to, with their delivery health — never the secret. */
1567
+ tableWebhooks(args: {
1568
+ table_id: Uuid;
1569
+ }): Promise<RecordsResult<TableWebhook[]>>;
1570
+ /** G4. Switch one off. It is never deleted. */
1571
+ tableWebhookArchive(args: {
1572
+ webhook_id: Uuid;
1573
+ }): Promise<RecordsResult<boolean>>;
1574
+ /**
1575
+ * G5. Build one real use case's tables here, rows and relations included, in one
1576
+ * transaction. `useCaseId` is one of `useCaseIds()` from `@ai-matrx/records/use-cases`.
1577
+ */
1578
+ tableFromExample(args: {
1579
+ home_id: Uuid;
1580
+ useCaseId: string;
1581
+ }): Promise<RecordsResult<ExampleBuilt>>;
1582
+ /** G5. Number the records an autonumber column found already there, in creation order. */
1583
+ autonumberBackfill(args: {
1584
+ field_id: Uuid;
1585
+ }): Promise<RecordsResult<{
1586
+ numbered: number;
1587
+ highest: number | null;
1588
+ says: string;
1589
+ }>>;
1590
+ /** G5. One page of the export door — exactly the rows and columns the read door serves this person. */
1591
+ ioExport(args: {
1592
+ table_id: Uuid;
1593
+ columns?: string[] | null;
1594
+ limit?: number;
1595
+ }): Promise<RecordsResult<IoExportPage>>;
1596
+ /** G5. That page as an .xlsx; a withheld column is named on its own sheet. */
1597
+ exportXlsx(args: {
1598
+ table_id: Uuid;
1599
+ columns?: string[] | null;
1600
+ limit?: number;
1601
+ labels?: Record<string, string>;
1602
+ sheetLabel?: string;
1603
+ }): Promise<RecordsResult<Uint8Array>>;
1473
1604
  }
1474
1605
  declare function createRecordsClient(config: RecordsConfig): RecordsClient;
1475
1606
  /**
@@ -1493,6 +1624,7 @@ declare const DOORS: {
1493
1624
  readonly queryTableAsOf: "query_table_as_of";
1494
1625
  readonly recordWrite: "record_write";
1495
1626
  readonly recordWriteMany: "record_write_many";
1627
+ readonly recordWriteGraph: "record_write_graph";
1496
1628
  readonly recordUpdate: "record_update";
1497
1629
  readonly recordDelete: "record_delete";
1498
1630
  readonly recordRestore: "record_restore";
@@ -1680,6 +1812,19 @@ declare const DOORS: {
1680
1812
  readonly checklistRuns: "checklist_runs";
1681
1813
  readonly checklistStepComplete: "checklist_step_complete";
1682
1814
  readonly checklistStepRefusal: "checklist_step_refusal";
1815
+ readonly tableDecorate: "table_decorate";
1816
+ readonly tableDecorations: "table_decorations";
1817
+ readonly gridLayout: "grid_layout";
1818
+ readonly formulaParse: "formula_parse";
1819
+ readonly actionDeclare: "action_declare";
1820
+ readonly rowActions: "row_actions";
1821
+ readonly actionRun: "action_run";
1822
+ readonly tableWebhookDeclare: "table_webhook_declare";
1823
+ readonly tableWebhooks: "table_webhooks";
1824
+ readonly tableWebhookArchive: "table_webhook_archive";
1825
+ readonly tableFromExample: "table_from_example";
1826
+ readonly autonumberBackfill: "autonumber_backfill";
1827
+ readonly ioExport: "io_export";
1683
1828
  readonly metadataSearch: "metadata_search";
1684
1829
  readonly ruleDeclare: "rule_declare";
1685
1830
  readonly fieldPropose: "field_propose";
@@ -1810,4 +1955,4 @@ declare function parseCsv(text: string): string[][];
1810
1955
  declare function importCsv(text: string): ParsedImport;
1811
1956
  declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
1812
1957
 
1813
- export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
1958
+ export { ActionRunResult, AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, TableProposal, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
@@ -1,7 +1,7 @@
1
- import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-Ct7_iYEF.js';
2
- export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-Ct7_iYEF.js';
3
- import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.js';
4
- export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.js';
1
+ import { T as Timestamp, p as Uuid, R as RecordDocument, q as RecordsResult, r as RecordGraphWritten, s as RecordRead, t as ReadRow, u as Field, S as StoredRecord, v as NewFieldDeclaration, w as FieldPatch, x as RecordRevision, y as ReadValue, z as FieldProposal, A as TableProposal, C as RecordsError, W as WriteConflict, D as PgError, E as StaleWriteDetail, G as PredictedRefusal } from '../types-RxnWzAWZ.js';
2
+ export { H as ABSENCE_REASONS, I as ACTOR_VOCABULARY, J as AbsenceReason, K as Actor, L as COMPUTE_ON, M as CONTEXT_POLICIES, O as ComputeOn, Q as ContextPolicy, V as DECLARABLE_FIELD_KINDS, X as DELIVERIES, Y as DeclarableFieldKind, Z as Delivery, _ as ENTITY_TOKENS, $ as EntityToken, a0 as FIELD_SENSITIVITIES, a1 as FIELD_SOURCES, a2 as FRESHNESS, a3 as FieldBehavior, a4 as FieldRule, a5 as FieldSensitivity, a6 as FieldSource, a7 as FieldTypeWord, a8 as ForbiddenEnvelopeWord, a9 as Freshness, aa as HiddenFieldNotice, ab as KERNEL_TABLES, ac as KernelTableName, ad as MERGE_FIELD_MODIFIERS, ae as MERGE_FIELD_SEMANTIC_TYPES, af as MERGE_FIELD_SOURCES, ag as MergeFieldModifier, ah as MergeFieldSemanticType, ai as MergeFieldSource, aj as ON_DELETE, ak as OVERRIDE_POLICIES, al as OnDelete, am as OverridePolicy, an as PARITY_FIELD_TYPES, ao as PER_VALUE_ACCESS_WORDS, ap as ParityFieldType, aq as ParityFieldTypeDescriptor, ar as PerValueAccessWord, as as ProvenancePointer, at as RELATION_BINDINGS, au as RELATION_CARDINALITIES, av as RELATION_FLAVORS, aw as RETIRED_ACTOR_WORDS, ax as RULE_NODE_KINDS, ay as RULE_USES, az as RecordsErrorCode, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as err, b0 as isRecordsErr, b1 as ok } from '../types-RxnWzAWZ.js';
3
+ import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, RecordsDataSource } from '../index.js';
4
+ export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, ViewLayout, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.js';
5
5
 
6
6
  /**
7
7
  * DOOR-8. As-of on EITHER clock, and they are different questions:
@@ -111,6 +111,55 @@ interface RecordsClient {
111
111
  rows: RecordDocument[];
112
112
  ids?: Uuid[];
113
113
  }): Promise<RecordsResult<Uuid[]>>;
114
+ /**
115
+ * A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
116
+ *
117
+ * `recordWrite` and `recordWriteMany` are each ONE statement. A screen or a
118
+ * server path whose unit of work is a GRAPH — an AI artifact and the lines
119
+ * it produced, an order and its items, a research note and its citations —
120
+ * could therefore not save it as one thing: a loop is N transactions, and a
121
+ * failure on row nineteen leaves a parent standing without the lines it
122
+ * promised.
123
+ *
124
+ * `custom.record_write_graph` is one statement, so it is one transaction. It
125
+ * is NOT a second write path: it calls `custom.record_write_many` for the
126
+ * rows, `public.assoc_add` for an edge that points OUT of the store (the
127
+ * message a record was produced by), and `platform.relation_set` for the
128
+ * parent's own declared relation to its children. Same store switch, same
129
+ * editor rung on the Table, same value envelope, same undeclared-key guard,
130
+ * same history rows, same realtime notice.
131
+ *
132
+ * ONE REFUSAL REFUSES THE WHOLE GRAPH, BY NAME — the answer says which member
133
+ * failed and carries the store's own sentence about it, and nothing is
134
+ * written.
135
+ *
136
+ * Every child MUST name a `role`: it is the key of a declared RELATION field
137
+ * on the parent's Table, and an edge out of a record that names no field is
138
+ * refused by the store (REL-10 / T7) because without it nothing can read the
139
+ * relation's delete rule, its cardinality or its organization wall. The order
140
+ * children are handed in IS the order of the relation.
141
+ */
142
+ recordWriteGraph(args: {
143
+ table_id: Uuid;
144
+ parent: RecordDocument;
145
+ /** Each child: its document, the parent FIELD it fills, and optionally its own Table. */
146
+ children?: Array<{
147
+ data: RecordDocument;
148
+ role: string;
149
+ table_id?: Uuid;
150
+ position?: number;
151
+ }>;
152
+ /** Edges to things OUTSIDE the store. `direction` defaults to `"in"` — that thing produced this record. */
153
+ edges?: Array<{
154
+ entity: string;
155
+ id: Uuid;
156
+ direction?: "in" | "out";
157
+ label?: string;
158
+ role?: string;
159
+ position?: number;
160
+ metadata?: Record<string, unknown>;
161
+ }>;
162
+ }): Promise<RecordsResult<RecordGraphWritten>>;
114
163
  recordUpdate(args: {
115
164
  record_id: Uuid;
116
165
  patch: Record<string, unknown>;
@@ -303,10 +352,7 @@ interface RecordsClient {
303
352
  * wherever a grid, board, list or picker resolves more than one chip: the
304
353
  * per-id lane is what made a page of relation cells a page of requests.
305
354
  */
306
- relationWordsMany(args: {
307
- field_id: Uuid;
308
- record_ids: Uuid[];
309
- }): Promise<RecordsResult<Record<string, string>>>;
355
+ relationWordsMany(args: RelationWordsManyArgs): Promise<RecordsResult<Record<string, string>>>;
310
356
  /** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
311
357
  fieldRetire(args: {
312
358
  field_id: Uuid;
@@ -1470,6 +1516,91 @@ interface RecordsClient {
1470
1516
  ids: Uuid[];
1471
1517
  subject?: "record";
1472
1518
  }): Promise<RecordsResult<MyLevel[]>>;
1519
+ /** G1. Write ONE leaf of a Table's colors, or clear it with `null`. Editor on the Table. */
1520
+ tableDecorate(args: {
1521
+ table_id: Uuid;
1522
+ path: DecorationPath;
1523
+ value: unknown;
1524
+ }): Promise<RecordsResult<TableDecorations>>;
1525
+ /** G1. A Table's colors as a screen paints them, with what went stale named. */
1526
+ tableDecorations(args: {
1527
+ table_id: Uuid;
1528
+ }): Promise<RecordsResult<TableDecorations>>;
1529
+ /** G1. The layout a grid opens with: platform → organization knob → the view's own. */
1530
+ gridLayout(args: {
1531
+ table_id: Uuid;
1532
+ view_id?: Uuid | null;
1533
+ }): Promise<RecordsResult<GridLayout>>;
1534
+ /** G3. The older grid's formula text → the store's expression. Never refuses a typo: answers ok:false. */
1535
+ formulaParse(args: {
1536
+ table_id: Uuid;
1537
+ text: string;
1538
+ }): Promise<RecordsResult<FormulaParse>>;
1539
+ /** G2. Declare a Table's row actions — the whole list. Editor on the Table. */
1540
+ actionDeclare(args: {
1541
+ table_id: Uuid;
1542
+ actions: RowAction[];
1543
+ }): Promise<RecordsResult<RowAction[]>>;
1544
+ /** G2. A Table's row actions, each saying whether it can run here. */
1545
+ rowActions(args: {
1546
+ table_id: Uuid;
1547
+ }): Promise<RecordsResult<{
1548
+ actions: RowAction[];
1549
+ stale: unknown[];
1550
+ }>>;
1551
+ /**
1552
+ * G2. Run one action on a selection, in ONE transaction. A refusal changed NOTHING; read
1553
+ * every record and field that refused with `actionRefusals(result.error)`.
1554
+ */
1555
+ actionRun(args: {
1556
+ action_id: Uuid;
1557
+ record_ids: Uuid[];
1558
+ }): Promise<RecordsResult<ActionRunResult>>;
1559
+ /** G4. Send every change to this Table's records to an https webhook. Admin. The secret is shown once. */
1560
+ tableWebhookDeclare(args: {
1561
+ table_id: Uuid;
1562
+ target_url: string;
1563
+ events?: RecordEvent[] | null;
1564
+ description?: string | null;
1565
+ }): Promise<RecordsResult<TableWebhookDeclared>>;
1566
+ /** G4. The webhooks a Table sends to, with their delivery health — never the secret. */
1567
+ tableWebhooks(args: {
1568
+ table_id: Uuid;
1569
+ }): Promise<RecordsResult<TableWebhook[]>>;
1570
+ /** G4. Switch one off. It is never deleted. */
1571
+ tableWebhookArchive(args: {
1572
+ webhook_id: Uuid;
1573
+ }): Promise<RecordsResult<boolean>>;
1574
+ /**
1575
+ * G5. Build one real use case's tables here, rows and relations included, in one
1576
+ * transaction. `useCaseId` is one of `useCaseIds()` from `@ai-matrx/records/use-cases`.
1577
+ */
1578
+ tableFromExample(args: {
1579
+ home_id: Uuid;
1580
+ useCaseId: string;
1581
+ }): Promise<RecordsResult<ExampleBuilt>>;
1582
+ /** G5. Number the records an autonumber column found already there, in creation order. */
1583
+ autonumberBackfill(args: {
1584
+ field_id: Uuid;
1585
+ }): Promise<RecordsResult<{
1586
+ numbered: number;
1587
+ highest: number | null;
1588
+ says: string;
1589
+ }>>;
1590
+ /** G5. One page of the export door — exactly the rows and columns the read door serves this person. */
1591
+ ioExport(args: {
1592
+ table_id: Uuid;
1593
+ columns?: string[] | null;
1594
+ limit?: number;
1595
+ }): Promise<RecordsResult<IoExportPage>>;
1596
+ /** G5. That page as an .xlsx; a withheld column is named on its own sheet. */
1597
+ exportXlsx(args: {
1598
+ table_id: Uuid;
1599
+ columns?: string[] | null;
1600
+ limit?: number;
1601
+ labels?: Record<string, string>;
1602
+ sheetLabel?: string;
1603
+ }): Promise<RecordsResult<Uint8Array>>;
1473
1604
  }
1474
1605
  declare function createRecordsClient(config: RecordsConfig): RecordsClient;
1475
1606
  /**
@@ -1493,6 +1624,7 @@ declare const DOORS: {
1493
1624
  readonly queryTableAsOf: "query_table_as_of";
1494
1625
  readonly recordWrite: "record_write";
1495
1626
  readonly recordWriteMany: "record_write_many";
1627
+ readonly recordWriteGraph: "record_write_graph";
1496
1628
  readonly recordUpdate: "record_update";
1497
1629
  readonly recordDelete: "record_delete";
1498
1630
  readonly recordRestore: "record_restore";
@@ -1680,6 +1812,19 @@ declare const DOORS: {
1680
1812
  readonly checklistRuns: "checklist_runs";
1681
1813
  readonly checklistStepComplete: "checklist_step_complete";
1682
1814
  readonly checklistStepRefusal: "checklist_step_refusal";
1815
+ readonly tableDecorate: "table_decorate";
1816
+ readonly tableDecorations: "table_decorations";
1817
+ readonly gridLayout: "grid_layout";
1818
+ readonly formulaParse: "formula_parse";
1819
+ readonly actionDeclare: "action_declare";
1820
+ readonly rowActions: "row_actions";
1821
+ readonly actionRun: "action_run";
1822
+ readonly tableWebhookDeclare: "table_webhook_declare";
1823
+ readonly tableWebhooks: "table_webhooks";
1824
+ readonly tableWebhookArchive: "table_webhook_archive";
1825
+ readonly tableFromExample: "table_from_example";
1826
+ readonly autonumberBackfill: "autonumber_backfill";
1827
+ readonly ioExport: "io_export";
1683
1828
  readonly metadataSearch: "metadata_search";
1684
1829
  readonly ruleDeclare: "rule_declare";
1685
1830
  readonly fieldPropose: "field_propose";
@@ -1810,4 +1955,4 @@ declare function parseCsv(text: string): string[][];
1810
1955
  declare function importCsv(text: string): ParsedImport;
1811
1956
  declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
1812
1957
 
1813
- export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
1958
+ export { ActionRunResult, AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, TableProposal, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };