@ai-matrx/records 0.58.17 → 0.58.20
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 +36 -6
- package/dist/core/index.cjs +104 -13
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +44 -3
- package/dist/core/index.d.ts +44 -3
- package/dist/core/index.js +104 -13
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +22 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -12
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +190 -43
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +171 -13
- package/dist/react/index.d.ts +171 -13
- package/dist/react/index.js +190 -43
- package/dist/react/index.js.map +1 -1
- package/dist/{types-BiN4BL2J.d.cts → types-DlKA0k1D.d.cts} +103 -13
- package/dist/{types-BiN4BL2J.d.ts → types-DlKA0k1D.d.ts} +103 -13
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as
|
|
2
|
-
export {
|
|
1
|
+
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordChange, t as RecordChangeResult, u as RecordGraphWritten, v as RecordRead, w as ReadRow, x as RecordPageSort, y as RecordPage, z as Field, S as StoredRecord, A as NewFieldDeclaration, C as FieldPatch, D as RecordRevision, E as ReadValue, G as FieldProposal, H as TableProposal, I as RecordsError, W as WriteConflict, J as FieldTypeWord, K as PgError, L as StaleWriteDetail, M as PredictedRefusal } from '../types-DlKA0k1D.cjs';
|
|
2
|
+
export { O as ABSENCE_REASONS, Q as ACTOR_VOCABULARY, V as AbsenceReason, X as Actor, Y as COMPUTE_ON, Z as CONTEXT_POLICIES, _ as ComputeOn, $ as ContextPolicy, a0 as DECLARABLE_FIELD_KINDS, a1 as DELIVERIES, a2 as DeclarableFieldKind, a3 as Delivery, a4 as ENTITY_TOKENS, a5 as EntityToken, a6 as FIELD_SENSITIVITIES, a7 as FIELD_SOURCES, a8 as FRESHNESS, a9 as FieldBehavior, aa as FieldRule, ab as FieldSensitivity, ac as FieldSource, ad as ForbiddenEnvelopeWord, ae as Freshness, af as HiddenFieldNotice, ag as KERNEL_TABLES, ah as KernelTableName, ai as MERGE_FIELD_MODIFIERS, aj as MERGE_FIELD_SEMANTIC_TYPES, ak as MERGE_FIELD_SOURCES, al as MergeFieldModifier, am as MergeFieldSemanticType, an as MergeFieldSource, ao as ON_DELETE, ap as OVERRIDE_POLICIES, aq as OnDelete, ar as OverridePolicy, as as PARITY_FIELD_TYPES, at as PER_VALUE_ACCESS_WORDS, au as ParityFieldType, av as ParityFieldTypeDescriptor, aw as PerValueAccessWord, ax as ProvenancePointer, ay as RELATION_BINDINGS, az as RELATION_CARDINALITIES, aA as RELATION_FLAVORS, aB as RETIRED_ACTOR_WORDS, aC as RULE_NODE_KINDS, aD as RULE_USES, aE as RelationBinding, aF as RelationCardinality, aG as RelationDisplay, aH as RelationFlavor, aI as RetiredActorWord, aJ as RuleNodeKind, aK as RuleUse, aL as STORAGE_MODES, aM as STORE_DOORS, aN as STORE_KNOBS, aO as STORE_REFUSAL_CODES, aP as StorageMode, aQ as StoreDoorName, aR as StoreRefusalCode, aS as TABLE_DISPLAYS, aT as TABLE_ORIGINS, aU as TABLE_TYPES, aV as TableDisplay, aW as TableOrigin, aX as TableType, aY as VALUE_ALTERNATE_KEYS, aZ as VALUE_ENVELOPE_KEYS, a_ as ValueAlternate, a$ as ValueAlternateKey, b0 as ValueEnvelope, b1 as ValueEnvelopeKey, b2 as ValueSource, b3 as allowsOtherValues, b4 as err, b5 as isRecordsErr, b6 as ok } from '../types-DlKA0k1D.cjs';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxView, WorkInboxItem, InboxStateChange, InboxCounts, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.cjs';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkApprovalState, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.cjs';
|
|
5
5
|
|
|
@@ -128,6 +128,18 @@ interface RecordsClient {
|
|
|
128
128
|
rows: RecordDocument[];
|
|
129
129
|
ids?: Uuid[];
|
|
130
130
|
}): Promise<RecordsResult<Uuid[]>>;
|
|
131
|
+
/**
|
|
132
|
+
* DOOR-SPEED. MANY CHANGES TO ONE TABLE IN ONE TRANSACTION, through
|
|
133
|
+
* `custom.record_change_many`: inserts, updates (each with an optional `expected_version`)
|
|
134
|
+
* and archives. Every update lands in ONE statement, so the store's change notice, history and
|
|
135
|
+
* activity fire once for the batch while every row trigger still judges every row. ONE REFUSED
|
|
136
|
+
* CHANGE REFUSES THE BATCH and nothing is saved; the store's own sentence comes back with the
|
|
137
|
+
* change's position in the hint. The answer is one result per change, in order.
|
|
138
|
+
*/
|
|
139
|
+
recordChangeMany(args: {
|
|
140
|
+
table_id: Uuid;
|
|
141
|
+
changes: readonly RecordChange[];
|
|
142
|
+
}): Promise<RecordsResult<RecordChangeResult[]>>;
|
|
131
143
|
/**
|
|
132
144
|
* A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
|
|
133
145
|
*
|
|
@@ -259,6 +271,24 @@ interface RecordsClient {
|
|
|
259
271
|
rows: ReadRow[];
|
|
260
272
|
total: number | null;
|
|
261
273
|
}>>;
|
|
274
|
+
/**
|
|
275
|
+
* DOOR-SPEED. ONE PAGE THE STORE SORTED, SEARCHED, FILTERED AND COUNTED, through
|
|
276
|
+
* `custom.read_records_page` — the same wall, ladder, field mask and filter as `list`, with the
|
|
277
|
+
* order (`sort`, or a hand-ordered view's positions via `view_id`), a text `search` over the
|
|
278
|
+
* columns this reader may see (and the words of choice options), and the `total` of the
|
|
279
|
+
* matching visible set. It is what a grid pages with: nothing reads the whole table to draw one
|
|
280
|
+
* page. A sort on a column this reader cannot see, or on one worked out on every read, is
|
|
281
|
+
* refused by name.
|
|
282
|
+
*/
|
|
283
|
+
listPage(args: {
|
|
284
|
+
table_id: Uuid;
|
|
285
|
+
filter?: StoreFilter;
|
|
286
|
+
search?: string | null;
|
|
287
|
+
sort?: readonly RecordPageSort[];
|
|
288
|
+
view_id?: Uuid | null;
|
|
289
|
+
limit?: number;
|
|
290
|
+
offset?: number;
|
|
291
|
+
}): Promise<RecordsResult<RecordPage>>;
|
|
262
292
|
/**
|
|
263
293
|
* DOOR-1 FOR AN ID SET. Exactly these records of this Table, through
|
|
264
294
|
* `custom.read_records_by_ids` — the same ladder, the same level, the same
|
|
@@ -303,6 +333,15 @@ interface RecordsClient {
|
|
|
303
333
|
total: number | null;
|
|
304
334
|
}>>;
|
|
305
335
|
tableList(): Promise<RecordsResult<Table[]>>;
|
|
336
|
+
/**
|
|
337
|
+
* ONE Table's declaration by id — `null` when this reader may not see it or it is not a Table.
|
|
338
|
+
* The same kernel record `tableList` lists, read through `read_records_by_ids` for exactly
|
|
339
|
+
* that id, so a screen that opens one table never lists every table to find it (a list capped
|
|
340
|
+
* at 500 answered "no table" past the 500th).
|
|
341
|
+
*/
|
|
342
|
+
tableRead(args: {
|
|
343
|
+
table_id: Uuid;
|
|
344
|
+
}): Promise<RecordsResult<Table | null>>;
|
|
306
345
|
/**
|
|
307
346
|
* IS THIS TABLE IN THE ARCHIVE? (lane HUB-FIX, 2026-09-23.) The archived row for one
|
|
308
347
|
* Table of this organization, or `null` when the archive does not hold it — which
|
|
@@ -1952,11 +1991,13 @@ declare const DOORS: {
|
|
|
1952
1991
|
readonly readRecords: "read_records";
|
|
1953
1992
|
readonly readRecordsByIds: "read_records_by_ids";
|
|
1954
1993
|
readonly readRecordsMatching: "read_records_matching";
|
|
1994
|
+
readonly readRecordsPage: "read_records_page";
|
|
1955
1995
|
readonly readRecordsArchived: "read_records_archived";
|
|
1956
1996
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1957
1997
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1958
1998
|
readonly recordWrite: "record_write";
|
|
1959
1999
|
readonly recordWriteMany: "record_write_many";
|
|
2000
|
+
readonly recordChangeMany: "record_change_many";
|
|
1960
2001
|
readonly recordWriteGraph: "record_write_graph";
|
|
1961
2002
|
readonly recordUpdate: "record_update";
|
|
1962
2003
|
readonly recordDelete: "record_delete";
|
|
@@ -2464,4 +2505,4 @@ type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
|
2464
2505
|
*/
|
|
2465
2506
|
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2466
2507
|
|
|
2467
|
-
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, type TableLiveLocation, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
|
2508
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordChange, RecordChangeResult, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, RecordPage, RecordPageSort, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, type TableLiveLocation, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as
|
|
2
|
-
export {
|
|
1
|
+
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordChange, t as RecordChangeResult, u as RecordGraphWritten, v as RecordRead, w as ReadRow, x as RecordPageSort, y as RecordPage, z as Field, S as StoredRecord, A as NewFieldDeclaration, C as FieldPatch, D as RecordRevision, E as ReadValue, G as FieldProposal, H as TableProposal, I as RecordsError, W as WriteConflict, J as FieldTypeWord, K as PgError, L as StaleWriteDetail, M as PredictedRefusal } from '../types-DlKA0k1D.js';
|
|
2
|
+
export { O as ABSENCE_REASONS, Q as ACTOR_VOCABULARY, V as AbsenceReason, X as Actor, Y as COMPUTE_ON, Z as CONTEXT_POLICIES, _ as ComputeOn, $ as ContextPolicy, a0 as DECLARABLE_FIELD_KINDS, a1 as DELIVERIES, a2 as DeclarableFieldKind, a3 as Delivery, a4 as ENTITY_TOKENS, a5 as EntityToken, a6 as FIELD_SENSITIVITIES, a7 as FIELD_SOURCES, a8 as FRESHNESS, a9 as FieldBehavior, aa as FieldRule, ab as FieldSensitivity, ac as FieldSource, ad as ForbiddenEnvelopeWord, ae as Freshness, af as HiddenFieldNotice, ag as KERNEL_TABLES, ah as KernelTableName, ai as MERGE_FIELD_MODIFIERS, aj as MERGE_FIELD_SEMANTIC_TYPES, ak as MERGE_FIELD_SOURCES, al as MergeFieldModifier, am as MergeFieldSemanticType, an as MergeFieldSource, ao as ON_DELETE, ap as OVERRIDE_POLICIES, aq as OnDelete, ar as OverridePolicy, as as PARITY_FIELD_TYPES, at as PER_VALUE_ACCESS_WORDS, au as ParityFieldType, av as ParityFieldTypeDescriptor, aw as PerValueAccessWord, ax as ProvenancePointer, ay as RELATION_BINDINGS, az as RELATION_CARDINALITIES, aA as RELATION_FLAVORS, aB as RETIRED_ACTOR_WORDS, aC as RULE_NODE_KINDS, aD as RULE_USES, aE as RelationBinding, aF as RelationCardinality, aG as RelationDisplay, aH as RelationFlavor, aI as RetiredActorWord, aJ as RuleNodeKind, aK as RuleUse, aL as STORAGE_MODES, aM as STORE_DOORS, aN as STORE_KNOBS, aO as STORE_REFUSAL_CODES, aP as StorageMode, aQ as StoreDoorName, aR as StoreRefusalCode, aS as TABLE_DISPLAYS, aT as TABLE_ORIGINS, aU as TABLE_TYPES, aV as TableDisplay, aW as TableOrigin, aX as TableType, aY as VALUE_ALTERNATE_KEYS, aZ as VALUE_ENVELOPE_KEYS, a_ as ValueAlternate, a$ as ValueAlternateKey, b0 as ValueEnvelope, b1 as ValueEnvelopeKey, b2 as ValueSource, b3 as allowsOtherValues, b4 as err, b5 as isRecordsErr, b6 as ok } from '../types-DlKA0k1D.js';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxView, WorkInboxItem, InboxStateChange, InboxCounts, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.js';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkApprovalState, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.js';
|
|
5
5
|
|
|
@@ -128,6 +128,18 @@ interface RecordsClient {
|
|
|
128
128
|
rows: RecordDocument[];
|
|
129
129
|
ids?: Uuid[];
|
|
130
130
|
}): Promise<RecordsResult<Uuid[]>>;
|
|
131
|
+
/**
|
|
132
|
+
* DOOR-SPEED. MANY CHANGES TO ONE TABLE IN ONE TRANSACTION, through
|
|
133
|
+
* `custom.record_change_many`: inserts, updates (each with an optional `expected_version`)
|
|
134
|
+
* and archives. Every update lands in ONE statement, so the store's change notice, history and
|
|
135
|
+
* activity fire once for the batch while every row trigger still judges every row. ONE REFUSED
|
|
136
|
+
* CHANGE REFUSES THE BATCH and nothing is saved; the store's own sentence comes back with the
|
|
137
|
+
* change's position in the hint. The answer is one result per change, in order.
|
|
138
|
+
*/
|
|
139
|
+
recordChangeMany(args: {
|
|
140
|
+
table_id: Uuid;
|
|
141
|
+
changes: readonly RecordChange[];
|
|
142
|
+
}): Promise<RecordsResult<RecordChangeResult[]>>;
|
|
131
143
|
/**
|
|
132
144
|
* A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
|
|
133
145
|
*
|
|
@@ -259,6 +271,24 @@ interface RecordsClient {
|
|
|
259
271
|
rows: ReadRow[];
|
|
260
272
|
total: number | null;
|
|
261
273
|
}>>;
|
|
274
|
+
/**
|
|
275
|
+
* DOOR-SPEED. ONE PAGE THE STORE SORTED, SEARCHED, FILTERED AND COUNTED, through
|
|
276
|
+
* `custom.read_records_page` — the same wall, ladder, field mask and filter as `list`, with the
|
|
277
|
+
* order (`sort`, or a hand-ordered view's positions via `view_id`), a text `search` over the
|
|
278
|
+
* columns this reader may see (and the words of choice options), and the `total` of the
|
|
279
|
+
* matching visible set. It is what a grid pages with: nothing reads the whole table to draw one
|
|
280
|
+
* page. A sort on a column this reader cannot see, or on one worked out on every read, is
|
|
281
|
+
* refused by name.
|
|
282
|
+
*/
|
|
283
|
+
listPage(args: {
|
|
284
|
+
table_id: Uuid;
|
|
285
|
+
filter?: StoreFilter;
|
|
286
|
+
search?: string | null;
|
|
287
|
+
sort?: readonly RecordPageSort[];
|
|
288
|
+
view_id?: Uuid | null;
|
|
289
|
+
limit?: number;
|
|
290
|
+
offset?: number;
|
|
291
|
+
}): Promise<RecordsResult<RecordPage>>;
|
|
262
292
|
/**
|
|
263
293
|
* DOOR-1 FOR AN ID SET. Exactly these records of this Table, through
|
|
264
294
|
* `custom.read_records_by_ids` — the same ladder, the same level, the same
|
|
@@ -303,6 +333,15 @@ interface RecordsClient {
|
|
|
303
333
|
total: number | null;
|
|
304
334
|
}>>;
|
|
305
335
|
tableList(): Promise<RecordsResult<Table[]>>;
|
|
336
|
+
/**
|
|
337
|
+
* ONE Table's declaration by id — `null` when this reader may not see it or it is not a Table.
|
|
338
|
+
* The same kernel record `tableList` lists, read through `read_records_by_ids` for exactly
|
|
339
|
+
* that id, so a screen that opens one table never lists every table to find it (a list capped
|
|
340
|
+
* at 500 answered "no table" past the 500th).
|
|
341
|
+
*/
|
|
342
|
+
tableRead(args: {
|
|
343
|
+
table_id: Uuid;
|
|
344
|
+
}): Promise<RecordsResult<Table | null>>;
|
|
306
345
|
/**
|
|
307
346
|
* IS THIS TABLE IN THE ARCHIVE? (lane HUB-FIX, 2026-09-23.) The archived row for one
|
|
308
347
|
* Table of this organization, or `null` when the archive does not hold it — which
|
|
@@ -1952,11 +1991,13 @@ declare const DOORS: {
|
|
|
1952
1991
|
readonly readRecords: "read_records";
|
|
1953
1992
|
readonly readRecordsByIds: "read_records_by_ids";
|
|
1954
1993
|
readonly readRecordsMatching: "read_records_matching";
|
|
1994
|
+
readonly readRecordsPage: "read_records_page";
|
|
1955
1995
|
readonly readRecordsArchived: "read_records_archived";
|
|
1956
1996
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1957
1997
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1958
1998
|
readonly recordWrite: "record_write";
|
|
1959
1999
|
readonly recordWriteMany: "record_write_many";
|
|
2000
|
+
readonly recordChangeMany: "record_change_many";
|
|
1960
2001
|
readonly recordWriteGraph: "record_write_graph";
|
|
1961
2002
|
readonly recordUpdate: "record_update";
|
|
1962
2003
|
readonly recordDelete: "record_delete";
|
|
@@ -2464,4 +2505,4 @@ type ReadFileText = (fileId: Uuid) => Promise<string>;
|
|
|
2464
2505
|
*/
|
|
2465
2506
|
declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise<ExportRow[]>;
|
|
2466
2507
|
|
|
2467
|
-
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, type TableLiveLocation, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
|
2508
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, InboxCounts, InboxStateChange, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, type ReadFileText, ReadRow, ReadValue, RecordChange, RecordChangeResult, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, RecordPage, RecordPageSort, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, type TableLiveLocation, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WHOLE_VALUE_SOURCE_KIND, type WholeValuePointer, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInboxView, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withTableFacts, withWholeValues };
|
package/dist/core/index.js
CHANGED
|
@@ -4026,6 +4026,7 @@ var STORE_DOORS = [
|
|
|
4026
4026
|
{ 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" },
|
|
4027
4027
|
{ name: "read_records_in_view_order", args: "p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
|
|
4028
4028
|
{ 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" },
|
|
4029
|
+
{ name: "read_records_page", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_view_id uuid DEFAULT NULL::uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0", returns: "jsonb", security: "definer" },
|
|
4029
4030
|
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
4030
4031
|
{ 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, p_compare jsonb DEFAULT NULL::jsonb", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)", security: "definer" },
|
|
4031
4032
|
{ 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" },
|
|
@@ -4034,6 +4035,7 @@ var STORE_DOORS = [
|
|
|
4034
4035
|
{ name: "record_card", args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
4035
4036
|
{ 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" },
|
|
4036
4037
|
{ name: "record_change_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
4038
|
+
{ name: "record_change_many", args: "p_organization_id uuid, p_table_id uuid, p_changes jsonb", returns: "jsonb", security: "definer" },
|
|
4037
4039
|
{ name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
|
|
4038
4040
|
{ name: "record_entity_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_type text, target_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
|
|
4039
4041
|
{ name: "record_filter_sql", args: "p_filter jsonb", returns: "text", security: "invoker" },
|
|
@@ -4153,6 +4155,7 @@ var STORE_DOORS = [
|
|
|
4153
4155
|
{ 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" },
|
|
4154
4156
|
{ name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
4155
4157
|
{ name: "table_contents", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, kind text, goes_at integer)", security: "invoker" },
|
|
4158
|
+
{ name: "table_copy_evaluation_state", args: "p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
4156
4159
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
4157
4160
|
{ name: "table_decorate", args: "p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "definer" },
|
|
4158
4161
|
{ name: "table_decorations", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
@@ -4225,7 +4228,13 @@ var STORE_DOORS = [
|
|
|
4225
4228
|
{ name: "visible_set", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text", returns: "record", security: "definer" },
|
|
4226
4229
|
{ name: "where_id_opens", args: "p_id uuid", returns: "jsonb", security: "definer" },
|
|
4227
4230
|
{ name: "where_tables_live", args: "p_table_ids uuid[]", returns: "TABLE(table_id uuid, lives_in text, why text)", security: "definer" },
|
|
4231
|
+
{ name: "whole_value_ceiling", args: "p_organization_id uuid", returns: "bigint", security: "invoker" },
|
|
4232
|
+
{ name: "whole_value_complete", args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_file_id uuid", returns: "jsonb", security: "definer" },
|
|
4233
|
+
{ name: "whole_value_head", args: "p_text text", returns: "text", security: "invoker" },
|
|
4234
|
+
{ name: "whole_value_park", args: "p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_owner_id uuid, p_visibility platform.visibility, p_data jsonb, p_park jsonb", returns: "void", security: "invoker" },
|
|
4228
4235
|
{ name: "whole_value_pointer_of", args: "p_values jsonb, p_sources jsonb, p_key text", returns: "jsonb", security: "invoker" },
|
|
4236
|
+
{ name: "whole_value_source", args: "p_text text, p_writer_src jsonb", returns: "jsonb", security: "invoker" },
|
|
4237
|
+
{ name: "whole_values_waiting", args: "p_organization_id uuid, p_record_ids uuid[]", returns: "TABLE(record_id uuid, field_key text, pointer text, value_version integer, sha256 text, bytes bigint, chars bigint, owner_id uuid, record_visibility text, table_id uuid, table_name text)", security: "definer" },
|
|
4229
4238
|
{ name: "widget_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
4230
4239
|
{ name: "with_whole_value_pointers", args: "p_document jsonb, p_values jsonb, p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
|
|
4231
4240
|
{ name: "withheld_marker", args: "p_mask jsonb, p_key text", returns: "jsonb", security: "invoker" },
|
|
@@ -4339,27 +4348,27 @@ var STORE_KNOBS = [
|
|
|
4339
4348
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
4340
4349
|
];
|
|
4341
4350
|
var STORE_REFUSAL_CODES = [
|
|
4342
|
-
{ code: "02000", raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,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_grant,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" },
|
|
4343
|
-
{ 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,rule_filter_node_sql,work_assign" },
|
|
4351
|
+
{ code: "02000", raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_change_many,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,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_grant,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" },
|
|
4352
|
+
{ 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,read_records_page,rule_eval,rule_filter_node_sql,work_assign" },
|
|
4344
4353
|
{ code: "22003", raised_by: "context_resolve" },
|
|
4345
|
-
{ code: "22004", raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,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_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,work_approval_decide,work_approval_request,work_template_declare" },
|
|
4354
|
+
{ code: "22004", raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,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_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,whole_value_complete,work_approval_decide,work_approval_request,work_template_declare" },
|
|
4346
4355
|
{ code: "22007", raised_by: "agg_parse_moment,dashboard_window_sql" },
|
|
4347
4356
|
{ code: "22012", raised_by: "formula_eval,rule_eval,rule_sql_op" },
|
|
4348
|
-
{ code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
|
|
4349
|
-
{ code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,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_draft_save,form_submit,grid_layout,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,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
4357
|
+
{ code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,read_records_page,record_change_many,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
|
|
4358
|
+
{ code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,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_draft_save,form_submit,grid_layout,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,read_records_in_view_order,read_records_page,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,whole_value_complete,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
4350
4359
|
{ code: "23505", raised_by: "_portal_config_judge,_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" },
|
|
4351
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_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,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_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,action_run,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,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4352
|
-
{ code: "40001", raised_by: "has_visibility_at,table_move" },
|
|
4353
|
-
{ code: "42501", raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,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_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,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,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
4360
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_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,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_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,action_run,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,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,whole_value_complete,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4361
|
+
{ code: "40001", raised_by: "has_visibility_at,table_move,whole_value_complete" },
|
|
4362
|
+
{ code: "42501", raised_by: "_context_copy_fence,_copy_evaluation_note,_copy_evaluation_reimage,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,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_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,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,read_records_page,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_copy_evaluation_state,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,whole_value_complete,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
4354
4363
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
4355
4364
|
{ code: "42P17", raised_by: "_field_reads_what_it_reads,far_value" },
|
|
4356
4365
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
4357
|
-
{ code: "54000", raised_by: "action_run,form_draft_save,hub_changed_by,pipeline_move_many,record_headers,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many" },
|
|
4366
|
+
{ code: "54000", raised_by: "action_run,form_draft_save,hub_changed_by,pipeline_move_many,record_change_many,record_headers,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many" },
|
|
4358
4367
|
{ code: "54001", raised_by: "record_delete" },
|
|
4359
4368
|
{ code: "55000", raised_by: "inbox_clear,inbox_snooze,table_move,work_approval_decide,work_approval_request" },
|
|
4360
4369
|
{ code: "P0001", raised_by: "action_run" },
|
|
4361
|
-
{ code: "P0002", raised_by: "inbox_clear,inbox_snooze" },
|
|
4362
|
-
{ code: "PT409", raised_by: "record_update" },
|
|
4370
|
+
{ code: "P0002", raised_by: "inbox_clear,inbox_snooze,whole_value_complete" },
|
|
4371
|
+
{ code: "PT409", raised_by: "record_change_many,record_update" },
|
|
4363
4372
|
{ code: "PT428", raised_by: "_record_rule_uses" }
|
|
4364
4373
|
];
|
|
4365
4374
|
var ENTITY_TOKENS = [
|
|
@@ -5013,6 +5022,8 @@ var ENTITY_TOKENS = [
|
|
|
5013
5022
|
"party_contact_point",
|
|
5014
5023
|
"passkey_credential",
|
|
5015
5024
|
"path_drift_repair_2026_09",
|
|
5025
|
+
"pb_claim_appeals_fd31de",
|
|
5026
|
+
"pb_insurance_claims_fd31de",
|
|
5016
5027
|
"pc_article",
|
|
5017
5028
|
"pc_episode",
|
|
5018
5029
|
"pc_show",
|
|
@@ -5314,7 +5325,6 @@ var ENTITY_TOKENS = [
|
|
|
5314
5325
|
"visibility_epoch",
|
|
5315
5326
|
"voice",
|
|
5316
5327
|
"war_room",
|
|
5317
|
-
"wbx_capture",
|
|
5318
5328
|
"wbx_demo",
|
|
5319
5329
|
"wbx_guidance",
|
|
5320
5330
|
"wbx_highlight",
|
|
@@ -5510,6 +5520,13 @@ var DOORS = {
|
|
|
5510
5520
|
// `custom.record_filter_sql`, the one body `custom.agg_sql` also calls, so the
|
|
5511
5521
|
// rows it opens are the rows the number counted.
|
|
5512
5522
|
readRecordsMatching: "read_records_matching",
|
|
5523
|
+
// THE SAME READ DOOR, ASKED FOR ONE PAGE THE STORE SORTED, SEARCHED AND COUNTED (DOOR-SPEED,
|
|
5524
|
+
// 2026-09-25). `custom.read_records_page` takes the same filter, adds a sort (by the words a
|
|
5525
|
+
// person sees on a choice column), a search over the columns this reader may see, a hand-ordered
|
|
5526
|
+
// view's order, and answers the TOTAL of the matching visible set — the record-store twin of the
|
|
5527
|
+
// older store's `get_user_table_data_paginated_v2`, so a grid never reads a whole table to draw
|
|
5528
|
+
// one page. Its documents are built by `read_records_by_ids`. A separate NAME for the reason above.
|
|
5529
|
+
readRecordsPage: "read_records_page",
|
|
5513
5530
|
// THE SAME READ DOOR, ADDRESSED BY ABSENCE. Every door above answers LIVE rows
|
|
5514
5531
|
// only — each of them hard-codes `and r.deleted_at is null` — so until this one
|
|
5515
5532
|
// existed no screen could list an archived record however it was written, and
|
|
@@ -5525,6 +5542,11 @@ var DOORS = {
|
|
|
5525
5542
|
queryTableAsOf: "query_table_as_of",
|
|
5526
5543
|
recordWrite: "record_write",
|
|
5527
5544
|
recordWriteMany: "record_write_many",
|
|
5545
|
+
// MANY CHANGES TO ONE TABLE, ONE TRANSACTION (DOOR-SPEED, 2026-09-25). `custom.record_change_many`
|
|
5546
|
+
// takes inserts, updates and archives: inserts through `record_write_many`, every update in ONE
|
|
5547
|
+
// UPDATE statement (each record asked its editor rung, CAS honoured), archives through
|
|
5548
|
+
// `record_delete`. One refused change refuses the batch and nothing is saved; the hint names it.
|
|
5549
|
+
recordChangeMany: "record_change_many",
|
|
5528
5550
|
// A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
|
|
5529
5551
|
// `recordWrite` and `recordWriteMany` are each ONE statement, so a caller that needs a
|
|
5530
5552
|
// parent, its provenance edge and its child rows to land together had no door at all: a
|
|
@@ -6131,6 +6153,14 @@ function createRecordsClient(config) {
|
|
|
6131
6153
|
}
|
|
6132
6154
|
return ok(response.data);
|
|
6133
6155
|
}
|
|
6156
|
+
let kernelAsked = null;
|
|
6157
|
+
function tableKernel(where) {
|
|
6158
|
+
kernelAsked ??= callDoor(DOORS.tableKernelId, {}, where).then((answer) => {
|
|
6159
|
+
if (!answer.ok) kernelAsked = null;
|
|
6160
|
+
return answer;
|
|
6161
|
+
});
|
|
6162
|
+
return kernelAsked;
|
|
6163
|
+
}
|
|
6134
6164
|
function unfold(document) {
|
|
6135
6165
|
const raw = document ?? {};
|
|
6136
6166
|
const hidden = raw._hidden ?? {};
|
|
@@ -6170,6 +6200,25 @@ function createRecordsClient(config) {
|
|
|
6170
6200
|
"recordWriteMany"
|
|
6171
6201
|
);
|
|
6172
6202
|
},
|
|
6203
|
+
async recordChangeMany({ table_id, changes }) {
|
|
6204
|
+
const opId = mintOpId();
|
|
6205
|
+
return callDoor(
|
|
6206
|
+
DOORS.recordChangeMany,
|
|
6207
|
+
{
|
|
6208
|
+
p_organization_id: org,
|
|
6209
|
+
p_table_id: table_id,
|
|
6210
|
+
p_changes: changes.map(
|
|
6211
|
+
(change) => change.op === "insert" ? { op: "insert", data: { ...change.data, _op_id: opId } } : change.op === "update" ? {
|
|
6212
|
+
op: "update",
|
|
6213
|
+
record_id: change.record_id,
|
|
6214
|
+
patch: { ...change.patch, _op_id: opId },
|
|
6215
|
+
...change.expected_version === void 0 || change.expected_version === null ? {} : { expected_version: change.expected_version }
|
|
6216
|
+
} : { op: "archive", record_id: change.record_id }
|
|
6217
|
+
)
|
|
6218
|
+
},
|
|
6219
|
+
"recordChangeMany"
|
|
6220
|
+
);
|
|
6221
|
+
},
|
|
6173
6222
|
async recordWriteGraph({ table_id, parent, children, edges }) {
|
|
6174
6223
|
const opId = mintOpId();
|
|
6175
6224
|
return callDoor(
|
|
@@ -6398,6 +6447,34 @@ function createRecordsClient(config) {
|
|
|
6398
6447
|
const total = rows.length < limit ? offset + rows.length : null;
|
|
6399
6448
|
return ok({ rows, total });
|
|
6400
6449
|
},
|
|
6450
|
+
async listPage({ table_id, filter, search, sort, view_id, limit = 50, offset = 0 }) {
|
|
6451
|
+
const door = await callDoor(
|
|
6452
|
+
DOORS.readRecordsPage,
|
|
6453
|
+
{
|
|
6454
|
+
p_organization_id: org,
|
|
6455
|
+
p_table_id: table_id,
|
|
6456
|
+
p_filter: filter ?? {},
|
|
6457
|
+
p_search: search ?? null,
|
|
6458
|
+
p_sort: sort ?? [],
|
|
6459
|
+
p_view_id: view_id ?? null,
|
|
6460
|
+
p_limit: limit,
|
|
6461
|
+
p_offset: offset
|
|
6462
|
+
},
|
|
6463
|
+
"listPage"
|
|
6464
|
+
);
|
|
6465
|
+
if (!door.ok) return err(door.error);
|
|
6466
|
+
const answer = door.data;
|
|
6467
|
+
const rows = (answer?.rows ?? []).map((row) => {
|
|
6468
|
+
const { document, hidden } = unfold(row.document);
|
|
6469
|
+
return { id: row.id, document, level: row.level, hidden };
|
|
6470
|
+
});
|
|
6471
|
+
return ok({
|
|
6472
|
+
rows,
|
|
6473
|
+
total: Number(answer?.total ?? 0),
|
|
6474
|
+
limit: Number(answer?.limit ?? limit),
|
|
6475
|
+
offset: Number(answer?.offset ?? offset)
|
|
6476
|
+
});
|
|
6477
|
+
},
|
|
6401
6478
|
async query(input) {
|
|
6402
6479
|
const plan = planQuery(input);
|
|
6403
6480
|
const sets = [];
|
|
@@ -6502,8 +6579,22 @@ function createRecordsClient(config) {
|
|
|
6502
6579
|
offset: plan.read.offset
|
|
6503
6580
|
});
|
|
6504
6581
|
},
|
|
6582
|
+
async tableRead({ table_id }) {
|
|
6583
|
+
const kernel = await tableKernel("tableRead.kernel");
|
|
6584
|
+
if (!kernel.ok) return err(kernel.error);
|
|
6585
|
+
const door = await callDoor(
|
|
6586
|
+
DOORS.readRecordsByIds,
|
|
6587
|
+
{ p_organization_id: org, p_table_id: kernel.data, p_record_ids: [table_id] },
|
|
6588
|
+
"tableRead"
|
|
6589
|
+
);
|
|
6590
|
+
if (!door.ok) return err(door.error);
|
|
6591
|
+
const row = (door.data ?? []).find((r) => r.id === table_id);
|
|
6592
|
+
if (!row) return ok(null);
|
|
6593
|
+
const { document } = unfold(row.document);
|
|
6594
|
+
return ok({ ...document, id: row.id, organization_id: org });
|
|
6595
|
+
},
|
|
6505
6596
|
async tableList() {
|
|
6506
|
-
const kernel = await
|
|
6597
|
+
const kernel = await tableKernel("tableList.kernel");
|
|
6507
6598
|
if (!kernel.ok) return err(kernel.error);
|
|
6508
6599
|
const door = await callDoor(
|
|
6509
6600
|
DOORS.readRecords,
|