@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.
- package/CHANGELOG.md +78 -0
- package/dist/core/index.cjs +2485 -8
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +154 -9
- package/dist/core/index.d.ts +154 -9
- package/dist/core/index.js +2492 -8
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +111 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +250 -4
- package/dist/index.d.ts +250 -4
- package/dist/index.js +101 -4
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +2495 -8
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +767 -10
- package/dist/react/index.d.ts +767 -10
- package/dist/react/index.js +2491 -8
- package/dist/react/index.js.map +1 -1
- package/dist/{field-Ct7_iYEF.d.cts → types-RxnWzAWZ.d.cts} +395 -5
- package/dist/{field-Ct7_iYEF.d.ts → types-RxnWzAWZ.d.ts} +395 -5
- package/dist/use-cases/index.cjs +15 -0
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +3 -336
- package/dist/use-cases/index.d.ts +3 -336
- package/dist/use-cases/index.js +15 -0
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { p as Uuid, T as Timestamp, t as ReadRow, R as RecordDocument, aT as TableType, aR as TableDisplay, aL as StorageMode, aS as TableOrigin, S as StoredRecord, u as Field, ap as ParityFieldType, aG as RuleUse, aF as RuleNodeKind, C as RecordsError, U as UseCase, aD as RelationFlavor, al as OnDelete, aA as RelationBinding, aB as RelationCardinality, ai as MergeFieldSource, ah as MergeFieldSemanticType, ag as MergeFieldModifier, am as OverridePolicy, Z as Delivery, a9 as Freshness, K as Actor, D as PgError } from './types-RxnWzAWZ.cjs';
|
|
2
|
+
export { H as ABSENCE_REASONS, I as ACTOR_VOCABULARY, J as AbsenceReason, 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, _ as ENTITY_TOKENS, $ as EntityToken, a0 as FIELD_SENSITIVITIES, a1 as FIELD_SOURCES, a2 as FRESHNESS, a3 as FieldBehavior, w as FieldPatch, z as FieldProposal, a4 as FieldRule, a5 as FieldSensitivity, a6 as FieldSource, a7 as FieldTypeWord, a8 as ForbiddenEnvelopeWord, 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, v as NewFieldDeclaration, aj as ON_DELETE, ak as OVERRIDE_POLICIES, an as PARITY_FIELD_TYPES, ao as PER_VALUE_ACCESS_WORDS, aq as ParityFieldTypeDescriptor, ar as PerValueAccessWord, G as PredictedRefusal, 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, y as ReadValue, r as RecordGraphWritten, s as RecordRead, x as RecordRevision, az as RecordsErrorCode, q as RecordsResult, aC as RelationDisplay, aE as RetiredActorWord, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, E as StaleWriteDetail, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, A as TableProposal, 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, W as WriteConflict, a$ as err, b0 as isRecordsErr, b1 as ok } from './types-RxnWzAWZ.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
|
|
@@ -1397,7 +1397,9 @@ declare function portalTitleTypedBack(typed: string, title: string): boolean;
|
|
|
1397
1397
|
declare function emptyPortalArchiveLine(): string;
|
|
1398
1398
|
|
|
1399
1399
|
/** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
|
|
1400
|
-
type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
|
|
1400
|
+
type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
|
|
1401
|
+
/** GRID-PRIMITIVES G1: the summary bar's other four. Blank = no value, JSON null or "". */
|
|
1402
|
+
| "median" | "filled" | "empty" | "unique";
|
|
1401
1403
|
/** The periods a date Field can be bucketed into (`custom.agg_buckets()`). */
|
|
1402
1404
|
type AggregateBucket = "day" | "week" | "month" | "quarter" | "year";
|
|
1403
1405
|
/**
|
|
@@ -1468,6 +1470,219 @@ declare function measureKey(measure: AggregateMeasure): string;
|
|
|
1468
1470
|
*/
|
|
1469
1471
|
declare function stableFilterKey(filter: RecordFilter | null | undefined): string;
|
|
1470
1472
|
|
|
1473
|
+
/** `custom.decoration_colors()` — the palette, in the order an uncolored choice takes. */
|
|
1474
|
+
type DecorationColor = "slate" | "green" | "amber" | "red" | "blue" | "violet" | "teal";
|
|
1475
|
+
/** `custom.decoration_rule_ops()` — the tests a color rule may ask. */
|
|
1476
|
+
type DecorationRuleOp = "is" | "is_not" | "contains" | "is_empty" | "not_empty" | "is_true" | "is_false" | "gt" | "gte" | "lt" | "lte";
|
|
1477
|
+
type DecorationTarget = "row" | "cell";
|
|
1478
|
+
interface DecorationRule {
|
|
1479
|
+
/** Given by the store when omitted; keep it to edit the rule in place. */
|
|
1480
|
+
id?: string;
|
|
1481
|
+
/** The Field id the rule reads. */
|
|
1482
|
+
field: Uuid;
|
|
1483
|
+
op: DecorationRuleOp;
|
|
1484
|
+
/** Compared as text for is / is_not / contains, as a number for gt / gte / lt / lte. */
|
|
1485
|
+
value?: string | number;
|
|
1486
|
+
color: DecorationColor;
|
|
1487
|
+
target: DecorationTarget;
|
|
1488
|
+
}
|
|
1489
|
+
interface TableDecorations {
|
|
1490
|
+
version: 1;
|
|
1491
|
+
colors: DecorationColor[];
|
|
1492
|
+
rule_ops: Array<{
|
|
1493
|
+
op: DecorationRuleOp;
|
|
1494
|
+
takes_value: boolean;
|
|
1495
|
+
label: string;
|
|
1496
|
+
}>;
|
|
1497
|
+
color_by?: {
|
|
1498
|
+
field: Uuid;
|
|
1499
|
+
target: DecorationTarget;
|
|
1500
|
+
};
|
|
1501
|
+
rules: DecorationRule[];
|
|
1502
|
+
/** Hand highlights: record id → color. */
|
|
1503
|
+
rows: Record<Uuid, DecorationColor>;
|
|
1504
|
+
/** Hand highlights: Field id → color. */
|
|
1505
|
+
columns: Record<Uuid, DecorationColor>;
|
|
1506
|
+
/** Hand highlights: record id → Field id → color. */
|
|
1507
|
+
cells: Record<Uuid, Record<Uuid, DecorationColor>>;
|
|
1508
|
+
/** What stopped painting because its column is gone — said, never silently dropped. */
|
|
1509
|
+
stale: Array<{
|
|
1510
|
+
part: string;
|
|
1511
|
+
field?: Uuid;
|
|
1512
|
+
rule_id?: string;
|
|
1513
|
+
record_id?: Uuid;
|
|
1514
|
+
says: string;
|
|
1515
|
+
}>;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* ONE LEAF of a Table's colors — the older door's own path shape
|
|
1519
|
+
* (`public.udt_set_table_style`), so two people highlighting two rows never overwrite each other.
|
|
1520
|
+
*/
|
|
1521
|
+
type DecorationPath = ["color_by"] | ["rules"] | ["rows", Uuid] | ["columns", Uuid] | ["cells", Uuid, Uuid];
|
|
1522
|
+
type GridLayoutMode = "auto" | "fit" | "scroll";
|
|
1523
|
+
type GridRowHeight = "compact" | "normal" | "tall";
|
|
1524
|
+
/** A saved view's own layout, kept at `definition.layout` (custom.view_declare judges it). */
|
|
1525
|
+
interface ViewLayout {
|
|
1526
|
+
mode?: GridLayoutMode;
|
|
1527
|
+
row_height?: GridRowHeight;
|
|
1528
|
+
freeze_first_column?: boolean;
|
|
1529
|
+
wrap?: boolean;
|
|
1530
|
+
/** Field id → pixels, 60–1200. */
|
|
1531
|
+
widths?: Record<Uuid, number>;
|
|
1532
|
+
}
|
|
1533
|
+
interface GridLayout {
|
|
1534
|
+
layout: Required<Omit<ViewLayout, "widths">> & {
|
|
1535
|
+
fit_max_columns: number;
|
|
1536
|
+
widths?: Record<Uuid, number>;
|
|
1537
|
+
};
|
|
1538
|
+
/** Where each choice came from. */
|
|
1539
|
+
source: Record<string, "platform" | "organization" | "view">;
|
|
1540
|
+
view_id: Uuid | null;
|
|
1541
|
+
/** A stored choice the grid cannot honour, named. */
|
|
1542
|
+
refused: Array<{
|
|
1543
|
+
from: "organization" | "view";
|
|
1544
|
+
choice: string;
|
|
1545
|
+
value: unknown;
|
|
1546
|
+
says: string;
|
|
1547
|
+
}>;
|
|
1548
|
+
}
|
|
1549
|
+
type RowActionStep = {
|
|
1550
|
+
field: Uuid;
|
|
1551
|
+
set: "value";
|
|
1552
|
+
value: unknown;
|
|
1553
|
+
} | {
|
|
1554
|
+
field: Uuid;
|
|
1555
|
+
set: "clear";
|
|
1556
|
+
}
|
|
1557
|
+
/** Worked out by the store on each record: the older grid's formula text, or an expression. */
|
|
1558
|
+
| {
|
|
1559
|
+
field: Uuid;
|
|
1560
|
+
set: "compute";
|
|
1561
|
+
formula_text?: string;
|
|
1562
|
+
expr?: Record<string, unknown>;
|
|
1563
|
+
};
|
|
1564
|
+
interface RowAction {
|
|
1565
|
+
/** Given by the store when omitted. */
|
|
1566
|
+
id?: Uuid;
|
|
1567
|
+
name: string;
|
|
1568
|
+
kind?: "update" | "agent";
|
|
1569
|
+
color?: DecorationColor | null;
|
|
1570
|
+
icon?: string;
|
|
1571
|
+
/** Ask before running. */
|
|
1572
|
+
confirm?: boolean;
|
|
1573
|
+
steps?: RowActionStep[];
|
|
1574
|
+
/** `agent` only: what the record chat opens with. */
|
|
1575
|
+
prompt?: string;
|
|
1576
|
+
/** On read: whether custom.action_run can run it. */
|
|
1577
|
+
runnable?: boolean;
|
|
1578
|
+
}
|
|
1579
|
+
interface ActionRunResult {
|
|
1580
|
+
action_id: Uuid;
|
|
1581
|
+
action: string;
|
|
1582
|
+
table_id: Uuid;
|
|
1583
|
+
ran: number;
|
|
1584
|
+
records: Array<{
|
|
1585
|
+
record_id: Uuid;
|
|
1586
|
+
version: number;
|
|
1587
|
+
}>;
|
|
1588
|
+
}
|
|
1589
|
+
/** One record (and, when it can be named, one field) that refused a row action. */
|
|
1590
|
+
interface ActionRefusal {
|
|
1591
|
+
record_id: Uuid;
|
|
1592
|
+
record: string | null;
|
|
1593
|
+
field_id: Uuid | null;
|
|
1594
|
+
field: string | null;
|
|
1595
|
+
code?: string;
|
|
1596
|
+
says: string;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Every refusal of an action run, read off the store's refusal. A run that any record refused
|
|
1600
|
+
* changed NOTHING; this is the list a screen shows so the person can fix those and run again.
|
|
1601
|
+
*/
|
|
1602
|
+
declare function actionRefusals(error: RecordsError): ActionRefusal[];
|
|
1603
|
+
type FormulaParse = {
|
|
1604
|
+
ok: true;
|
|
1605
|
+
text: string;
|
|
1606
|
+
/** The store's expression shape — what `config.expr` holds. */
|
|
1607
|
+
expr: Record<string, unknown>;
|
|
1608
|
+
references: Array<{
|
|
1609
|
+
name: string;
|
|
1610
|
+
field_id: Uuid;
|
|
1611
|
+
}>;
|
|
1612
|
+
result_type: "number" | "text" | "boolean" | "date" | "unknown";
|
|
1613
|
+
} | {
|
|
1614
|
+
ok: false;
|
|
1615
|
+
text: string;
|
|
1616
|
+
error: string;
|
|
1617
|
+
position: number;
|
|
1618
|
+
};
|
|
1619
|
+
type RecordEvent = "record.created" | "record.updated" | "record.archived" | "record.restored" | "record.purged";
|
|
1620
|
+
interface TableWebhookDeclared {
|
|
1621
|
+
webhook_id: Uuid;
|
|
1622
|
+
table_id: Uuid;
|
|
1623
|
+
target_url: string;
|
|
1624
|
+
events: RecordEvent[];
|
|
1625
|
+
/** Shown this once: X-Matrx-Signature is sha256=HMAC-SHA256(secret, body). */
|
|
1626
|
+
secret: string;
|
|
1627
|
+
says: string;
|
|
1628
|
+
}
|
|
1629
|
+
interface TableWebhook {
|
|
1630
|
+
webhook_id: Uuid;
|
|
1631
|
+
target_url: string;
|
|
1632
|
+
description: string | null;
|
|
1633
|
+
events: RecordEvent[] | null;
|
|
1634
|
+
is_active: boolean;
|
|
1635
|
+
last_attempt_at: string | null;
|
|
1636
|
+
last_success_at: string | null;
|
|
1637
|
+
consecutive_failures: number;
|
|
1638
|
+
owner_id: Uuid;
|
|
1639
|
+
created_at: string;
|
|
1640
|
+
}
|
|
1641
|
+
/** What `custom.table_from_example` builds from. */
|
|
1642
|
+
interface ExampleSpec {
|
|
1643
|
+
business: string;
|
|
1644
|
+
tables: Array<Record<string, unknown>>;
|
|
1645
|
+
}
|
|
1646
|
+
interface ExampleBuilt {
|
|
1647
|
+
business: string;
|
|
1648
|
+
tables: Array<{
|
|
1649
|
+
token: string;
|
|
1650
|
+
table_id: Uuid;
|
|
1651
|
+
name: string;
|
|
1652
|
+
records?: number;
|
|
1653
|
+
note?: string;
|
|
1654
|
+
}>;
|
|
1655
|
+
says: string;
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* ONE REAL USE CASE → the example door's spec. The use case is validated by this package's own
|
|
1659
|
+
* suite (`use-cases/validate.ts`); the door refuses placeholder names again as a second line.
|
|
1660
|
+
*/
|
|
1661
|
+
declare function exampleSpec(useCase: UseCase): ExampleSpec;
|
|
1662
|
+
/** One page of `custom.io_export`: exactly what the read door serves this person. */
|
|
1663
|
+
interface IoExportPage {
|
|
1664
|
+
table_id: Uuid;
|
|
1665
|
+
token: string;
|
|
1666
|
+
columns: string[];
|
|
1667
|
+
rows: Array<Record<string, unknown>>;
|
|
1668
|
+
/** A column the store withheld from this reader, with the store's reason. */
|
|
1669
|
+
withheld: Record<string, unknown>;
|
|
1670
|
+
page: {
|
|
1671
|
+
requested: number;
|
|
1672
|
+
returned: number;
|
|
1673
|
+
ceiling: number;
|
|
1674
|
+
next: number | null;
|
|
1675
|
+
};
|
|
1676
|
+
choices: unknown;
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* THE .XLSX OF AN EXPORT PAGE. Numbers stay numbers and booleans stay booleans in the sheet; a
|
|
1680
|
+
* column the store withheld is NAMED on a second sheet with the store's reason, so a person
|
|
1681
|
+
* never mistakes a withheld column for an empty one. `labels` maps a column key to its header
|
|
1682
|
+
* (the Field's label); a key with no label is its own header.
|
|
1683
|
+
*/
|
|
1684
|
+
declare function exportPageXlsx(page: IoExportPage, labels?: Record<string, string>, sheetLabel?: string): Promise<Uint8Array>;
|
|
1685
|
+
|
|
1471
1686
|
/** The seven shapes a block can take, exactly as `custom.dashboard_kinds()` answers. */
|
|
1472
1687
|
type DashboardBlockKind = "number" | "bar" | "column" | "line" | "donut" | "table" | "stuck";
|
|
1473
1688
|
/**
|
|
@@ -2407,6 +2622,37 @@ interface RelationCoordinate {
|
|
|
2407
2622
|
/** Which way to walk. `out` is this record's own relation fields. */
|
|
2408
2623
|
direction?: "out" | "in" | "either";
|
|
2409
2624
|
}
|
|
2625
|
+
/** Which store a relation cell's target lives in. Absent means the unified store. */
|
|
2626
|
+
type RelationStore = "record" | "older";
|
|
2627
|
+
/**
|
|
2628
|
+
* Which of the target's columns a relation column shows, and how they join.
|
|
2629
|
+
* A bare name and a list are both shorthand for the object with a single space
|
|
2630
|
+
* as the separator. Null/absent means the target table's own reference column.
|
|
2631
|
+
*/
|
|
2632
|
+
type RelationDisplaySpec = string | readonly string[] | {
|
|
2633
|
+
columns: readonly string[];
|
|
2634
|
+
separator?: string;
|
|
2635
|
+
};
|
|
2636
|
+
/**
|
|
2637
|
+
* The arguments of the ONE resolver, discriminated by store.
|
|
2638
|
+
*
|
|
2639
|
+
* The unified arm takes the FIELD, because that is where its display spec is
|
|
2640
|
+
* declared and judged — `custom._display_of_field` reads it server-side and the
|
|
2641
|
+
* caller never carries it. The older store has no declare-time judge for a
|
|
2642
|
+
* column's format, so its arm carries the spec it read out of the column's own
|
|
2643
|
+
* `metadata.format.options.display`. That asymmetry is real and is not papered
|
|
2644
|
+
* over here: it is the difference between a store that judges a spec when it is
|
|
2645
|
+
* SET and one that has only ever judged a cell when it is READ.
|
|
2646
|
+
*/
|
|
2647
|
+
type RelationWordsManyArgs = {
|
|
2648
|
+
store?: "record";
|
|
2649
|
+
field_id: Uuid;
|
|
2650
|
+
record_ids: Uuid[];
|
|
2651
|
+
} | {
|
|
2652
|
+
store: "older";
|
|
2653
|
+
display?: RelationDisplaySpec | null;
|
|
2654
|
+
record_ids: Uuid[];
|
|
2655
|
+
};
|
|
2410
2656
|
|
|
2411
2657
|
/**
|
|
2412
2658
|
* DYN-14 / DYN-15. An ordered list of merge fields ENDING IN A LITERAL, or the
|
|
@@ -3276,4 +3522,4 @@ interface ConversationScopeContext {
|
|
|
3276
3522
|
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
3277
3523
|
declare function scopeChip(scope: ConversationScope): string;
|
|
3278
3524
|
|
|
3279
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, 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 ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, 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 ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, 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, 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 };
|
|
3525
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type ActionRefusal, type ActionRunResult, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, 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 ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, 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 ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, type FormulaParse, Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type IoExportPage, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordEvent, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, RecordsError, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplaySpec, RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, TableDisplay, TableOrigin, TableType, type TableWebhook, type TableWebhookDeclared, Timestamp, Uuid, type ViewLayout, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { p as Uuid, T as Timestamp, t as ReadRow, R as RecordDocument, aT as TableType, aR as TableDisplay, aL as StorageMode, aS as TableOrigin, S as StoredRecord, u as Field, ap as ParityFieldType, aG as RuleUse, aF as RuleNodeKind, C as RecordsError, U as UseCase, aD as RelationFlavor, al as OnDelete, aA as RelationBinding, aB as RelationCardinality, ai as MergeFieldSource, ah as MergeFieldSemanticType, ag as MergeFieldModifier, am as OverridePolicy, Z as Delivery, a9 as Freshness, K as Actor, D as PgError } from './types-RxnWzAWZ.js';
|
|
2
|
+
export { H as ABSENCE_REASONS, I as ACTOR_VOCABULARY, J as AbsenceReason, 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, _ as ENTITY_TOKENS, $ as EntityToken, a0 as FIELD_SENSITIVITIES, a1 as FIELD_SOURCES, a2 as FRESHNESS, a3 as FieldBehavior, w as FieldPatch, z as FieldProposal, a4 as FieldRule, a5 as FieldSensitivity, a6 as FieldSource, a7 as FieldTypeWord, a8 as ForbiddenEnvelopeWord, 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, v as NewFieldDeclaration, aj as ON_DELETE, ak as OVERRIDE_POLICIES, an as PARITY_FIELD_TYPES, ao as PER_VALUE_ACCESS_WORDS, aq as ParityFieldTypeDescriptor, ar as PerValueAccessWord, G as PredictedRefusal, 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, y as ReadValue, r as RecordGraphWritten, s as RecordRead, x as RecordRevision, az as RecordsErrorCode, q as RecordsResult, aC as RelationDisplay, aE as RetiredActorWord, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, E as StaleWriteDetail, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, A as TableProposal, 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, W as WriteConflict, a$ as err, b0 as isRecordsErr, b1 as ok } from './types-RxnWzAWZ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
|
|
@@ -1397,7 +1397,9 @@ declare function portalTitleTypedBack(typed: string, title: string): boolean;
|
|
|
1397
1397
|
declare function emptyPortalArchiveLine(): string;
|
|
1398
1398
|
|
|
1399
1399
|
/** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
|
|
1400
|
-
type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
|
|
1400
|
+
type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
|
|
1401
|
+
/** GRID-PRIMITIVES G1: the summary bar's other four. Blank = no value, JSON null or "". */
|
|
1402
|
+
| "median" | "filled" | "empty" | "unique";
|
|
1401
1403
|
/** The periods a date Field can be bucketed into (`custom.agg_buckets()`). */
|
|
1402
1404
|
type AggregateBucket = "day" | "week" | "month" | "quarter" | "year";
|
|
1403
1405
|
/**
|
|
@@ -1468,6 +1470,219 @@ declare function measureKey(measure: AggregateMeasure): string;
|
|
|
1468
1470
|
*/
|
|
1469
1471
|
declare function stableFilterKey(filter: RecordFilter | null | undefined): string;
|
|
1470
1472
|
|
|
1473
|
+
/** `custom.decoration_colors()` — the palette, in the order an uncolored choice takes. */
|
|
1474
|
+
type DecorationColor = "slate" | "green" | "amber" | "red" | "blue" | "violet" | "teal";
|
|
1475
|
+
/** `custom.decoration_rule_ops()` — the tests a color rule may ask. */
|
|
1476
|
+
type DecorationRuleOp = "is" | "is_not" | "contains" | "is_empty" | "not_empty" | "is_true" | "is_false" | "gt" | "gte" | "lt" | "lte";
|
|
1477
|
+
type DecorationTarget = "row" | "cell";
|
|
1478
|
+
interface DecorationRule {
|
|
1479
|
+
/** Given by the store when omitted; keep it to edit the rule in place. */
|
|
1480
|
+
id?: string;
|
|
1481
|
+
/** The Field id the rule reads. */
|
|
1482
|
+
field: Uuid;
|
|
1483
|
+
op: DecorationRuleOp;
|
|
1484
|
+
/** Compared as text for is / is_not / contains, as a number for gt / gte / lt / lte. */
|
|
1485
|
+
value?: string | number;
|
|
1486
|
+
color: DecorationColor;
|
|
1487
|
+
target: DecorationTarget;
|
|
1488
|
+
}
|
|
1489
|
+
interface TableDecorations {
|
|
1490
|
+
version: 1;
|
|
1491
|
+
colors: DecorationColor[];
|
|
1492
|
+
rule_ops: Array<{
|
|
1493
|
+
op: DecorationRuleOp;
|
|
1494
|
+
takes_value: boolean;
|
|
1495
|
+
label: string;
|
|
1496
|
+
}>;
|
|
1497
|
+
color_by?: {
|
|
1498
|
+
field: Uuid;
|
|
1499
|
+
target: DecorationTarget;
|
|
1500
|
+
};
|
|
1501
|
+
rules: DecorationRule[];
|
|
1502
|
+
/** Hand highlights: record id → color. */
|
|
1503
|
+
rows: Record<Uuid, DecorationColor>;
|
|
1504
|
+
/** Hand highlights: Field id → color. */
|
|
1505
|
+
columns: Record<Uuid, DecorationColor>;
|
|
1506
|
+
/** Hand highlights: record id → Field id → color. */
|
|
1507
|
+
cells: Record<Uuid, Record<Uuid, DecorationColor>>;
|
|
1508
|
+
/** What stopped painting because its column is gone — said, never silently dropped. */
|
|
1509
|
+
stale: Array<{
|
|
1510
|
+
part: string;
|
|
1511
|
+
field?: Uuid;
|
|
1512
|
+
rule_id?: string;
|
|
1513
|
+
record_id?: Uuid;
|
|
1514
|
+
says: string;
|
|
1515
|
+
}>;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* ONE LEAF of a Table's colors — the older door's own path shape
|
|
1519
|
+
* (`public.udt_set_table_style`), so two people highlighting two rows never overwrite each other.
|
|
1520
|
+
*/
|
|
1521
|
+
type DecorationPath = ["color_by"] | ["rules"] | ["rows", Uuid] | ["columns", Uuid] | ["cells", Uuid, Uuid];
|
|
1522
|
+
type GridLayoutMode = "auto" | "fit" | "scroll";
|
|
1523
|
+
type GridRowHeight = "compact" | "normal" | "tall";
|
|
1524
|
+
/** A saved view's own layout, kept at `definition.layout` (custom.view_declare judges it). */
|
|
1525
|
+
interface ViewLayout {
|
|
1526
|
+
mode?: GridLayoutMode;
|
|
1527
|
+
row_height?: GridRowHeight;
|
|
1528
|
+
freeze_first_column?: boolean;
|
|
1529
|
+
wrap?: boolean;
|
|
1530
|
+
/** Field id → pixels, 60–1200. */
|
|
1531
|
+
widths?: Record<Uuid, number>;
|
|
1532
|
+
}
|
|
1533
|
+
interface GridLayout {
|
|
1534
|
+
layout: Required<Omit<ViewLayout, "widths">> & {
|
|
1535
|
+
fit_max_columns: number;
|
|
1536
|
+
widths?: Record<Uuid, number>;
|
|
1537
|
+
};
|
|
1538
|
+
/** Where each choice came from. */
|
|
1539
|
+
source: Record<string, "platform" | "organization" | "view">;
|
|
1540
|
+
view_id: Uuid | null;
|
|
1541
|
+
/** A stored choice the grid cannot honour, named. */
|
|
1542
|
+
refused: Array<{
|
|
1543
|
+
from: "organization" | "view";
|
|
1544
|
+
choice: string;
|
|
1545
|
+
value: unknown;
|
|
1546
|
+
says: string;
|
|
1547
|
+
}>;
|
|
1548
|
+
}
|
|
1549
|
+
type RowActionStep = {
|
|
1550
|
+
field: Uuid;
|
|
1551
|
+
set: "value";
|
|
1552
|
+
value: unknown;
|
|
1553
|
+
} | {
|
|
1554
|
+
field: Uuid;
|
|
1555
|
+
set: "clear";
|
|
1556
|
+
}
|
|
1557
|
+
/** Worked out by the store on each record: the older grid's formula text, or an expression. */
|
|
1558
|
+
| {
|
|
1559
|
+
field: Uuid;
|
|
1560
|
+
set: "compute";
|
|
1561
|
+
formula_text?: string;
|
|
1562
|
+
expr?: Record<string, unknown>;
|
|
1563
|
+
};
|
|
1564
|
+
interface RowAction {
|
|
1565
|
+
/** Given by the store when omitted. */
|
|
1566
|
+
id?: Uuid;
|
|
1567
|
+
name: string;
|
|
1568
|
+
kind?: "update" | "agent";
|
|
1569
|
+
color?: DecorationColor | null;
|
|
1570
|
+
icon?: string;
|
|
1571
|
+
/** Ask before running. */
|
|
1572
|
+
confirm?: boolean;
|
|
1573
|
+
steps?: RowActionStep[];
|
|
1574
|
+
/** `agent` only: what the record chat opens with. */
|
|
1575
|
+
prompt?: string;
|
|
1576
|
+
/** On read: whether custom.action_run can run it. */
|
|
1577
|
+
runnable?: boolean;
|
|
1578
|
+
}
|
|
1579
|
+
interface ActionRunResult {
|
|
1580
|
+
action_id: Uuid;
|
|
1581
|
+
action: string;
|
|
1582
|
+
table_id: Uuid;
|
|
1583
|
+
ran: number;
|
|
1584
|
+
records: Array<{
|
|
1585
|
+
record_id: Uuid;
|
|
1586
|
+
version: number;
|
|
1587
|
+
}>;
|
|
1588
|
+
}
|
|
1589
|
+
/** One record (and, when it can be named, one field) that refused a row action. */
|
|
1590
|
+
interface ActionRefusal {
|
|
1591
|
+
record_id: Uuid;
|
|
1592
|
+
record: string | null;
|
|
1593
|
+
field_id: Uuid | null;
|
|
1594
|
+
field: string | null;
|
|
1595
|
+
code?: string;
|
|
1596
|
+
says: string;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Every refusal of an action run, read off the store's refusal. A run that any record refused
|
|
1600
|
+
* changed NOTHING; this is the list a screen shows so the person can fix those and run again.
|
|
1601
|
+
*/
|
|
1602
|
+
declare function actionRefusals(error: RecordsError): ActionRefusal[];
|
|
1603
|
+
type FormulaParse = {
|
|
1604
|
+
ok: true;
|
|
1605
|
+
text: string;
|
|
1606
|
+
/** The store's expression shape — what `config.expr` holds. */
|
|
1607
|
+
expr: Record<string, unknown>;
|
|
1608
|
+
references: Array<{
|
|
1609
|
+
name: string;
|
|
1610
|
+
field_id: Uuid;
|
|
1611
|
+
}>;
|
|
1612
|
+
result_type: "number" | "text" | "boolean" | "date" | "unknown";
|
|
1613
|
+
} | {
|
|
1614
|
+
ok: false;
|
|
1615
|
+
text: string;
|
|
1616
|
+
error: string;
|
|
1617
|
+
position: number;
|
|
1618
|
+
};
|
|
1619
|
+
type RecordEvent = "record.created" | "record.updated" | "record.archived" | "record.restored" | "record.purged";
|
|
1620
|
+
interface TableWebhookDeclared {
|
|
1621
|
+
webhook_id: Uuid;
|
|
1622
|
+
table_id: Uuid;
|
|
1623
|
+
target_url: string;
|
|
1624
|
+
events: RecordEvent[];
|
|
1625
|
+
/** Shown this once: X-Matrx-Signature is sha256=HMAC-SHA256(secret, body). */
|
|
1626
|
+
secret: string;
|
|
1627
|
+
says: string;
|
|
1628
|
+
}
|
|
1629
|
+
interface TableWebhook {
|
|
1630
|
+
webhook_id: Uuid;
|
|
1631
|
+
target_url: string;
|
|
1632
|
+
description: string | null;
|
|
1633
|
+
events: RecordEvent[] | null;
|
|
1634
|
+
is_active: boolean;
|
|
1635
|
+
last_attempt_at: string | null;
|
|
1636
|
+
last_success_at: string | null;
|
|
1637
|
+
consecutive_failures: number;
|
|
1638
|
+
owner_id: Uuid;
|
|
1639
|
+
created_at: string;
|
|
1640
|
+
}
|
|
1641
|
+
/** What `custom.table_from_example` builds from. */
|
|
1642
|
+
interface ExampleSpec {
|
|
1643
|
+
business: string;
|
|
1644
|
+
tables: Array<Record<string, unknown>>;
|
|
1645
|
+
}
|
|
1646
|
+
interface ExampleBuilt {
|
|
1647
|
+
business: string;
|
|
1648
|
+
tables: Array<{
|
|
1649
|
+
token: string;
|
|
1650
|
+
table_id: Uuid;
|
|
1651
|
+
name: string;
|
|
1652
|
+
records?: number;
|
|
1653
|
+
note?: string;
|
|
1654
|
+
}>;
|
|
1655
|
+
says: string;
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* ONE REAL USE CASE → the example door's spec. The use case is validated by this package's own
|
|
1659
|
+
* suite (`use-cases/validate.ts`); the door refuses placeholder names again as a second line.
|
|
1660
|
+
*/
|
|
1661
|
+
declare function exampleSpec(useCase: UseCase): ExampleSpec;
|
|
1662
|
+
/** One page of `custom.io_export`: exactly what the read door serves this person. */
|
|
1663
|
+
interface IoExportPage {
|
|
1664
|
+
table_id: Uuid;
|
|
1665
|
+
token: string;
|
|
1666
|
+
columns: string[];
|
|
1667
|
+
rows: Array<Record<string, unknown>>;
|
|
1668
|
+
/** A column the store withheld from this reader, with the store's reason. */
|
|
1669
|
+
withheld: Record<string, unknown>;
|
|
1670
|
+
page: {
|
|
1671
|
+
requested: number;
|
|
1672
|
+
returned: number;
|
|
1673
|
+
ceiling: number;
|
|
1674
|
+
next: number | null;
|
|
1675
|
+
};
|
|
1676
|
+
choices: unknown;
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* THE .XLSX OF AN EXPORT PAGE. Numbers stay numbers and booleans stay booleans in the sheet; a
|
|
1680
|
+
* column the store withheld is NAMED on a second sheet with the store's reason, so a person
|
|
1681
|
+
* never mistakes a withheld column for an empty one. `labels` maps a column key to its header
|
|
1682
|
+
* (the Field's label); a key with no label is its own header.
|
|
1683
|
+
*/
|
|
1684
|
+
declare function exportPageXlsx(page: IoExportPage, labels?: Record<string, string>, sheetLabel?: string): Promise<Uint8Array>;
|
|
1685
|
+
|
|
1471
1686
|
/** The seven shapes a block can take, exactly as `custom.dashboard_kinds()` answers. */
|
|
1472
1687
|
type DashboardBlockKind = "number" | "bar" | "column" | "line" | "donut" | "table" | "stuck";
|
|
1473
1688
|
/**
|
|
@@ -2407,6 +2622,37 @@ interface RelationCoordinate {
|
|
|
2407
2622
|
/** Which way to walk. `out` is this record's own relation fields. */
|
|
2408
2623
|
direction?: "out" | "in" | "either";
|
|
2409
2624
|
}
|
|
2625
|
+
/** Which store a relation cell's target lives in. Absent means the unified store. */
|
|
2626
|
+
type RelationStore = "record" | "older";
|
|
2627
|
+
/**
|
|
2628
|
+
* Which of the target's columns a relation column shows, and how they join.
|
|
2629
|
+
* A bare name and a list are both shorthand for the object with a single space
|
|
2630
|
+
* as the separator. Null/absent means the target table's own reference column.
|
|
2631
|
+
*/
|
|
2632
|
+
type RelationDisplaySpec = string | readonly string[] | {
|
|
2633
|
+
columns: readonly string[];
|
|
2634
|
+
separator?: string;
|
|
2635
|
+
};
|
|
2636
|
+
/**
|
|
2637
|
+
* The arguments of the ONE resolver, discriminated by store.
|
|
2638
|
+
*
|
|
2639
|
+
* The unified arm takes the FIELD, because that is where its display spec is
|
|
2640
|
+
* declared and judged — `custom._display_of_field` reads it server-side and the
|
|
2641
|
+
* caller never carries it. The older store has no declare-time judge for a
|
|
2642
|
+
* column's format, so its arm carries the spec it read out of the column's own
|
|
2643
|
+
* `metadata.format.options.display`. That asymmetry is real and is not papered
|
|
2644
|
+
* over here: it is the difference between a store that judges a spec when it is
|
|
2645
|
+
* SET and one that has only ever judged a cell when it is READ.
|
|
2646
|
+
*/
|
|
2647
|
+
type RelationWordsManyArgs = {
|
|
2648
|
+
store?: "record";
|
|
2649
|
+
field_id: Uuid;
|
|
2650
|
+
record_ids: Uuid[];
|
|
2651
|
+
} | {
|
|
2652
|
+
store: "older";
|
|
2653
|
+
display?: RelationDisplaySpec | null;
|
|
2654
|
+
record_ids: Uuid[];
|
|
2655
|
+
};
|
|
2410
2656
|
|
|
2411
2657
|
/**
|
|
2412
2658
|
* DYN-14 / DYN-15. An ordered list of merge fields ENDING IN A LITERAL, or the
|
|
@@ -3276,4 +3522,4 @@ interface ConversationScopeContext {
|
|
|
3276
3522
|
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
3277
3523
|
declare function scopeChip(scope: ConversationScope): string;
|
|
3278
3524
|
|
|
3279
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, 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 ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, 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 ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, 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, 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 };
|
|
3525
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type ActionRefusal, type ActionRunResult, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, 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 ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, 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 ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, type FormulaParse, Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type IoExportPage, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordEvent, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, RecordsError, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplaySpec, RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, TableDisplay, TableOrigin, TableType, type TableWebhook, type TableWebhookDeclared, Timestamp, Uuid, type ViewLayout, 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, 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 };
|