@ai-matrx/records 0.49.0 → 0.52.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.
@@ -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-z68hD9VX.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 DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, aj as RelationDisplay, R as RelationFlavor, ak as RetiredActorWord, al as RuleNodeKind, am as RuleUse, an as STORAGE_MODES, ao as STORE_DOORS, ap as STORE_KNOBS, aq as STORE_REFUSAL_CODES, S as StorageMode, ar as StoreDoorName, as as StoreRefusalCode, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, a as TableDisplay, aw as TableOrigin, T as TableType, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, aE as err, aF as isRecordsErr, aG as ok } from '../field-z68hD9VX.cjs';
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-xRstzLKK.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-xRstzLKK.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, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.cjs';
4
+ export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.cjs';
5
5
 
6
6
  /**
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;
@@ -478,9 +502,24 @@ interface RecordsClient {
478
502
  force?: boolean;
479
503
  }): Promise<RecordsResult<ImportOpened>>;
480
504
  /**
481
- * One BATCH of rows. Every row is written through the ONE write door inside
482
- * its own subtransaction, so a refused row leaves nothing behind and never
483
- * costs the rows before it. Send a few hundred at a time.
505
+ * IMPORT-2. ADD THE COLUMNS THIS FILE HAS AND THIS TABLE HAS NOT — a step of
506
+ * its own, BEFORE the run is opened, so the screen can show "8 columns added"
507
+ * and the person can then name one of them as the file's duplicate key
508
+ * (`importBegin` refuses a key naming a column that does not exist yet).
509
+ * Answers the mapping the file should be sent with. Admin on the Table.
510
+ */
511
+ importDeclareColumns(args: {
512
+ table_id: Uuid;
513
+ rows: Array<Record<string, unknown>>;
514
+ /** Header -> Field key the person already mapped by hand; never declared. */
515
+ mapping?: Record<string, string>;
516
+ }): Promise<RecordsResult<ImportColumnsDeclared>>;
517
+ /**
518
+ * One BATCH of rows. The batch is PLANNED and then written as ONE statement
519
+ * through the batched write door, so 250 round trips became one; a batch a
520
+ * guard refuses falls back to one write a row, and the answer says which it
521
+ * was. Send `ImportOpened.rows_per_call` the first time and
522
+ * `ImportBatchResult.rows_per_call` — measured — every time after that.
484
523
  */
485
524
  importRows(args: {
486
525
  import_id: Uuid;
@@ -540,6 +579,33 @@ interface RecordsClient {
540
579
  }>>;
541
580
  /** Every portal over this organization the caller may know about, with its numbers. */
542
581
  portals(): Promise<RecordsResult<PortalSummary[]>>;
582
+ /**
583
+ * The SAME list, archive-aware. `custom.portals` keeps its signature and hides
584
+ * archived portals, because the archived-items law's default is to hide;
585
+ * this is the one door that also answers the other lane, so a rail gets the
586
+ * law's one-click reveal without inventing a second control or a second door.
587
+ * A fourth word is refused `22023` — there is no fourth answer on any surface.
588
+ */
589
+ listPortals(args?: {
590
+ archived?: PortalArchiveFilter;
591
+ }): Promise<RecordsResult<PortalSummary[]>>;
592
+ /**
593
+ * PUT ONE PORTAL AWAY. Nothing is deleted and there is no purge: every Table
594
+ * it exposes and every person invited to it is kept exactly as it is, and
595
+ * `portalRestore` hands it all back. `confirm_title` is the portal's own title
596
+ * typed back — ten portals can carry one title, so the title is not what picks
597
+ * this one and the door refuses `23514` when it does not match.
598
+ */
599
+ portalArchive(args: {
600
+ portal_id: Uuid;
601
+ confirm_title: string;
602
+ reason?: string | null;
603
+ }): Promise<RecordsResult<PortalArchiveAnswer>>;
604
+ /** The way back. Everyone invited signs in exactly as before, and it shows the same Tables. */
605
+ portalRestore(args: {
606
+ portal_id: Uuid;
607
+ confirm_title: string;
608
+ }): Promise<RecordsResult<PortalArchiveAnswer>>;
543
609
  /**
544
610
  * Which Tables each portal of this organization exposes.
545
611
  *
@@ -864,8 +930,11 @@ interface RecordsClient {
864
930
  signer_name: string;
865
931
  signer_user_id?: Uuid | null;
866
932
  }): Promise<RecordsResult<Uuid>>;
867
- /** Is what was signed still what is there? The store answers, never the screen. */
868
- docSignatureIntact(args: {
933
+ /**
934
+ * One signature: the seal AND whether what was signed is still what is there.
935
+ * The store answers both, in one call, never the screen. Viewer on the record.
936
+ */
937
+ docSignatureRead(args: {
869
938
  signature_id: Uuid;
870
939
  }): Promise<RecordsResult<unknown>>;
871
940
  /** Every template that renders one Table. Viewer on the Table. */
@@ -1380,6 +1449,7 @@ declare const DOORS: {
1380
1449
  readonly readRecords: "read_records";
1381
1450
  readonly readRecordsByIds: "read_records_by_ids";
1382
1451
  readonly readRecordsMatching: "read_records_matching";
1452
+ readonly readRecordsArchived: "read_records_archived";
1383
1453
  readonly queryRecordAsOf: "query_record_as_of";
1384
1454
  readonly queryTableAsOf: "query_table_as_of";
1385
1455
  readonly recordWrite: "record_write";
@@ -1450,6 +1520,7 @@ declare const DOORS: {
1450
1520
  readonly bookingDeclare: "booking_declare";
1451
1521
  readonly importPlan: "io_import_plan";
1452
1522
  readonly importBegin: "io_import_begin";
1523
+ readonly importDeclareColumns: "io_import_declare_columns";
1453
1524
  readonly importRows: "io_import_rows";
1454
1525
  readonly importFinish: "io_import_finish";
1455
1526
  readonly importReport: "io_import_report";
@@ -1466,6 +1537,9 @@ declare const DOORS: {
1466
1537
  readonly portalInvite: "portal_invite";
1467
1538
  readonly portalRevoke: "portal_revoke";
1468
1539
  readonly portalPreview: "portal_preview";
1540
+ readonly listPortals: "list_portals";
1541
+ readonly portalArchive: "portal_archive";
1542
+ readonly portalRestore: "portal_restore";
1469
1543
  readonly dashboards: "dashboards";
1470
1544
  readonly dashboardDeclare: "dashboard_declare";
1471
1545
  readonly dashboardRun: "dashboard_run";
@@ -1514,7 +1588,7 @@ declare const DOORS: {
1514
1588
  readonly docTokens: "doc_tokens";
1515
1589
  readonly docUnresolvedTokens: "doc_unresolved_tokens";
1516
1590
  readonly docSign: "doc_sign";
1517
- readonly docSignatureIntact: "doc_signature_intact";
1591
+ readonly docSignatureRead: "doc_signature_read";
1518
1592
  readonly docTemplates: "doc_templates";
1519
1593
  readonly docTemplateDelete: "doc_template_delete";
1520
1594
  readonly docRenders: "doc_renders";
@@ -1696,4 +1770,4 @@ declare function parseCsv(text: string): string[][];
1696
1770
  declare function importCsv(text: string): ParsedImport;
1697
1771
  declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
1698
1772
 
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 };
1773
+ export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };
@@ -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-z68hD9VX.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 DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, aj as RelationDisplay, R as RelationFlavor, ak as RetiredActorWord, al as RuleNodeKind, am as RuleUse, an as STORAGE_MODES, ao as STORE_DOORS, ap as STORE_KNOBS, aq as STORE_REFUSAL_CODES, S as StorageMode, ar as StoreDoorName, as as StoreRefusalCode, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, a as TableDisplay, aw as TableOrigin, T as TableType, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, aE as err, aF as isRecordsErr, aG as ok } from '../field-z68hD9VX.js';
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-xRstzLKK.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-xRstzLKK.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, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.js';
4
+ export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, FIELD_KINDS, FieldKind, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey } from '../index.js';
5
5
 
6
6
  /**
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;
@@ -478,9 +502,24 @@ interface RecordsClient {
478
502
  force?: boolean;
479
503
  }): Promise<RecordsResult<ImportOpened>>;
480
504
  /**
481
- * One BATCH of rows. Every row is written through the ONE write door inside
482
- * its own subtransaction, so a refused row leaves nothing behind and never
483
- * costs the rows before it. Send a few hundred at a time.
505
+ * IMPORT-2. ADD THE COLUMNS THIS FILE HAS AND THIS TABLE HAS NOT — a step of
506
+ * its own, BEFORE the run is opened, so the screen can show "8 columns added"
507
+ * and the person can then name one of them as the file's duplicate key
508
+ * (`importBegin` refuses a key naming a column that does not exist yet).
509
+ * Answers the mapping the file should be sent with. Admin on the Table.
510
+ */
511
+ importDeclareColumns(args: {
512
+ table_id: Uuid;
513
+ rows: Array<Record<string, unknown>>;
514
+ /** Header -> Field key the person already mapped by hand; never declared. */
515
+ mapping?: Record<string, string>;
516
+ }): Promise<RecordsResult<ImportColumnsDeclared>>;
517
+ /**
518
+ * One BATCH of rows. The batch is PLANNED and then written as ONE statement
519
+ * through the batched write door, so 250 round trips became one; a batch a
520
+ * guard refuses falls back to one write a row, and the answer says which it
521
+ * was. Send `ImportOpened.rows_per_call` the first time and
522
+ * `ImportBatchResult.rows_per_call` — measured — every time after that.
484
523
  */
485
524
  importRows(args: {
486
525
  import_id: Uuid;
@@ -540,6 +579,33 @@ interface RecordsClient {
540
579
  }>>;
541
580
  /** Every portal over this organization the caller may know about, with its numbers. */
542
581
  portals(): Promise<RecordsResult<PortalSummary[]>>;
582
+ /**
583
+ * The SAME list, archive-aware. `custom.portals` keeps its signature and hides
584
+ * archived portals, because the archived-items law's default is to hide;
585
+ * this is the one door that also answers the other lane, so a rail gets the
586
+ * law's one-click reveal without inventing a second control or a second door.
587
+ * A fourth word is refused `22023` — there is no fourth answer on any surface.
588
+ */
589
+ listPortals(args?: {
590
+ archived?: PortalArchiveFilter;
591
+ }): Promise<RecordsResult<PortalSummary[]>>;
592
+ /**
593
+ * PUT ONE PORTAL AWAY. Nothing is deleted and there is no purge: every Table
594
+ * it exposes and every person invited to it is kept exactly as it is, and
595
+ * `portalRestore` hands it all back. `confirm_title` is the portal's own title
596
+ * typed back — ten portals can carry one title, so the title is not what picks
597
+ * this one and the door refuses `23514` when it does not match.
598
+ */
599
+ portalArchive(args: {
600
+ portal_id: Uuid;
601
+ confirm_title: string;
602
+ reason?: string | null;
603
+ }): Promise<RecordsResult<PortalArchiveAnswer>>;
604
+ /** The way back. Everyone invited signs in exactly as before, and it shows the same Tables. */
605
+ portalRestore(args: {
606
+ portal_id: Uuid;
607
+ confirm_title: string;
608
+ }): Promise<RecordsResult<PortalArchiveAnswer>>;
543
609
  /**
544
610
  * Which Tables each portal of this organization exposes.
545
611
  *
@@ -864,8 +930,11 @@ interface RecordsClient {
864
930
  signer_name: string;
865
931
  signer_user_id?: Uuid | null;
866
932
  }): Promise<RecordsResult<Uuid>>;
867
- /** Is what was signed still what is there? The store answers, never the screen. */
868
- docSignatureIntact(args: {
933
+ /**
934
+ * One signature: the seal AND whether what was signed is still what is there.
935
+ * The store answers both, in one call, never the screen. Viewer on the record.
936
+ */
937
+ docSignatureRead(args: {
869
938
  signature_id: Uuid;
870
939
  }): Promise<RecordsResult<unknown>>;
871
940
  /** Every template that renders one Table. Viewer on the Table. */
@@ -1380,6 +1449,7 @@ declare const DOORS: {
1380
1449
  readonly readRecords: "read_records";
1381
1450
  readonly readRecordsByIds: "read_records_by_ids";
1382
1451
  readonly readRecordsMatching: "read_records_matching";
1452
+ readonly readRecordsArchived: "read_records_archived";
1383
1453
  readonly queryRecordAsOf: "query_record_as_of";
1384
1454
  readonly queryTableAsOf: "query_table_as_of";
1385
1455
  readonly recordWrite: "record_write";
@@ -1450,6 +1520,7 @@ declare const DOORS: {
1450
1520
  readonly bookingDeclare: "booking_declare";
1451
1521
  readonly importPlan: "io_import_plan";
1452
1522
  readonly importBegin: "io_import_begin";
1523
+ readonly importDeclareColumns: "io_import_declare_columns";
1453
1524
  readonly importRows: "io_import_rows";
1454
1525
  readonly importFinish: "io_import_finish";
1455
1526
  readonly importReport: "io_import_report";
@@ -1466,6 +1537,9 @@ declare const DOORS: {
1466
1537
  readonly portalInvite: "portal_invite";
1467
1538
  readonly portalRevoke: "portal_revoke";
1468
1539
  readonly portalPreview: "portal_preview";
1540
+ readonly listPortals: "list_portals";
1541
+ readonly portalArchive: "portal_archive";
1542
+ readonly portalRestore: "portal_restore";
1469
1543
  readonly dashboards: "dashboards";
1470
1544
  readonly dashboardDeclare: "dashboard_declare";
1471
1545
  readonly dashboardRun: "dashboard_run";
@@ -1514,7 +1588,7 @@ declare const DOORS: {
1514
1588
  readonly docTokens: "doc_tokens";
1515
1589
  readonly docUnresolvedTokens: "doc_unresolved_tokens";
1516
1590
  readonly docSign: "doc_sign";
1517
- readonly docSignatureIntact: "doc_signature_intact";
1591
+ readonly docSignatureRead: "doc_signature_read";
1518
1592
  readonly docTemplates: "doc_templates";
1519
1593
  readonly docTemplateDelete: "doc_template_delete";
1520
1594
  readonly docRenders: "doc_renders";
@@ -1696,4 +1770,4 @@ declare function parseCsv(text: string): string[][];
1696
1770
  declare function importCsv(text: string): ParsedImport;
1697
1771
  declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
1698
1772
 
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 };
1773
+ export { AggregateBucket, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FormSummary, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordFilter, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsResult, RelationCoordinate, ResolvedPublishBinding, RestorePreview, RestoreResult, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableCapacity, TableProposal, Timestamp, Uuid, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, asWriteConflict, cellText, createRecordsClient, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, importCsv, importXlsx, intersectIds, mapPgError, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa };