@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/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-
|
|
1
|
+
import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-Ct7_iYEF.cjs';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-Ct7_iYEF.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
|
|
@@ -169,6 +169,51 @@ interface TableCapacity {
|
|
|
169
169
|
/** The knob that decides the ceiling, named so a person can act on it. */
|
|
170
170
|
knob: string;
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* WHAT ONE PASS OF `custom.table_archive` ANSWERS WITH — the numbers a screen
|
|
174
|
+
* needs to draw a bar and write a sentence, instead of a spinner and an
|
|
175
|
+
* SQLSTATE (VERIFIER-10 F3, VERIFIER-11 F3).
|
|
176
|
+
*
|
|
177
|
+
* Archiving a table is a JOB, NOT A STATEMENT. `custom.record_delete` on a
|
|
178
|
+
* Table recurses through everything the Table contains inside one transaction,
|
|
179
|
+
* which is unbounded by construction: at 1,430 records it dies on `57014`,
|
|
180
|
+
* "canceling statement due to statement timeout", and nothing is changed. The
|
|
181
|
+
* remedy for a thing that cannot finish in one statement is more statements,
|
|
182
|
+
* never a longer one — so the caller loops, passing its own `chunk`, until
|
|
183
|
+
* `done`.
|
|
184
|
+
*
|
|
185
|
+
* IT IS RESUMABLE BECAUSE IT IS STATELESS. There is no job row to lose:
|
|
186
|
+
* `remaining` is read off the records themselves on every call, so a browser
|
|
187
|
+
* closed halfway, a failed pass or a deploy mid-run all leave a table that is
|
|
188
|
+
* half archived and a next call that picks up exactly where the last stopped.
|
|
189
|
+
* Which is why a screen driving this may NEVER say "nothing was changed" after
|
|
190
|
+
* a pass that moved rows — `archived_total` is what really landed.
|
|
191
|
+
*
|
|
192
|
+
* NOTHING IS DELETED. Every row goes through `custom.record_delete`, so every
|
|
193
|
+
* guard, history capture and outbox row still happens and `recordRestore`
|
|
194
|
+
* still brings any of them back.
|
|
195
|
+
*/
|
|
196
|
+
interface TableArchiveProgress {
|
|
197
|
+
table_id: Uuid;
|
|
198
|
+
/** The table's own name, so a sentence can use it rather than an id. */
|
|
199
|
+
table_name: string;
|
|
200
|
+
/** What THIS pass archived. */
|
|
201
|
+
archived: number;
|
|
202
|
+
/** Records of this table still live. Zero is the end of the row work. */
|
|
203
|
+
remaining: number;
|
|
204
|
+
/** Records this table has ever held: `remaining` + `archived_total`. */
|
|
205
|
+
total: number;
|
|
206
|
+
/** Records of this table already archived, across every pass ever made. */
|
|
207
|
+
archived_total: number;
|
|
208
|
+
/** Whether the Table record itself has been archived. */
|
|
209
|
+
table_archived: boolean;
|
|
210
|
+
/** Nothing live is left to do. The caller's loop ends here. */
|
|
211
|
+
done: boolean;
|
|
212
|
+
/** The chunk the door actually took on — it clamps what it is handed. */
|
|
213
|
+
chunk: number;
|
|
214
|
+
/** The store's own sentence about this pass, in the product's voice. */
|
|
215
|
+
message: string;
|
|
216
|
+
}
|
|
172
217
|
|
|
173
218
|
/** One option, as `_choices` names it and as `optionsOf` returns it. */
|
|
174
219
|
interface ChoiceOption {
|
|
@@ -3231,4 +3276,4 @@ interface ConversationScopeContext {
|
|
|
3231
3276
|
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
3232
3277
|
declare function scopeChip(scope: ConversationScope): string;
|
|
3233
3278
|
|
|
3234
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
|
|
3279
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-
|
|
1
|
+
import { U as Uuid, g as Timestamp, k as ReadRow, h as RecordDocument, T as TableType, a as TableDisplay, S as StorageMode, ay as TableOrigin, m as StoredRecord, l as Field, a9 as ParityFieldType, ao as RuleUse, an as RuleNodeKind, R as RelationFlavor, O as OnDelete, ak as RelationBinding, f as RelationCardinality, a3 as MergeFieldSource, a2 as MergeFieldSemanticType, a1 as MergeFieldModifier, a6 as OverridePolicy, G as Delivery, V as Freshness, x as Actor, P as PgError } from './field-Ct7_iYEF.js';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DECLARABLE_FIELD_KINDS, B as DELIVERIES, E as DeclarableFieldKind, H as ENTITY_TOKENS, I as EntityToken, J as FIELD_SENSITIVITIES, K as FIELD_SOURCES, L as FRESHNESS, M as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, Q as ForbiddenEnvelopeWord, X as HiddenFieldNotice, Y as KERNEL_TABLES, Z as KernelTableName, _ as MERGE_FIELD_MODIFIERS, $ as MERGE_FIELD_SEMANTIC_TYPES, a0 as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a4 as ON_DELETE, a5 as OVERRIDE_POLICIES, a7 as PARITY_FIELD_TYPES, a8 as PER_VALUE_ACCESS_WORDS, aa as ParityFieldTypeDescriptor, ab as PerValueAccessWord, u as PredictedRefusal, ac as ProvenancePointer, ad as RELATION_BINDINGS, ae as RELATION_CARDINALITIES, af as RELATION_FLAVORS, ag as RETIRED_ACTOR_WORDS, ah as RULE_NODE_KINDS, ai as RULE_USES, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, aj as RecordsErrorCode, i as RecordsResult, al as RelationDisplay, am as RetiredActorWord, ap as STORAGE_MODES, aq as STORE_DOORS, ar as STORE_KNOBS, as as STORE_REFUSAL_CODES, t as StaleWriteDetail, at as StoreDoorName, au as StoreRefusalCode, av as TABLE_DISPLAYS, aw as TABLE_ORIGINS, ax as TABLE_TYPES, r as TableProposal, az as VALUE_ALTERNATE_KEYS, aA as VALUE_ENVELOPE_KEYS, aB as ValueAlternate, aC as ValueAlternateKey, aD as ValueEnvelope, aE as ValueEnvelopeKey, aF as ValueSource, W as WriteConflict, aG as err, aH as isRecordsErr, aI as ok } from './field-Ct7_iYEF.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* THE TWO LANES THE ARCHIVED-ITEMS LAW NAMES (Arman, 2026-09-09) — the same
|
|
@@ -169,6 +169,51 @@ interface TableCapacity {
|
|
|
169
169
|
/** The knob that decides the ceiling, named so a person can act on it. */
|
|
170
170
|
knob: string;
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* WHAT ONE PASS OF `custom.table_archive` ANSWERS WITH — the numbers a screen
|
|
174
|
+
* needs to draw a bar and write a sentence, instead of a spinner and an
|
|
175
|
+
* SQLSTATE (VERIFIER-10 F3, VERIFIER-11 F3).
|
|
176
|
+
*
|
|
177
|
+
* Archiving a table is a JOB, NOT A STATEMENT. `custom.record_delete` on a
|
|
178
|
+
* Table recurses through everything the Table contains inside one transaction,
|
|
179
|
+
* which is unbounded by construction: at 1,430 records it dies on `57014`,
|
|
180
|
+
* "canceling statement due to statement timeout", and nothing is changed. The
|
|
181
|
+
* remedy for a thing that cannot finish in one statement is more statements,
|
|
182
|
+
* never a longer one — so the caller loops, passing its own `chunk`, until
|
|
183
|
+
* `done`.
|
|
184
|
+
*
|
|
185
|
+
* IT IS RESUMABLE BECAUSE IT IS STATELESS. There is no job row to lose:
|
|
186
|
+
* `remaining` is read off the records themselves on every call, so a browser
|
|
187
|
+
* closed halfway, a failed pass or a deploy mid-run all leave a table that is
|
|
188
|
+
* half archived and a next call that picks up exactly where the last stopped.
|
|
189
|
+
* Which is why a screen driving this may NEVER say "nothing was changed" after
|
|
190
|
+
* a pass that moved rows — `archived_total` is what really landed.
|
|
191
|
+
*
|
|
192
|
+
* NOTHING IS DELETED. Every row goes through `custom.record_delete`, so every
|
|
193
|
+
* guard, history capture and outbox row still happens and `recordRestore`
|
|
194
|
+
* still brings any of them back.
|
|
195
|
+
*/
|
|
196
|
+
interface TableArchiveProgress {
|
|
197
|
+
table_id: Uuid;
|
|
198
|
+
/** The table's own name, so a sentence can use it rather than an id. */
|
|
199
|
+
table_name: string;
|
|
200
|
+
/** What THIS pass archived. */
|
|
201
|
+
archived: number;
|
|
202
|
+
/** Records of this table still live. Zero is the end of the row work. */
|
|
203
|
+
remaining: number;
|
|
204
|
+
/** Records this table has ever held: `remaining` + `archived_total`. */
|
|
205
|
+
total: number;
|
|
206
|
+
/** Records of this table already archived, across every pass ever made. */
|
|
207
|
+
archived_total: number;
|
|
208
|
+
/** Whether the Table record itself has been archived. */
|
|
209
|
+
table_archived: boolean;
|
|
210
|
+
/** Nothing live is left to do. The caller's loop ends here. */
|
|
211
|
+
done: boolean;
|
|
212
|
+
/** The chunk the door actually took on — it clamps what it is handed. */
|
|
213
|
+
chunk: number;
|
|
214
|
+
/** The store's own sentence about this pass, in the product's voice. */
|
|
215
|
+
message: string;
|
|
216
|
+
}
|
|
172
217
|
|
|
173
218
|
/** One option, as `_choices` names it and as `optionsOf` returns it. */
|
|
174
219
|
interface ChoiceOption {
|
|
@@ -3231,4 +3276,4 @@ interface ConversationScopeContext {
|
|
|
3231
3276
|
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
3232
3277
|
declare function scopeChip(scope: ConversationScope): string;
|
|
3233
3278
|
|
|
3234
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
|
|
3279
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, FIELD_KINDS, Field, type FieldHistoryEntry, type FieldKind, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type KernelTargets, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, ReadRow, type RecordComment, RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableArchiveProgress, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey };
|
package/dist/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" },
|