@ai-matrx/records 0.48.0 → 0.51.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/dist/index.d.cts CHANGED
@@ -1,5 +1,73 @@
1
- import { U as Uuid, T as TableType, a as TableDisplay, S as StorageMode, g as Timestamp, aw as TableOrigin, h as RecordDocument, m as StoredRecord, l as Field, a7 as ParityFieldType, am as RuleUse, al as RuleNodeKind, R as RelationFlavor, O as OnDelete, ai as RelationBinding, f as RelationCardinality, a1 as MergeFieldSource, a0 as MergeFieldSemanticType, $ as MergeFieldModifier, a4 as OverridePolicy, B as Delivery, M as Freshness, x as Actor, P as PgError } from './field-CFK39l0H.cjs';
2
- export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, u as PredictedRefusal, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, k as ReadRow, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, ah as RecordsErrorCode, i as RecordsResult, aj as RelationDisplay, ak as RetiredActorWord, an as STORAGE_MODES, ao as STORE_DOORS, ap as STORE_KNOBS, aq as STORE_REFUSAL_CODES, t as StaleWriteDetail, ar as StoreDoorName, as as StoreRefusalCode, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, r as TableProposal, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, W as WriteConflict, aE as err, aF as isRecordsErr, aG as ok } from './field-CFK39l0H.cjs';
1
+ import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-C6_QKP1G.cjs';
2
+ export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, 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, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, 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, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, 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, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-C6_QKP1G.cjs';
3
+
4
+ /**
5
+ * THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
6
+ * split every other list in the platform makes between what is mine and what
7
+ * is the organization's.
8
+ *
9
+ * · `mine` — what I archived.
10
+ * · `org` — what anybody in this organization archived.
11
+ *
12
+ * `mine` is by construction a SUBSET of `org`: the store applies it as a
13
+ * narrowing conjunct beside the visibility ladder, so a lane can never show a
14
+ * record the ladder would have refused.
15
+ */
16
+ declare const ARCHIVE_LANES: readonly ["mine", "org"];
17
+ type ArchiveLane = (typeof ARCHIVE_LANES)[number];
18
+ /** THE DEFAULT LANE. The organization's archive, because "where did that job go?" is almost never a question about yourself. */
19
+ declare const DEFAULT_ARCHIVE_LANE: ArchiveLane;
20
+ /** What each lane is called on a screen, and what it actually answers. */
21
+ declare const ARCHIVE_LANE_LABEL: Record<ArchiveLane, string>;
22
+ declare const ARCHIVE_LANE_MEANS: Record<ArchiveLane, string>;
23
+ /** A word that is not a lane is not silently answered as one. */
24
+ declare function isArchiveLane(word: unknown): word is ArchiveLane;
25
+ /**
26
+ * One archived record, as `custom.read_records_archived` answers it: an
27
+ * ordinary `ReadRow` — same id, same masked document, same level, same hidden
28
+ * notices as it had while it was live — plus the two facts that only an archive
29
+ * needs.
30
+ *
31
+ * `archivedBy` is null when the archiver is not a member of this organization
32
+ * any more (their name is not this screen's to learn) or when the history
33
+ * partition that held the SOFT_DELETE has rolled away. Null is an ANSWER and
34
+ * gets its own sentence; it is never printed as an empty space.
35
+ */
36
+ interface ArchivedRow extends ReadRow {
37
+ archivedAt: Timestamp;
38
+ archivedBy: Uuid | null;
39
+ archivedByName: string | null;
40
+ }
41
+ /** The row shape the door returns over the wire, before it is folded. */
42
+ interface ArchivedDoorRow {
43
+ id: Uuid;
44
+ document: unknown;
45
+ level: string;
46
+ archived_at: Timestamp;
47
+ archived_by: Uuid | null;
48
+ archived_by_name: string | null;
49
+ }
50
+ /**
51
+ * WHEN IT WAS ARCHIVED, THE WAY A PERSON SAYS IT — "22 September 2026 at 01:53".
52
+ * Not an ISO string, and never a bare relative word like "yesterday" on its
53
+ * own: somebody deciding whether to bring a record back is deciding about a
54
+ * particular day's work.
55
+ */
56
+ declare function archivedWhen(at: Timestamp, locale?: string): string;
57
+ /**
58
+ * THE WHOLE SENTENCE A ROW IN THE ARCHIVE CARRIES. Both halves of the question
59
+ * the archived-items law asks — who, and when — and an honest sentence when the
60
+ * store could not answer the first half, rather than a blank where a name goes.
61
+ */
62
+ declare function archivedByLine(row: Pick<ArchivedRow, "archivedAt" | "archivedByName">, locale?: string): string;
63
+ /**
64
+ * WHAT AN EMPTY ARCHIVE SAYS, PER LANE. An empty list is an answer and it names
65
+ * the lane it is empty for, so "nothing here" can never be read as "nothing was
66
+ * ever archived" while the other lane holds twenty records.
67
+ */
68
+ declare function emptyArchiveLine(lane: ArchiveLane): string;
69
+ /** A document that survived the round trip is the same document — used by the guard. */
70
+ declare function sameDocument(a: RecordDocument, b: RecordDocument): boolean;
3
71
 
4
72
  /** `public.permission_level`, in the store's own order. */
5
73
  type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
@@ -1223,6 +1291,25 @@ interface AggregateWindow {
1223
1291
  * caller should get from the compiler, not from the database.
1224
1292
  */
1225
1293
  type AggregateFilter = string | number | boolean | null | AggregateWindow;
1294
+ /**
1295
+ * 🚨 THE STORE'S ONE FILTER SHAPE, AND THE ONLY NAME FOR IT.
1296
+ *
1297
+ * An object of Field key -> value. A scalar is an equality, `null` is UNSET
1298
+ * (the third state of a tick box), an object is a half-open time window.
1299
+ *
1300
+ * It is not the aggregate's private shape and never was. `platform.saved_view`
1301
+ * has carried exactly this as `definition -> 'filters'` across five live
1302
+ * surface keys since DOOR-18; `custom.view_declare` writes it;
1303
+ * `custom.agg_view_admits` reads it to decide whether a change belongs to a
1304
+ * saved view; `custom.record_aggregate` takes it as `p_filter` to COMPUTE a
1305
+ * dashboard number; and `custom.read_records_matching` takes it to OPEN the
1306
+ * rows behind that number. One `custom.record_filter_sql` in the database turns
1307
+ * it into SQL for the last two, so the number and the rows cannot disagree.
1308
+ *
1309
+ * Invent a second one and a chart can compute a total whose drill-through
1310
+ * lands somewhere else, which is the only way a drill-through can lie.
1311
+ */
1312
+ type RecordFilter = Record<string, AggregateFilter>;
1226
1313
  /** One measure. `count` counts rows and needs no Field; the rest read one. */
1227
1314
  interface AggregateMeasure {
1228
1315
  op: AggregateOperation;
@@ -1241,6 +1328,19 @@ interface AggregateRow {
1241
1328
  }
1242
1329
  /** The measure key the store answers with, so a chart can find its own series. */
1243
1330
  declare function measureKey(measure: AggregateMeasure): string;
1331
+ /**
1332
+ * THE QUESTION, AS A STABLE STRING — key-sorted JSON of a `RecordFilter`.
1333
+ *
1334
+ * A React parent that rebuilds `{ status: "Cancelled" }` on every render hands
1335
+ * a NEW object every time, and a hook that depends on the object re-reads the
1336
+ * whole page on every render forever. Depending on this instead means the page
1337
+ * is re-read exactly when the QUESTION changed, which is what a person means.
1338
+ *
1339
+ * Nested window objects are sorted too, so `{from, to}` and `{to, from}` are
1340
+ * one question. `undefined` and an empty filter are both `"{}"` — the caller
1341
+ * asked nothing, and there is only one way to ask nothing.
1342
+ */
1343
+ declare function stableFilterKey(filter: RecordFilter | null | undefined): string;
1244
1344
 
1245
1345
  /** The seven shapes a block can take, exactly as `custom.dashboard_kinds()` answers. */
1246
1346
  type DashboardBlockKind = "number" | "bar" | "column" | "line" | "donut" | "table" | "stuck";
@@ -2070,13 +2170,13 @@ interface SavedViewRow {
2070
2170
  view_id: Uuid;
2071
2171
  name: string;
2072
2172
  table_id: Uuid | null;
2073
- filters: Record<string, unknown>;
2173
+ filters: RecordFilter;
2074
2174
  created_at: string;
2075
2175
  }
2076
2176
  /** What `custom.view_declare` is asked for. `view_id` re-states rather than doubling. */
2077
2177
  interface SavedViewSpecIn {
2078
2178
  name: string;
2079
- filters?: Record<string, unknown> | null;
2179
+ filters?: RecordFilter | null;
2080
2180
  definition?: Record<string, unknown> | null;
2081
2181
  view_id?: Uuid | null;
2082
2182
  }
@@ -3050,4 +3150,4 @@ interface ConversationScopeContext {
3050
3150
  /** `About: Acme Industrial` — the chip a bound chat wears. */
3051
3151
  declare function scopeChip(scope: ConversationScope): string;
3052
3152
 
3053
- export { Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, 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, 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 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, 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 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, type RecordComment, RecordDocument, 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 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, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip };
3153
+ 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, 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 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, 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 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 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, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,73 @@
1
- import { U as Uuid, T as TableType, a as TableDisplay, S as StorageMode, g as Timestamp, aw as TableOrigin, h as RecordDocument, m as StoredRecord, l as Field, a7 as ParityFieldType, am as RuleUse, al as RuleNodeKind, R as RelationFlavor, O as OnDelete, ai as RelationBinding, f as RelationCardinality, a1 as MergeFieldSource, a0 as MergeFieldSemanticType, $ as MergeFieldModifier, a4 as OverridePolicy, B as Delivery, M as Freshness, x as Actor, P as PgError } from './field-CFK39l0H.js';
2
- export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, u as PredictedRefusal, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, k as ReadRow, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, ah as RecordsErrorCode, i as RecordsResult, aj as RelationDisplay, ak as RetiredActorWord, an as STORAGE_MODES, ao as STORE_DOORS, ap as STORE_KNOBS, aq as STORE_REFUSAL_CODES, t as StaleWriteDetail, ar as StoreDoorName, as as StoreRefusalCode, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, r as TableProposal, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, W as WriteConflict, aE as err, aF as isRecordsErr, aG as ok } from './field-CFK39l0H.js';
1
+ import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-C6_QKP1G.js';
2
+ export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, 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, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, 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, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, 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, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-C6_QKP1G.js';
3
+
4
+ /**
5
+ * THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
6
+ * split every other list in the platform makes between what is mine and what
7
+ * is the organization's.
8
+ *
9
+ * · `mine` — what I archived.
10
+ * · `org` — what anybody in this organization archived.
11
+ *
12
+ * `mine` is by construction a SUBSET of `org`: the store applies it as a
13
+ * narrowing conjunct beside the visibility ladder, so a lane can never show a
14
+ * record the ladder would have refused.
15
+ */
16
+ declare const ARCHIVE_LANES: readonly ["mine", "org"];
17
+ type ArchiveLane = (typeof ARCHIVE_LANES)[number];
18
+ /** THE DEFAULT LANE. The organization's archive, because "where did that job go?" is almost never a question about yourself. */
19
+ declare const DEFAULT_ARCHIVE_LANE: ArchiveLane;
20
+ /** What each lane is called on a screen, and what it actually answers. */
21
+ declare const ARCHIVE_LANE_LABEL: Record<ArchiveLane, string>;
22
+ declare const ARCHIVE_LANE_MEANS: Record<ArchiveLane, string>;
23
+ /** A word that is not a lane is not silently answered as one. */
24
+ declare function isArchiveLane(word: unknown): word is ArchiveLane;
25
+ /**
26
+ * One archived record, as `custom.read_records_archived` answers it: an
27
+ * ordinary `ReadRow` — same id, same masked document, same level, same hidden
28
+ * notices as it had while it was live — plus the two facts that only an archive
29
+ * needs.
30
+ *
31
+ * `archivedBy` is null when the archiver is not a member of this organization
32
+ * any more (their name is not this screen's to learn) or when the history
33
+ * partition that held the SOFT_DELETE has rolled away. Null is an ANSWER and
34
+ * gets its own sentence; it is never printed as an empty space.
35
+ */
36
+ interface ArchivedRow extends ReadRow {
37
+ archivedAt: Timestamp;
38
+ archivedBy: Uuid | null;
39
+ archivedByName: string | null;
40
+ }
41
+ /** The row shape the door returns over the wire, before it is folded. */
42
+ interface ArchivedDoorRow {
43
+ id: Uuid;
44
+ document: unknown;
45
+ level: string;
46
+ archived_at: Timestamp;
47
+ archived_by: Uuid | null;
48
+ archived_by_name: string | null;
49
+ }
50
+ /**
51
+ * WHEN IT WAS ARCHIVED, THE WAY A PERSON SAYS IT — "22 September 2026 at 01:53".
52
+ * Not an ISO string, and never a bare relative word like "yesterday" on its
53
+ * own: somebody deciding whether to bring a record back is deciding about a
54
+ * particular day's work.
55
+ */
56
+ declare function archivedWhen(at: Timestamp, locale?: string): string;
57
+ /**
58
+ * THE WHOLE SENTENCE A ROW IN THE ARCHIVE CARRIES. Both halves of the question
59
+ * the archived-items law asks — who, and when — and an honest sentence when the
60
+ * store could not answer the first half, rather than a blank where a name goes.
61
+ */
62
+ declare function archivedByLine(row: Pick<ArchivedRow, "archivedAt" | "archivedByName">, locale?: string): string;
63
+ /**
64
+ * WHAT AN EMPTY ARCHIVE SAYS, PER LANE. An empty list is an answer and it names
65
+ * the lane it is empty for, so "nothing here" can never be read as "nothing was
66
+ * ever archived" while the other lane holds twenty records.
67
+ */
68
+ declare function emptyArchiveLine(lane: ArchiveLane): string;
69
+ /** A document that survived the round trip is the same document — used by the guard. */
70
+ declare function sameDocument(a: RecordDocument, b: RecordDocument): boolean;
3
71
 
4
72
  /** `public.permission_level`, in the store's own order. */
5
73
  type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
@@ -1223,6 +1291,25 @@ interface AggregateWindow {
1223
1291
  * caller should get from the compiler, not from the database.
1224
1292
  */
1225
1293
  type AggregateFilter = string | number | boolean | null | AggregateWindow;
1294
+ /**
1295
+ * 🚨 THE STORE'S ONE FILTER SHAPE, AND THE ONLY NAME FOR IT.
1296
+ *
1297
+ * An object of Field key -> value. A scalar is an equality, `null` is UNSET
1298
+ * (the third state of a tick box), an object is a half-open time window.
1299
+ *
1300
+ * It is not the aggregate's private shape and never was. `platform.saved_view`
1301
+ * has carried exactly this as `definition -> 'filters'` across five live
1302
+ * surface keys since DOOR-18; `custom.view_declare` writes it;
1303
+ * `custom.agg_view_admits` reads it to decide whether a change belongs to a
1304
+ * saved view; `custom.record_aggregate` takes it as `p_filter` to COMPUTE a
1305
+ * dashboard number; and `custom.read_records_matching` takes it to OPEN the
1306
+ * rows behind that number. One `custom.record_filter_sql` in the database turns
1307
+ * it into SQL for the last two, so the number and the rows cannot disagree.
1308
+ *
1309
+ * Invent a second one and a chart can compute a total whose drill-through
1310
+ * lands somewhere else, which is the only way a drill-through can lie.
1311
+ */
1312
+ type RecordFilter = Record<string, AggregateFilter>;
1226
1313
  /** One measure. `count` counts rows and needs no Field; the rest read one. */
1227
1314
  interface AggregateMeasure {
1228
1315
  op: AggregateOperation;
@@ -1241,6 +1328,19 @@ interface AggregateRow {
1241
1328
  }
1242
1329
  /** The measure key the store answers with, so a chart can find its own series. */
1243
1330
  declare function measureKey(measure: AggregateMeasure): string;
1331
+ /**
1332
+ * THE QUESTION, AS A STABLE STRING — key-sorted JSON of a `RecordFilter`.
1333
+ *
1334
+ * A React parent that rebuilds `{ status: "Cancelled" }` on every render hands
1335
+ * a NEW object every time, and a hook that depends on the object re-reads the
1336
+ * whole page on every render forever. Depending on this instead means the page
1337
+ * is re-read exactly when the QUESTION changed, which is what a person means.
1338
+ *
1339
+ * Nested window objects are sorted too, so `{from, to}` and `{to, from}` are
1340
+ * one question. `undefined` and an empty filter are both `"{}"` — the caller
1341
+ * asked nothing, and there is only one way to ask nothing.
1342
+ */
1343
+ declare function stableFilterKey(filter: RecordFilter | null | undefined): string;
1244
1344
 
1245
1345
  /** The seven shapes a block can take, exactly as `custom.dashboard_kinds()` answers. */
1246
1346
  type DashboardBlockKind = "number" | "bar" | "column" | "line" | "donut" | "table" | "stuck";
@@ -2070,13 +2170,13 @@ interface SavedViewRow {
2070
2170
  view_id: Uuid;
2071
2171
  name: string;
2072
2172
  table_id: Uuid | null;
2073
- filters: Record<string, unknown>;
2173
+ filters: RecordFilter;
2074
2174
  created_at: string;
2075
2175
  }
2076
2176
  /** What `custom.view_declare` is asked for. `view_id` re-states rather than doubling. */
2077
2177
  interface SavedViewSpecIn {
2078
2178
  name: string;
2079
- filters?: Record<string, unknown> | null;
2179
+ filters?: RecordFilter | null;
2080
2180
  definition?: Record<string, unknown> | null;
2081
2181
  view_id?: Uuid | null;
2082
2182
  }
@@ -3050,4 +3150,4 @@ interface ConversationScopeContext {
3050
3150
  /** `About: Acme Industrial` — the chip a bound chat wears. */
3051
3151
  declare function scopeChip(scope: ConversationScope): string;
3052
3152
 
3053
- export { Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, 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, 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 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, 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 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, type RecordComment, RecordDocument, 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 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, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip };
3153
+ 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, 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 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, 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 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 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, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
package/dist/index.js CHANGED
@@ -54,6 +54,46 @@ var OVERRIDE_POLICIES = [
54
54
  var FRESHNESS = ["live", "cached", "snapshot"];
55
55
  var TABLE_DISPLAYS = ["list", "grid", "board", "calendar", "timeline"];
56
56
 
57
+ // src/archive.ts
58
+ var ARCHIVE_LANES = ["mine", "org"];
59
+ var DEFAULT_ARCHIVE_LANE = "org";
60
+ var ARCHIVE_LANE_LABEL = {
61
+ mine: "Archived by me",
62
+ org: "Archived by anyone"
63
+ };
64
+ var ARCHIVE_LANE_MEANS = {
65
+ mine: "The records you archived yourself.",
66
+ org: "Everything anybody in this organization archived, including you."
67
+ };
68
+ function isArchiveLane(word) {
69
+ return typeof word === "string" && ARCHIVE_LANES.includes(word);
70
+ }
71
+ function archivedWhen(at, locale = "en-GB") {
72
+ const when = new Date(at);
73
+ if (Number.isNaN(when.getTime())) return "a moment nobody recorded";
74
+ return new Intl.DateTimeFormat(locale, {
75
+ day: "numeric",
76
+ month: "long",
77
+ year: "numeric",
78
+ hour: "2-digit",
79
+ minute: "2-digit"
80
+ }).format(when);
81
+ }
82
+ function archivedByLine(row, locale = "en-GB") {
83
+ const when = archivedWhen(row.archivedAt, locale);
84
+ const who = (row.archivedByName ?? "").trim();
85
+ if (who === "") {
86
+ return `Archived on ${when}. The store does not know who archived it \u2014 whoever did is no longer in this organization, or it happened before this table kept that.`;
87
+ }
88
+ return `Archived by ${who} on ${when}.`;
89
+ }
90
+ function emptyArchiveLine(lane) {
91
+ return lane === "mine" ? "You have not archived anything in this table. Switch to \u201CArchived by anyone\u201D to see what the rest of the organization has." : "Nothing in this table has been archived. Records you remove from the grid arrive here, and nothing is ever destroyed.";
92
+ }
93
+ function sameDocument(a, b) {
94
+ return JSON.stringify(a) === JSON.stringify(b);
95
+ }
96
+
57
97
  // src/level.ts
58
98
  var PERMISSION_LEVELS = [
59
99
  "viewer",
@@ -352,6 +392,20 @@ function portalPath(slug) {
352
392
  function measureKey(measure) {
353
393
  return measure.op === "count" ? "count" : `${measure.op}_${measure.key ?? ""}`;
354
394
  }
395
+ function stableFilterKey(filter) {
396
+ if (!filter) return "{}";
397
+ const keys = Object.keys(filter).sort();
398
+ if (keys.length === 0) return "{}";
399
+ const parts = keys.map((key) => {
400
+ const value = filter[key];
401
+ if (value !== null && typeof value === "object") {
402
+ const window2 = value;
403
+ return `${JSON.stringify(key)}:{"from":${JSON.stringify(window2.from ?? null)},"to":${JSON.stringify(window2.to ?? null)}}`;
404
+ }
405
+ return `${JSON.stringify(key)}:${JSON.stringify(value ?? null)}`;
406
+ });
407
+ return `{${parts.join(",")}}`;
408
+ }
355
409
 
356
410
  // src/capture-queue.ts
357
411
  var DB_NAME = "matrx-capture";
@@ -703,6 +757,27 @@ var PARITY_FIELD_TYPES = [
703
757
  { parity_type: "select", behavior: "list", made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)" },
704
758
  { parity_type: "url", behavior: "text", made_of: "text whose format is url, with the pattern Rule that makes the format enforceable" }
705
759
  ];
760
+ var DECLARABLE_FIELD_KINDS = [
761
+ { kind: "attachment", behavior: "relation", parity: true, made_of: "REC-31: a File record reached through a relation, target the kernel `File` Table" },
762
+ { kind: "checkbox", behavior: "boolean", parity: true, made_of: "a ticked or unticked answer, stored as a REAL boolean \u2014 and a record that never answered holds neither, so filters and group-by see three states, not two" },
763
+ { kind: "currency", behavior: "range", parity: true, made_of: "FLD-N-1: a number whose UNIT is the currency and whose format is currency \u2014 on the Field, never in presentation" },
764
+ { kind: "datetime", behavior: "range", parity: true, made_of: "a range of kind date or datetime \u2014 the dated modifier says the VALUES are dated, which is a different question" },
765
+ { kind: "email", behavior: "text", parity: true, made_of: "text whose format is email" },
766
+ { kind: "formula", behavior: "formula", parity: true, made_of: "FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval" },
767
+ { kind: "long_text", behavior: "text", parity: false, made_of: "behaviour text with format long and config.multiline, for several lines rather than one" },
768
+ { kind: "lookup", behavior: "formula", parity: true, made_of: "a Value read THROUGH a relation \u2014 config.via names the relation field, config.pick the Value on the far side" },
769
+ { kind: "member", behavior: "relation", parity: true, made_of: "a person: a relation whose target is the kernel `Person` Table" },
770
+ { kind: "multi_select", behavior: "list", parity: true, made_of: "many choices from the same Table \u2014 the multi modifier, never a second behaviour" },
771
+ { kind: "number", behavior: "range", parity: false, made_of: "a plain number: behaviour range with no date kind and neither the currency nor the percent format" },
772
+ { kind: "percent", behavior: "range", parity: true, made_of: "a number whose unit is % and whose format is percent" },
773
+ { kind: "phone", behavior: "text", parity: true, made_of: "text whose format is phone" },
774
+ { kind: "relation", behavior: "relation", parity: false, made_of: "REL / FLD-11: a relation a person aims themselves \u2014 relation_target names a Table of this organization, and it is a BEHAVIOUR, never a parity type of its own" },
775
+ { kind: "rollup", behavior: "formula", parity: true, made_of: "an aggregate ALONG a relation \u2014 config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice" },
776
+ { kind: "select", behavior: "list", parity: true, made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)" },
777
+ { kind: "signature", behavior: "text", parity: false, made_of: "VAL-10: behaviour text whose format is signature \u2014 the one shape custom.doc_sign accepts, sealed by custom.doc_signature_write and checked by custom.doc_signature_intact" },
778
+ { kind: "text", behavior: "text", parity: false, made_of: "plain text: behaviour text with no format \u2014 it carries no parity type, which is exactly what custom.parity_type answers for it" },
779
+ { kind: "url", behavior: "text", parity: true, made_of: "text whose format is url, with the pattern Rule that makes the format enforceable" }
780
+ ];
706
781
  var RULE_NODE_KINDS = [
707
782
  { node: "actor_at_least", evaluated_by: "PIPELINES" },
708
783
  { node: "add", evaluated_by: "W1-RULE" },
@@ -938,6 +1013,7 @@ var STORE_DOORS = [
938
1013
  { name: "field_dependants", args: "p_organization_id uuid, p_field_id uuid", returns: "TABLE(kind text, dependant_id uuid, label text, how text)", security: "definer" },
939
1014
  { name: "field_history", args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_record_id uuid DEFAULT NULL::uuid", returns: "TABLE(record_id uuid, record_title text, version integer, occurred_at timestamp with time zone, operation_label text, actor jsonb, before jsonb, after jsonb)", security: "definer" },
940
1015
  { name: "field_kernel_id", args: "", returns: "uuid", security: "invoker" },
1016
+ { name: "field_kinds", args: "", returns: "TABLE(kind text, behavior text, parity boolean, made_of text)", security: "invoker" },
941
1017
  { name: "field_options", args: "p_organization_id uuid, p_field_id uuid", returns: "SETOF custom.record", security: "definer" },
942
1018
  { name: "field_retire", args: "p_organization_id uuid, p_field_id uuid", returns: "boolean", security: "definer" },
943
1019
  { name: "field_rules", args: "p_field_data jsonb", returns: "TABLE(kind text, spec jsonb)", security: "invoker" },
@@ -1073,6 +1149,7 @@ var STORE_DOORS = [
1073
1149
  { name: "portal_field_map", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(field_id uuid, field_key text, field_type text, points_at uuid)", security: "definer" },
1074
1150
  { name: "portal_invitation", args: "p_slug text, p_email text", returns: "jsonb", security: "definer" },
1075
1151
  { name: "portal_invite", args: "p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
1152
+ { name: "portal_invite_accept", args: "p_token text", returns: "jsonb", security: "definer" },
1076
1153
  { name: "portal_me", args: "", returns: "jsonb", security: "definer" },
1077
1154
  { name: "portal_preview", args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, title text)", security: "definer" },
1078
1155
  { name: "portal_principal_bind", args: "p_organization_id uuid, p_principal_id uuid, p_user_id uuid", returns: "jsonb", security: "definer" },
@@ -1125,14 +1202,18 @@ var STORE_DOORS = [
1125
1202
  { name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
1126
1203
  { name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
1127
1204
  { name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
1205
+ { name: "read_records_archived", args: "p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)", security: "definer" },
1128
1206
  { name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
1207
+ { name: "read_records_matching", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
1129
1208
  { name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
1130
1209
  { name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "definer" },
1131
1210
  { name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
1211
+ { name: "record_archiver", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "definer" },
1132
1212
  { name: "record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
1133
1213
  { name: "record_card", args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
1134
1214
  { name: "record_carrying_edges", args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(container_id uuid, item_id uuid, edge_role text)", security: "invoker" },
1135
1215
  { name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
1216
+ { name: "record_filter_sql", args: "p_filter jsonb", returns: "text", security: "invoker" },
1136
1217
  { name: "record_history", args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)", security: "definer" },
1137
1218
  { name: "record_platform_keys", args: "", returns: "text[]", security: "invoker" },
1138
1219
  { name: "record_relation_edges", args: "p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
@@ -1221,6 +1302,7 @@ var STORE_DOORS = [
1221
1302
  { name: "subscription_mute", args: "p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true", returns: "boolean", security: "definer" },
1222
1303
  { name: "subscription_preview", args: "p_organization_id uuid, p_rule_id uuid", returns: "jsonb", security: "definer" },
1223
1304
  { name: "subscriptions", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)", security: "definer" },
1305
+ { name: "table_archive", args: "p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 50, p_include_table boolean DEFAULT true", returns: "jsonb", security: "definer" },
1224
1306
  { name: "table_capacity", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
1225
1307
  { name: "table_carries_its_rows", args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
1226
1308
  { name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
@@ -1353,18 +1435,18 @@ var STORE_KNOBS = [
1353
1435
  { key: "world_publish_enabled", value: "false", type: "boolean" }
1354
1436
  ];
1355
1437
  var STORE_REFUSAL_CODES = [
1356
- { code: "02000", raised_by: "_checklist_instantiate,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
1438
+ { code: "02000", raised_by: "_checklist_instantiate,_portal_invite_payload,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
1357
1439
  { code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign" },
1358
1440
  { code: "22003", raised_by: "context_resolve" },
1359
- { code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
1441
+ { code: "22004", raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
1360
1442
  { code: "22007", raised_by: "dashboard_window_sql" },
1361
1443
  { code: "22012", raised_by: "rule_eval" },
1362
- { code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
1363
- { code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
1364
- { code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold" },
1365
- { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
1444
+ { code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
1445
+ { code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
1446
+ { code: "23505", raised_by: "_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold" },
1447
+ { code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
1366
1448
  { code: "40001", raised_by: "has_visibility_at" },
1367
- { code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_by_ids,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
1449
+ { code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
1368
1450
  { code: "42703", raised_by: "entity_table,portal_declare" },
1369
1451
  { code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
1370
1452
  { code: "54001", raised_by: "record_delete" },
@@ -2260,6 +2342,7 @@ var ENTITY_TOKENS = [
2260
2342
  "template_scope_types",
2261
2343
  "templates",
2262
2344
  "test_handset_inbox",
2345
+ "test_handset_verification",
2263
2346
  "thread",
2264
2347
  "tool",
2265
2348
  "tool_binding",
@@ -2405,8 +2488,13 @@ function scopeChip(scope) {
2405
2488
  export {
2406
2489
  ABSENCE_REASONS,
2407
2490
  ACTOR_VOCABULARY,
2491
+ ARCHIVE_LANES,
2492
+ ARCHIVE_LANE_LABEL,
2493
+ ARCHIVE_LANE_MEANS,
2408
2494
  COMPUTE_ON,
2409
2495
  CONTEXT_POLICIES,
2496
+ DECLARABLE_FIELD_KINDS,
2497
+ DEFAULT_ARCHIVE_LANE,
2410
2498
  DELIVERIES,
2411
2499
  ENTITY_TOKENS,
2412
2500
  FIELD_KINDS,
@@ -2441,6 +2529,8 @@ export {
2441
2529
  TABLE_TYPES,
2442
2530
  VALUE_ALTERNATE_KEYS,
2443
2531
  VALUE_ENVELOPE_KEYS,
2532
+ archivedByLine,
2533
+ archivedWhen,
2444
2534
  asPermissionLevel,
2445
2535
  atLeast,
2446
2536
  bookingPath,
@@ -2450,12 +2540,14 @@ export {
2450
2540
  coerceTypedAnswer,
2451
2541
  coerceTypedAnswers,
2452
2542
  coercionLabel,
2543
+ emptyArchiveLine,
2453
2544
  err,
2454
2545
  fieldKindFor,
2455
2546
  forgetAllOps,
2456
2547
  highestLevel,
2457
2548
  holdsARetiredChoice,
2458
2549
  indexedDbStore,
2550
+ isArchiveLane,
2459
2551
  isDecided,
2460
2552
  isOwnOp,
2461
2553
  isRecordsErr,
@@ -2473,6 +2565,8 @@ export {
2473
2565
  portalPath,
2474
2566
  publicFormPath,
2475
2567
  rememberedOpCount,
2476
- scopeChip
2568
+ sameDocument,
2569
+ scopeChip,
2570
+ stableFilterKey
2477
2571
  };
2478
2572
  //# sourceMappingURL=index.js.map