@ai-matrx/records 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/core/index.cjs +132 -11
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +36 -8
- package/dist/core/index.d.ts +36 -8
- package/dist/core/index.js +132 -11
- package/dist/core/index.js.map +1 -1
- package/dist/{field-z68hD9VX.d.cts → field-C6_QKP1G.d.cts} +153 -10
- package/dist/{field-z68hD9VX.d.ts → field-C6_QKP1G.d.ts} +153 -10
- package/dist/index.cjs +85 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -3
- package/dist/index.d.ts +71 -3
- package/dist/index.js +85 -7
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +132 -11
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +250 -12
- package/dist/react/index.d.ts +250 -12
- package/dist/react/index.js +132 -11
- 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,7 +1,7 @@
|
|
|
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
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, RecordFilter, 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, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, 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
|
-
export { AggregateFilter, AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, 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, 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, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip, stableFilterKey } 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-C6_QKP1G.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-C6_QKP1G.cjs';
|
|
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, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, 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
|
+
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, 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, 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, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -169,6 +169,30 @@ interface RecordsClient {
|
|
|
169
169
|
table_id: Uuid;
|
|
170
170
|
ids: readonly Uuid[];
|
|
171
171
|
}): Promise<RecordsResult<ReadRow[]>>;
|
|
172
|
+
/**
|
|
173
|
+
* DOOR-1 FOR THE ROWS THAT LEFT: a page of one Table's ARCHIVED records,
|
|
174
|
+
* through `custom.read_records_archived` — the same ladder, the same level,
|
|
175
|
+
* the same field masking and the same page ceiling as `list`, with the sign
|
|
176
|
+
* of the `deleted_at` test flipped, plus who archived each one and when.
|
|
177
|
+
*
|
|
178
|
+
* 🚨 IT EXISTS BECAUSE ARCHIVING WAS A ONE-WAY DOOR (VERIFIER-10 F4). The
|
|
179
|
+
* store has always had `record_restore`, and it has always done exactly the
|
|
180
|
+
* right thing; what it did not have was any door that could LIST the records
|
|
181
|
+
* it would act on, because every read door answers live rows only. So an
|
|
182
|
+
* archived record was unreachable from every screen in the platform.
|
|
183
|
+
*
|
|
184
|
+
* `lane` is the archived-items law's two lanes — "mine" (what I archived) and
|
|
185
|
+
* "org" (what anybody in this organization archived), which is the default.
|
|
186
|
+
*/
|
|
187
|
+
listArchived(args: {
|
|
188
|
+
table_id: Uuid;
|
|
189
|
+
lane?: ArchiveLane;
|
|
190
|
+
limit?: number;
|
|
191
|
+
offset?: number;
|
|
192
|
+
}): Promise<RecordsResult<{
|
|
193
|
+
rows: ArchivedRow[];
|
|
194
|
+
total: number | null;
|
|
195
|
+
}>>;
|
|
172
196
|
query(query: RecordQuery): Promise<RecordsResult<{
|
|
173
197
|
rows: ReadRow[];
|
|
174
198
|
total: number | null;
|
|
@@ -864,8 +888,11 @@ interface RecordsClient {
|
|
|
864
888
|
signer_name: string;
|
|
865
889
|
signer_user_id?: Uuid | null;
|
|
866
890
|
}): Promise<RecordsResult<Uuid>>;
|
|
867
|
-
/**
|
|
868
|
-
|
|
891
|
+
/**
|
|
892
|
+
* One signature: the seal AND whether what was signed is still what is there.
|
|
893
|
+
* The store answers both, in one call, never the screen. Viewer on the record.
|
|
894
|
+
*/
|
|
895
|
+
docSignatureRead(args: {
|
|
869
896
|
signature_id: Uuid;
|
|
870
897
|
}): Promise<RecordsResult<unknown>>;
|
|
871
898
|
/** Every template that renders one Table. Viewer on the Table. */
|
|
@@ -1380,6 +1407,7 @@ declare const DOORS: {
|
|
|
1380
1407
|
readonly readRecords: "read_records";
|
|
1381
1408
|
readonly readRecordsByIds: "read_records_by_ids";
|
|
1382
1409
|
readonly readRecordsMatching: "read_records_matching";
|
|
1410
|
+
readonly readRecordsArchived: "read_records_archived";
|
|
1383
1411
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1384
1412
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1385
1413
|
readonly recordWrite: "record_write";
|
|
@@ -1514,7 +1542,7 @@ declare const DOORS: {
|
|
|
1514
1542
|
readonly docTokens: "doc_tokens";
|
|
1515
1543
|
readonly docUnresolvedTokens: "doc_unresolved_tokens";
|
|
1516
1544
|
readonly docSign: "doc_sign";
|
|
1517
|
-
readonly
|
|
1545
|
+
readonly docSignatureRead: "doc_signature_read";
|
|
1518
1546
|
readonly docTemplates: "doc_templates";
|
|
1519
1547
|
readonly docTemplateDelete: "doc_template_delete";
|
|
1520
1548
|
readonly docRenders: "doc_renders";
|
|
@@ -1696,4 +1724,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
1696
1724
|
declare function importCsv(text: string): ParsedImport;
|
|
1697
1725
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1698
1726
|
|
|
1699
|
-
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, 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, 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, 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 };
|
|
1727
|
+
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, 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, 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 };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, RecordFilter, 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, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, 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
|
-
export { AggregateFilter, AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, 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, 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, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip, stableFilterKey } 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-C6_QKP1G.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-C6_QKP1G.js';
|
|
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, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, 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
|
+
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, 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, 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, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -169,6 +169,30 @@ interface RecordsClient {
|
|
|
169
169
|
table_id: Uuid;
|
|
170
170
|
ids: readonly Uuid[];
|
|
171
171
|
}): Promise<RecordsResult<ReadRow[]>>;
|
|
172
|
+
/**
|
|
173
|
+
* DOOR-1 FOR THE ROWS THAT LEFT: a page of one Table's ARCHIVED records,
|
|
174
|
+
* through `custom.read_records_archived` — the same ladder, the same level,
|
|
175
|
+
* the same field masking and the same page ceiling as `list`, with the sign
|
|
176
|
+
* of the `deleted_at` test flipped, plus who archived each one and when.
|
|
177
|
+
*
|
|
178
|
+
* 🚨 IT EXISTS BECAUSE ARCHIVING WAS A ONE-WAY DOOR (VERIFIER-10 F4). The
|
|
179
|
+
* store has always had `record_restore`, and it has always done exactly the
|
|
180
|
+
* right thing; what it did not have was any door that could LIST the records
|
|
181
|
+
* it would act on, because every read door answers live rows only. So an
|
|
182
|
+
* archived record was unreachable from every screen in the platform.
|
|
183
|
+
*
|
|
184
|
+
* `lane` is the archived-items law's two lanes — "mine" (what I archived) and
|
|
185
|
+
* "org" (what anybody in this organization archived), which is the default.
|
|
186
|
+
*/
|
|
187
|
+
listArchived(args: {
|
|
188
|
+
table_id: Uuid;
|
|
189
|
+
lane?: ArchiveLane;
|
|
190
|
+
limit?: number;
|
|
191
|
+
offset?: number;
|
|
192
|
+
}): Promise<RecordsResult<{
|
|
193
|
+
rows: ArchivedRow[];
|
|
194
|
+
total: number | null;
|
|
195
|
+
}>>;
|
|
172
196
|
query(query: RecordQuery): Promise<RecordsResult<{
|
|
173
197
|
rows: ReadRow[];
|
|
174
198
|
total: number | null;
|
|
@@ -864,8 +888,11 @@ interface RecordsClient {
|
|
|
864
888
|
signer_name: string;
|
|
865
889
|
signer_user_id?: Uuid | null;
|
|
866
890
|
}): Promise<RecordsResult<Uuid>>;
|
|
867
|
-
/**
|
|
868
|
-
|
|
891
|
+
/**
|
|
892
|
+
* One signature: the seal AND whether what was signed is still what is there.
|
|
893
|
+
* The store answers both, in one call, never the screen. Viewer on the record.
|
|
894
|
+
*/
|
|
895
|
+
docSignatureRead(args: {
|
|
869
896
|
signature_id: Uuid;
|
|
870
897
|
}): Promise<RecordsResult<unknown>>;
|
|
871
898
|
/** Every template that renders one Table. Viewer on the Table. */
|
|
@@ -1380,6 +1407,7 @@ declare const DOORS: {
|
|
|
1380
1407
|
readonly readRecords: "read_records";
|
|
1381
1408
|
readonly readRecordsByIds: "read_records_by_ids";
|
|
1382
1409
|
readonly readRecordsMatching: "read_records_matching";
|
|
1410
|
+
readonly readRecordsArchived: "read_records_archived";
|
|
1383
1411
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1384
1412
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1385
1413
|
readonly recordWrite: "record_write";
|
|
@@ -1514,7 +1542,7 @@ declare const DOORS: {
|
|
|
1514
1542
|
readonly docTokens: "doc_tokens";
|
|
1515
1543
|
readonly docUnresolvedTokens: "doc_unresolved_tokens";
|
|
1516
1544
|
readonly docSign: "doc_sign";
|
|
1517
|
-
readonly
|
|
1545
|
+
readonly docSignatureRead: "doc_signature_read";
|
|
1518
1546
|
readonly docTemplates: "doc_templates";
|
|
1519
1547
|
readonly docTemplateDelete: "doc_template_delete";
|
|
1520
1548
|
readonly docRenders: "doc_renders";
|
|
@@ -1696,4 +1724,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
1696
1724
|
declare function importCsv(text: string): ParsedImport;
|
|
1697
1725
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
1698
1726
|
|
|
1699
|
-
export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, 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, 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, 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 };
|
|
1727
|
+
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, 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, 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 };
|
package/dist/core/index.js
CHANGED
|
@@ -54,6 +54,46 @@ var OVERRIDE_POLICIES = [
|
|
|
54
54
|
var FRESHNESS = ["live", "cached", "snapshot"];
|
|
55
55
|
var TABLE_DISPLAYS = ["list", "grid", "board", "calendar", "timeline"];
|
|
56
56
|
|
|
57
|
+
// src/archive.ts
|
|
58
|
+
var ARCHIVE_LANES = ["mine", "org"];
|
|
59
|
+
var DEFAULT_ARCHIVE_LANE = "org";
|
|
60
|
+
var ARCHIVE_LANE_LABEL = {
|
|
61
|
+
mine: "Archived by me",
|
|
62
|
+
org: "Archived by anyone"
|
|
63
|
+
};
|
|
64
|
+
var ARCHIVE_LANE_MEANS = {
|
|
65
|
+
mine: "The records you archived yourself.",
|
|
66
|
+
org: "Everything anybody in this organization archived, including you."
|
|
67
|
+
};
|
|
68
|
+
function isArchiveLane(word) {
|
|
69
|
+
return typeof word === "string" && ARCHIVE_LANES.includes(word);
|
|
70
|
+
}
|
|
71
|
+
function archivedWhen(at, locale = "en-GB") {
|
|
72
|
+
const when = new Date(at);
|
|
73
|
+
if (Number.isNaN(when.getTime())) return "a moment nobody recorded";
|
|
74
|
+
return new Intl.DateTimeFormat(locale, {
|
|
75
|
+
day: "numeric",
|
|
76
|
+
month: "long",
|
|
77
|
+
year: "numeric",
|
|
78
|
+
hour: "2-digit",
|
|
79
|
+
minute: "2-digit"
|
|
80
|
+
}).format(when);
|
|
81
|
+
}
|
|
82
|
+
function archivedByLine(row, locale = "en-GB") {
|
|
83
|
+
const when = archivedWhen(row.archivedAt, locale);
|
|
84
|
+
const who = (row.archivedByName ?? "").trim();
|
|
85
|
+
if (who === "") {
|
|
86
|
+
return `Archived on ${when}. The store does not know who archived it \u2014 whoever did is no longer in this organization, or it happened before this table kept that.`;
|
|
87
|
+
}
|
|
88
|
+
return `Archived by ${who} on ${when}.`;
|
|
89
|
+
}
|
|
90
|
+
function emptyArchiveLine(lane) {
|
|
91
|
+
return lane === "mine" ? "You have not archived anything in this table. Switch to \u201CArchived by anyone\u201D to see what the rest of the organization has." : "Nothing in this table has been archived. Records you remove from the grid arrive here, and nothing is ever destroyed.";
|
|
92
|
+
}
|
|
93
|
+
function sameDocument(a, b) {
|
|
94
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
95
|
+
}
|
|
96
|
+
|
|
57
97
|
// src/level.ts
|
|
58
98
|
var PERMISSION_LEVELS = [
|
|
59
99
|
"viewer",
|
|
@@ -717,6 +757,27 @@ var PARITY_FIELD_TYPES = [
|
|
|
717
757
|
{ parity_type: "select", behavior: "list", made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)" },
|
|
718
758
|
{ parity_type: "url", behavior: "text", made_of: "text whose format is url, with the pattern Rule that makes the format enforceable" }
|
|
719
759
|
];
|
|
760
|
+
var DECLARABLE_FIELD_KINDS = [
|
|
761
|
+
{ kind: "attachment", behavior: "relation", parity: true, made_of: "REC-31: a File record reached through a relation, target the kernel `File` Table" },
|
|
762
|
+
{ kind: "checkbox", behavior: "boolean", parity: true, made_of: "a ticked or unticked answer, stored as a REAL boolean \u2014 and a record that never answered holds neither, so filters and group-by see three states, not two" },
|
|
763
|
+
{ kind: "currency", behavior: "range", parity: true, made_of: "FLD-N-1: a number whose UNIT is the currency and whose format is currency \u2014 on the Field, never in presentation" },
|
|
764
|
+
{ kind: "datetime", behavior: "range", parity: true, made_of: "a range of kind date or datetime \u2014 the dated modifier says the VALUES are dated, which is a different question" },
|
|
765
|
+
{ kind: "email", behavior: "text", parity: true, made_of: "text whose format is email" },
|
|
766
|
+
{ kind: "formula", behavior: "formula", parity: true, made_of: "FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval" },
|
|
767
|
+
{ kind: "long_text", behavior: "text", parity: false, made_of: "behaviour text with format long and config.multiline, for several lines rather than one" },
|
|
768
|
+
{ kind: "lookup", behavior: "formula", parity: true, made_of: "a Value read THROUGH a relation \u2014 config.via names the relation field, config.pick the Value on the far side" },
|
|
769
|
+
{ kind: "member", behavior: "relation", parity: true, made_of: "a person: a relation whose target is the kernel `Person` Table" },
|
|
770
|
+
{ kind: "multi_select", behavior: "list", parity: true, made_of: "many choices from the same Table \u2014 the multi modifier, never a second behaviour" },
|
|
771
|
+
{ kind: "number", behavior: "range", parity: false, made_of: "a plain number: behaviour range with no date kind and neither the currency nor the percent format" },
|
|
772
|
+
{ kind: "percent", behavior: "range", parity: true, made_of: "a number whose unit is % and whose format is percent" },
|
|
773
|
+
{ kind: "phone", behavior: "text", parity: true, made_of: "text whose format is phone" },
|
|
774
|
+
{ kind: "relation", behavior: "relation", parity: false, made_of: "REL / FLD-11: a relation a person aims themselves \u2014 relation_target names a Table of this organization, and it is a BEHAVIOUR, never a parity type of its own" },
|
|
775
|
+
{ kind: "rollup", behavior: "formula", parity: true, made_of: "an aggregate ALONG a relation \u2014 config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice" },
|
|
776
|
+
{ kind: "select", behavior: "list", parity: true, made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)" },
|
|
777
|
+
{ kind: "signature", behavior: "text", parity: false, made_of: "VAL-10: behaviour text whose format is signature \u2014 the one shape custom.doc_sign accepts, sealed by custom.doc_signature_write and checked by custom.doc_signature_intact" },
|
|
778
|
+
{ kind: "text", behavior: "text", parity: false, made_of: "plain text: behaviour text with no format \u2014 it carries no parity type, which is exactly what custom.parity_type answers for it" },
|
|
779
|
+
{ kind: "url", behavior: "text", parity: true, made_of: "text whose format is url, with the pattern Rule that makes the format enforceable" }
|
|
780
|
+
];
|
|
720
781
|
var RULE_NODE_KINDS = [
|
|
721
782
|
{ node: "actor_at_least", evaluated_by: "PIPELINES" },
|
|
722
783
|
{ node: "add", evaluated_by: "W1-RULE" },
|
|
@@ -952,6 +1013,7 @@ var STORE_DOORS = [
|
|
|
952
1013
|
{ name: "field_dependants", args: "p_organization_id uuid, p_field_id uuid", returns: "TABLE(kind text, dependant_id uuid, label text, how text)", security: "definer" },
|
|
953
1014
|
{ name: "field_history", args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_record_id uuid DEFAULT NULL::uuid", returns: "TABLE(record_id uuid, record_title text, version integer, occurred_at timestamp with time zone, operation_label text, actor jsonb, before jsonb, after jsonb)", security: "definer" },
|
|
954
1015
|
{ name: "field_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
1016
|
+
{ name: "field_kinds", args: "", returns: "TABLE(kind text, behavior text, parity boolean, made_of text)", security: "invoker" },
|
|
955
1017
|
{ name: "field_options", args: "p_organization_id uuid, p_field_id uuid", returns: "SETOF custom.record", security: "definer" },
|
|
956
1018
|
{ name: "field_retire", args: "p_organization_id uuid, p_field_id uuid", returns: "boolean", security: "definer" },
|
|
957
1019
|
{ name: "field_rules", args: "p_field_data jsonb", returns: "TABLE(kind text, spec jsonb)", security: "invoker" },
|
|
@@ -1087,6 +1149,7 @@ var STORE_DOORS = [
|
|
|
1087
1149
|
{ name: "portal_field_map", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(field_id uuid, field_key text, field_type text, points_at uuid)", security: "definer" },
|
|
1088
1150
|
{ name: "portal_invitation", args: "p_slug text, p_email text", returns: "jsonb", security: "definer" },
|
|
1089
1151
|
{ name: "portal_invite", args: "p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
1152
|
+
{ name: "portal_invite_accept", args: "p_token text", returns: "jsonb", security: "definer" },
|
|
1090
1153
|
{ name: "portal_me", args: "", returns: "jsonb", security: "definer" },
|
|
1091
1154
|
{ name: "portal_preview", args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, title text)", security: "definer" },
|
|
1092
1155
|
{ name: "portal_principal_bind", args: "p_organization_id uuid, p_principal_id uuid, p_user_id uuid", returns: "jsonb", security: "definer" },
|
|
@@ -1139,15 +1202,18 @@ var STORE_DOORS = [
|
|
|
1139
1202
|
{ name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
|
|
1140
1203
|
{ name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
1141
1204
|
{ name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
1205
|
+
{ name: "read_records_archived", args: "p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)", security: "definer" },
|
|
1142
1206
|
{ name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
1143
1207
|
{ name: "read_records_matching", args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
1144
1208
|
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
1145
1209
|
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "definer" },
|
|
1146
1210
|
{ name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
|
|
1211
|
+
{ name: "record_archiver", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "definer" },
|
|
1147
1212
|
{ name: "record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
1148
1213
|
{ name: "record_card", args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
1149
1214
|
{ name: "record_carrying_edges", args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(container_id uuid, item_id uuid, edge_role text)", security: "invoker" },
|
|
1150
1215
|
{ name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
|
|
1216
|
+
{ name: "record_filter_sql", args: "p_filter jsonb", returns: "text", security: "invoker" },
|
|
1151
1217
|
{ name: "record_history", args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)", security: "definer" },
|
|
1152
1218
|
{ name: "record_platform_keys", args: "", returns: "text[]", security: "invoker" },
|
|
1153
1219
|
{ name: "record_relation_edges", args: "p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
|
|
@@ -1236,6 +1302,7 @@ var STORE_DOORS = [
|
|
|
1236
1302
|
{ name: "subscription_mute", args: "p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true", returns: "boolean", security: "definer" },
|
|
1237
1303
|
{ name: "subscription_preview", args: "p_organization_id uuid, p_rule_id uuid", returns: "jsonb", security: "definer" },
|
|
1238
1304
|
{ name: "subscriptions", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)", security: "definer" },
|
|
1305
|
+
{ name: "table_archive", args: "p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 50, p_include_table boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
1239
1306
|
{ name: "table_capacity", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
1240
1307
|
{ name: "table_carries_its_rows", args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
|
|
1241
1308
|
{ name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
@@ -1368,18 +1435,18 @@ var STORE_KNOBS = [
|
|
|
1368
1435
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
1369
1436
|
];
|
|
1370
1437
|
var STORE_REFUSAL_CODES = [
|
|
1371
|
-
{ code: "02000", raised_by: "_checklist_instantiate,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
1438
|
+
{ code: "02000", raised_by: "_checklist_instantiate,_portal_invite_payload,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
1372
1439
|
{ code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign" },
|
|
1373
1440
|
{ code: "22003", raised_by: "context_resolve" },
|
|
1374
|
-
{ code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
|
|
1441
|
+
{ code: "22004", raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
|
|
1375
1442
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
1376
1443
|
{ code: "22012", raised_by: "rule_eval" },
|
|
1377
|
-
{ code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
1378
|
-
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
1379
|
-
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,
|
|
1380
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
1444
|
+
{ code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
1445
|
+
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
1446
|
+
{ code: "23505", raised_by: "_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
1447
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
1381
1448
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
1382
|
-
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_by_ids,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
1449
|
+
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
1383
1450
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
1384
1451
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
1385
1452
|
{ code: "54001", raised_by: "record_delete" },
|
|
@@ -2275,6 +2342,7 @@ var ENTITY_TOKENS = [
|
|
|
2275
2342
|
"template_scope_types",
|
|
2276
2343
|
"templates",
|
|
2277
2344
|
"test_handset_inbox",
|
|
2345
|
+
"test_handset_verification",
|
|
2278
2346
|
"thread",
|
|
2279
2347
|
"tool",
|
|
2280
2348
|
"tool_binding",
|
|
@@ -2484,6 +2552,14 @@ var DOORS = {
|
|
|
2484
2552
|
// `custom.record_filter_sql`, the one body `custom.agg_sql` also calls, so the
|
|
2485
2553
|
// rows it opens are the rows the number counted.
|
|
2486
2554
|
readRecordsMatching: "read_records_matching",
|
|
2555
|
+
// THE SAME READ DOOR, ADDRESSED BY ABSENCE. Every door above answers LIVE rows
|
|
2556
|
+
// only — each of them hard-codes `and r.deleted_at is null` — so until this one
|
|
2557
|
+
// existed no screen could list an archived record however it was written, and
|
|
2558
|
+
// `record_restore` below had nothing that could reach it (VERIFIER-10 F4).
|
|
2559
|
+
// `custom.read_records_archived` is that body with the sign of one comparison
|
|
2560
|
+
// flipped, plus the two facts only an archive needs: who archived it and when.
|
|
2561
|
+
// A separate NAME for the same reason as its two siblings above.
|
|
2562
|
+
readRecordsArchived: "read_records_archived",
|
|
2487
2563
|
// DOOR-8, the two clocks. `p_recorded_at` is what the store SAID then;
|
|
2488
2564
|
// `p_world_on` is what was TRUE of the world on that date, read out of dated
|
|
2489
2565
|
// values. A client that answered either one itself would be guessing.
|
|
@@ -2778,7 +2854,14 @@ var DOORS = {
|
|
|
2778
2854
|
docTokens: "doc_tokens",
|
|
2779
2855
|
docUnresolvedTokens: "doc_unresolved_tokens",
|
|
2780
2856
|
docSign: "doc_sign",
|
|
2781
|
-
|
|
2857
|
+
// THE SEAL IS ASKED THROUGH ITS OWN DOOR. `custom.doc_signature_intact` is the INTERNAL
|
|
2858
|
+
// half of this pair — SECURITY INVOKER over a doors-only table, so a browser that calls it
|
|
2859
|
+
// gets `42501 permission denied for table doc_signature`, which is what every SignBlock
|
|
2860
|
+
// seal check got until 2026-09-22 (FIX-10B). `custom.doc_signature_read` is the definer
|
|
2861
|
+
// door built for a client: it asks may_reach and may_open on the RECORD by name and
|
|
2862
|
+
// returns the seal AND the verdict in one answer, because a seal a person can read and a
|
|
2863
|
+
// verdict they cannot is how a changed agreement keeps wearing somebody's signature.
|
|
2864
|
+
docSignatureRead: "doc_signature_read",
|
|
2782
2865
|
// THE PLURAL ACTS. Until 2026-09-20 this package read `custom.doc_template`,
|
|
2783
2866
|
// `custom.doc_render` and `custom.doc_signature` with a direct PostgREST
|
|
2784
2867
|
// `.from()`, and all three hold NO client SELECT — so every list in product #5
|
|
@@ -3183,6 +3266,34 @@ function createRecordsClient(config) {
|
|
|
3183
3266
|
})
|
|
3184
3267
|
);
|
|
3185
3268
|
},
|
|
3269
|
+
async listArchived({ table_id, lane = DEFAULT_ARCHIVE_LANE, limit = 50, offset = 0 }) {
|
|
3270
|
+
const door = await callDoor(
|
|
3271
|
+
DOORS.readRecordsArchived,
|
|
3272
|
+
{
|
|
3273
|
+
p_organization_id: org,
|
|
3274
|
+
p_table_id: table_id,
|
|
3275
|
+
p_lane: lane,
|
|
3276
|
+
p_limit: limit,
|
|
3277
|
+
p_offset: offset
|
|
3278
|
+
},
|
|
3279
|
+
"listArchived"
|
|
3280
|
+
);
|
|
3281
|
+
if (!door.ok) return err(door.error);
|
|
3282
|
+
const rows = (door.data ?? []).map((row) => {
|
|
3283
|
+
const { document, hidden } = unfold(row.document);
|
|
3284
|
+
return {
|
|
3285
|
+
id: row.id,
|
|
3286
|
+
document,
|
|
3287
|
+
level: row.level,
|
|
3288
|
+
hidden,
|
|
3289
|
+
archivedAt: row.archived_at,
|
|
3290
|
+
archivedBy: row.archived_by ?? null,
|
|
3291
|
+
archivedByName: row.archived_by_name ?? null
|
|
3292
|
+
};
|
|
3293
|
+
});
|
|
3294
|
+
const total = rows.length < limit ? offset + rows.length : null;
|
|
3295
|
+
return ok({ rows, total });
|
|
3296
|
+
},
|
|
3186
3297
|
async list({ table_id, filter, limit = 50, offset = 0 }) {
|
|
3187
3298
|
const door = await callDoor(
|
|
3188
3299
|
DOORS.readRecordsMatching,
|
|
@@ -4330,11 +4441,11 @@ function createRecordsClient(config) {
|
|
|
4330
4441
|
"commentResolve"
|
|
4331
4442
|
);
|
|
4332
4443
|
},
|
|
4333
|
-
async
|
|
4444
|
+
async docSignatureRead({ signature_id }) {
|
|
4334
4445
|
return callDoor(
|
|
4335
|
-
DOORS.
|
|
4446
|
+
DOORS.docSignatureRead,
|
|
4336
4447
|
{ p_organization_id: org, p_signature_id: signature_id },
|
|
4337
|
-
"
|
|
4448
|
+
"docSignatureRead"
|
|
4338
4449
|
);
|
|
4339
4450
|
},
|
|
4340
4451
|
// ── the anonymous lane ───────────────────────────────────────────────
|
|
@@ -5333,8 +5444,13 @@ function fromMatrix(matrix) {
|
|
|
5333
5444
|
export {
|
|
5334
5445
|
ABSENCE_REASONS,
|
|
5335
5446
|
ACTOR_VOCABULARY,
|
|
5447
|
+
ARCHIVE_LANES,
|
|
5448
|
+
ARCHIVE_LANE_LABEL,
|
|
5449
|
+
ARCHIVE_LANE_MEANS,
|
|
5336
5450
|
COMPUTE_ON,
|
|
5337
5451
|
CONTEXT_POLICIES,
|
|
5452
|
+
DECLARABLE_FIELD_KINDS,
|
|
5453
|
+
DEFAULT_ARCHIVE_LANE,
|
|
5338
5454
|
DEFAULT_DOCUMENT_MAX_BYTES,
|
|
5339
5455
|
DEFAULT_PAGE_SIZE,
|
|
5340
5456
|
DEFAULT_VALUE_MAX_BYTES,
|
|
@@ -5374,6 +5490,8 @@ export {
|
|
|
5374
5490
|
TABLE_TYPES,
|
|
5375
5491
|
VALUE_ALTERNATE_KEYS,
|
|
5376
5492
|
VALUE_ENVELOPE_KEYS,
|
|
5493
|
+
archivedByLine,
|
|
5494
|
+
archivedWhen,
|
|
5377
5495
|
asPermissionLevel,
|
|
5378
5496
|
asWriteConflict,
|
|
5379
5497
|
atLeast,
|
|
@@ -5389,6 +5507,7 @@ export {
|
|
|
5389
5507
|
doorAbsent,
|
|
5390
5508
|
doorCensus,
|
|
5391
5509
|
doorExists,
|
|
5510
|
+
emptyArchiveLine,
|
|
5392
5511
|
err,
|
|
5393
5512
|
exportCsv,
|
|
5394
5513
|
exportXlsx,
|
|
@@ -5400,6 +5519,7 @@ export {
|
|
|
5400
5519
|
importXlsx,
|
|
5401
5520
|
indexedDbStore,
|
|
5402
5521
|
intersectIds,
|
|
5522
|
+
isArchiveLane,
|
|
5403
5523
|
isDecided,
|
|
5404
5524
|
isOwnOp,
|
|
5405
5525
|
isRecordsErr,
|
|
@@ -5424,6 +5544,7 @@ export {
|
|
|
5424
5544
|
predictWriteRefusals,
|
|
5425
5545
|
publicFormPath,
|
|
5426
5546
|
rememberedOpCount,
|
|
5547
|
+
sameDocument,
|
|
5427
5548
|
scopeChip,
|
|
5428
5549
|
stableFilterKey,
|
|
5429
5550
|
staleWriteDetail,
|