@ai-matrx/records 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/dist/core/index.cjs +26 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +45 -5
- package/dist/core/index.d.ts +45 -5
- package/dist/core/index.js +26 -0
- package/dist/core/index.js.map +1 -1
- package/dist/{field-xRstzLKK.d.cts → field-Ct7_iYEF.d.cts} +24 -0
- package/dist/{field-xRstzLKK.d.ts → field-Ct7_iYEF.d.ts} +24 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +106 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +172 -2
- package/dist/react/index.d.ts +172 -2
- package/dist/react/index.js +106 -0
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.cjs';
|
|
1
|
+
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-Ct7_iYEF.cjs';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-Ct7_iYEF.cjs';
|
|
3
|
+
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.cjs';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -117,13 +117,52 @@ interface RecordsClient {
|
|
|
117
117
|
/** Leave it out and the last writer wins; supply it and a loser is TOLD. */
|
|
118
118
|
expectedVersion?: number;
|
|
119
119
|
}): Promise<RecordsResult<number>>;
|
|
120
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* REC-23. Soft, and reversible within `retention`.
|
|
122
|
+
*
|
|
123
|
+
* 🚨 NOT FOR A TABLE. A Table is a record, so this door accepts one — and
|
|
124
|
+
* then recurses through every record the Table contains inside a single
|
|
125
|
+
* transaction, which is unbounded by construction and dies on `57014` at a
|
|
126
|
+
* size the product's own import reaches in half a minute. Use
|
|
127
|
+
* `tableArchive` below, which does the same work in resumable passes.
|
|
128
|
+
*/
|
|
121
129
|
recordDelete(args: {
|
|
122
130
|
record_id: Uuid;
|
|
123
131
|
}): Promise<RecordsResult<Timestamp>>;
|
|
124
132
|
recordRestore(args: {
|
|
125
133
|
record_id: Uuid;
|
|
126
134
|
}): Promise<RecordsResult<void>>;
|
|
135
|
+
/**
|
|
136
|
+
* ARCHIVING A WHOLE TABLE — ONE PASS OF IT (VERIFIER-11 F3).
|
|
137
|
+
*
|
|
138
|
+
* One call archives at most `chunk` of the table's live records through
|
|
139
|
+
* `custom.record_delete` (so every guard, history capture and outbox row
|
|
140
|
+
* still happens; nothing is hard-deleted) and comes back with the numbers a
|
|
141
|
+
* screen draws progress from. The CALLER LOOPS until `done` — that loop is
|
|
142
|
+
* the fix, because the one thing a single statement cannot be made to do is
|
|
143
|
+
* finish.
|
|
144
|
+
*
|
|
145
|
+
* `chunk: 0` changes nothing and only reports, so a screen can say "1,430
|
|
146
|
+
* records will be archived" BEFORE a person commits to it. `includeTable:
|
|
147
|
+
* false` empties the table and leaves it standing.
|
|
148
|
+
*
|
|
149
|
+
* RESUMABLE, WITHOUT A JOB ROW: what remains is read off the records
|
|
150
|
+
* themselves every call. A pass that fails, a closed tab or a deploy mid-run
|
|
151
|
+
* leaves a half-archived table and a next call that continues from exactly
|
|
152
|
+
* there. A caller must therefore never report "nothing happened" after a
|
|
153
|
+
* failed pass — `archived_total` says what really landed.
|
|
154
|
+
*/
|
|
155
|
+
tableArchive(args: {
|
|
156
|
+
table_id: Uuid;
|
|
157
|
+
/**
|
|
158
|
+
* How many records this pass takes on. The door clamps it; it answers with what it
|
|
159
|
+
* took. Default 50 — measured: ~35ms a record against an 8s statement timeout, so
|
|
160
|
+
* 200 dies on `57014` and is the original defect one level up.
|
|
161
|
+
*/
|
|
162
|
+
chunk?: number;
|
|
163
|
+
/** Archive the Table record itself once nothing live is left in it. Default true. */
|
|
164
|
+
includeTable?: boolean;
|
|
165
|
+
}): Promise<RecordsResult<TableArchiveProgress>>;
|
|
127
166
|
recordRead(args: {
|
|
128
167
|
record_id: Uuid;
|
|
129
168
|
withComputed?: boolean;
|
|
@@ -1466,6 +1505,7 @@ declare const DOORS: {
|
|
|
1466
1505
|
readonly fieldOptions: "field_options";
|
|
1467
1506
|
readonly parityValues: "parity_values";
|
|
1468
1507
|
readonly tableDeclare: "table_declare";
|
|
1508
|
+
readonly tableArchive: "table_archive";
|
|
1469
1509
|
readonly fieldDeclare: "field_declare";
|
|
1470
1510
|
readonly fieldUpdate: "field_update";
|
|
1471
1511
|
readonly fieldRetire: "field_retire";
|
|
@@ -1770,4 +1810,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
1770
1810
|
declare function importCsv(text: string): ParsedImport;
|
|
1771
1811
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1772
1812
|
|
|
1773
|
-
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
|
1813
|
+
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.js';
|
|
1
|
+
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-Ct7_iYEF.js';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, G as Delivery, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, V as Freshness, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, a1 as MergeFieldModifier, a2 as MergeFieldSemanticType, a3 as MergeFieldSource, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, O as OnDelete, a6 as OverridePolicy, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, a9 as ParityFieldType, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, aj as RecordsErrorCode, ak as RelationBinding, f as RelationCardinality, al as RelationDisplay, R as RelationFlavor, am as RetiredActorWord, an as RuleNodeKind, ao as RuleUse, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, S as StorageMode, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, a as TableDisplay, ay as TableOrigin, T as TableType, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, aG as err, aH as isRecordsErr, aI as ok } from '../field-Ct7_iYEF.js';
|
|
3
|
+
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, RecordFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.js';
|
|
4
4
|
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -117,13 +117,52 @@ interface RecordsClient {
|
|
|
117
117
|
/** Leave it out and the last writer wins; supply it and a loser is TOLD. */
|
|
118
118
|
expectedVersion?: number;
|
|
119
119
|
}): Promise<RecordsResult<number>>;
|
|
120
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* REC-23. Soft, and reversible within `retention`.
|
|
122
|
+
*
|
|
123
|
+
* 🚨 NOT FOR A TABLE. A Table is a record, so this door accepts one — and
|
|
124
|
+
* then recurses through every record the Table contains inside a single
|
|
125
|
+
* transaction, which is unbounded by construction and dies on `57014` at a
|
|
126
|
+
* size the product's own import reaches in half a minute. Use
|
|
127
|
+
* `tableArchive` below, which does the same work in resumable passes.
|
|
128
|
+
*/
|
|
121
129
|
recordDelete(args: {
|
|
122
130
|
record_id: Uuid;
|
|
123
131
|
}): Promise<RecordsResult<Timestamp>>;
|
|
124
132
|
recordRestore(args: {
|
|
125
133
|
record_id: Uuid;
|
|
126
134
|
}): Promise<RecordsResult<void>>;
|
|
135
|
+
/**
|
|
136
|
+
* ARCHIVING A WHOLE TABLE — ONE PASS OF IT (VERIFIER-11 F3).
|
|
137
|
+
*
|
|
138
|
+
* One call archives at most `chunk` of the table's live records through
|
|
139
|
+
* `custom.record_delete` (so every guard, history capture and outbox row
|
|
140
|
+
* still happens; nothing is hard-deleted) and comes back with the numbers a
|
|
141
|
+
* screen draws progress from. The CALLER LOOPS until `done` — that loop is
|
|
142
|
+
* the fix, because the one thing a single statement cannot be made to do is
|
|
143
|
+
* finish.
|
|
144
|
+
*
|
|
145
|
+
* `chunk: 0` changes nothing and only reports, so a screen can say "1,430
|
|
146
|
+
* records will be archived" BEFORE a person commits to it. `includeTable:
|
|
147
|
+
* false` empties the table and leaves it standing.
|
|
148
|
+
*
|
|
149
|
+
* RESUMABLE, WITHOUT A JOB ROW: what remains is read off the records
|
|
150
|
+
* themselves every call. A pass that fails, a closed tab or a deploy mid-run
|
|
151
|
+
* leaves a half-archived table and a next call that continues from exactly
|
|
152
|
+
* there. A caller must therefore never report "nothing happened" after a
|
|
153
|
+
* failed pass — `archived_total` says what really landed.
|
|
154
|
+
*/
|
|
155
|
+
tableArchive(args: {
|
|
156
|
+
table_id: Uuid;
|
|
157
|
+
/**
|
|
158
|
+
* How many records this pass takes on. The door clamps it; it answers with what it
|
|
159
|
+
* took. Default 50 — measured: ~35ms a record against an 8s statement timeout, so
|
|
160
|
+
* 200 dies on `57014` and is the original defect one level up.
|
|
161
|
+
*/
|
|
162
|
+
chunk?: number;
|
|
163
|
+
/** Archive the Table record itself once nothing live is left in it. Default true. */
|
|
164
|
+
includeTable?: boolean;
|
|
165
|
+
}): Promise<RecordsResult<TableArchiveProgress>>;
|
|
127
166
|
recordRead(args: {
|
|
128
167
|
record_id: Uuid;
|
|
129
168
|
withComputed?: boolean;
|
|
@@ -1466,6 +1505,7 @@ declare const DOORS: {
|
|
|
1466
1505
|
readonly fieldOptions: "field_options";
|
|
1467
1506
|
readonly parityValues: "parity_values";
|
|
1468
1507
|
readonly tableDeclare: "table_declare";
|
|
1508
|
+
readonly tableArchive: "table_archive";
|
|
1469
1509
|
readonly fieldDeclare: "field_declare";
|
|
1470
1510
|
readonly fieldUpdate: "field_update";
|
|
1471
1511
|
readonly fieldRetire: "field_retire";
|
|
@@ -1770,4 +1810,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
1770
1810
|
declare function importCsv(text: string): ParsedImport;
|
|
1771
1811
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1772
1812
|
|
|
1773
|
-
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
|
1813
|
+
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
|
package/dist/core/index.js
CHANGED
|
@@ -1319,6 +1319,7 @@ var STORE_DOORS = [
|
|
|
1319
1319
|
{ name: "stamp_value_envelopes", args: "p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone", returns: "jsonb", security: "invoker" },
|
|
1320
1320
|
{ name: "storage_modes", args: "", returns: "text[]", security: "invoker" },
|
|
1321
1321
|
{ name: "store_is_open", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "boolean", security: "invoker" },
|
|
1322
|
+
{ name: "store_off_sentence", args: "p_organization_id uuid", returns: "text", security: "invoker" },
|
|
1322
1323
|
{ name: "subscription_cadences", args: "p_organization_id uuid", returns: "text[]", security: "definer" },
|
|
1323
1324
|
{ name: "subscription_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
1324
1325
|
{ name: "subscription_mute", args: "p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true", returns: "boolean", security: "definer" },
|
|
@@ -2601,6 +2602,19 @@ var DOORS = {
|
|
|
2601
2602
|
fieldOptions: "field_options",
|
|
2602
2603
|
parityValues: "parity_values",
|
|
2603
2604
|
tableDeclare: "table_declare",
|
|
2605
|
+
// GETTING RID OF A TABLE — which is a JOB, NOT A STATEMENT (VERIFIER-11 F3).
|
|
2606
|
+
// `record_delete` above is the store's one soft-delete door and it is right
|
|
2607
|
+
// for a record; aimed at a TABLE it recurses through everything the Table
|
|
2608
|
+
// contains inside one transaction, and that is unbounded by construction. A
|
|
2609
|
+
// person pressing "Delete this table" on 1,430 records the product itself
|
|
2610
|
+
// had just imported waited twelve seconds and was told `57014`, "canceling
|
|
2611
|
+
// statement due to statement timeout … Nothing was changed. Try a smaller
|
|
2612
|
+
// page" — advice that means nothing when what you are doing is getting rid
|
|
2613
|
+
// of a table. `custom.table_archive` does the same work in passes and
|
|
2614
|
+
// answers each one with numbers, so a screen shows a sentence and a count
|
|
2615
|
+
// instead of a spinner and an SQLSTATE. It is STATELESS, so a run cut in
|
|
2616
|
+
// half resumes exactly where it stopped: there is no job row to lose.
|
|
2617
|
+
tableArchive: "table_archive",
|
|
2604
2618
|
// ADDING A COLUMN — the first thing anybody does with a table, and until
|
|
2605
2619
|
// 2026-09-19 there was no door for it. A Field is a record (REC-25), so a
|
|
2606
2620
|
// screen wrote one with `record_write`; that door writes ONE row with
|
|
@@ -3264,6 +3278,18 @@ function createRecordsClient(config) {
|
|
|
3264
3278
|
"recordRestore"
|
|
3265
3279
|
);
|
|
3266
3280
|
},
|
|
3281
|
+
async tableArchive({ table_id, chunk, includeTable }) {
|
|
3282
|
+
return callDoor(
|
|
3283
|
+
DOORS.tableArchive,
|
|
3284
|
+
{
|
|
3285
|
+
p_organization_id: org,
|
|
3286
|
+
p_table_id: table_id,
|
|
3287
|
+
p_chunk: chunk ?? 50,
|
|
3288
|
+
p_include_table: includeTable ?? true
|
|
3289
|
+
},
|
|
3290
|
+
"tableArchive"
|
|
3291
|
+
);
|
|
3292
|
+
},
|
|
3267
3293
|
async recordRead({ record_id, withComputed = false }) {
|
|
3268
3294
|
const door = await callDoor(
|
|
3269
3295
|
DOORS.readRecord,
|