import { j as RecordsError, R as RecordsResult, l as RecordDocument, q as PredictedRefusal, r as ReadValue, U as Uuid } from '../record-C3thPhpR.cjs'; export { s as ABSENCE_REASONS, t as ACTOR_VOCABULARY, u as AbsenceReason, A as Actor, v as COMPUTE_ON, w as CONTEXT_POLICIES, C as ComputeOn, c as ContextPolicy, x as DECLARABLE_FIELD_KINDS, y as DELIVERIES, D as DeclarableFieldKind, z as Delivery, E as ENTITY_TOKENS, B as EntityToken, G as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FORMULA_NODE_RESULTS, K as FRESHNESS, o as FieldBehavior, b as FieldSensitivity, F as FieldSource, L as ForbiddenEnvelopeWord, M as Freshness, H as HiddenFieldNotice, N as KERNEL_TABLES, Q as KernelTableName, V as KeysetRow, W as MERGE_FIELD_MODIFIERS, X as MERGE_FIELD_SEMANTIC_TYPES, Y as MERGE_FIELD_SOURCES, Z as MergeFieldModifier, _ as MergeFieldSemanticType, $ as MergeFieldSource, a0 as ON_DELETE, a1 as OVERRIDE_POLICIES, O as OnDelete, a2 as OverridePolicy, a3 as PARITY_FIELD_TYPES, a4 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a5 as PerValueAccessWord, P as PgError, a6 as ProvenancePointer, a7 as RELATION_BINDINGS, a8 as RELATION_CARDINALITIES, a9 as RELATION_FLAVORS, aa as RETIRED_ACTOR_WORDS, ab as RULE_NODE_KINDS, ac as RULE_USES, n as ReadRow, ad as RecordChange, ae as RecordChangeResult, af as RecordGraphWritten, ag as RecordKeysetPage, ah as RecordPage, m as RecordPageSort, ai as RecordRead, aj as RecordRevision, k as RecordsErrorCode, f as RelationBinding, e as RelationCardinality, d as RelationFlavor, ak as RetiredActorWord, h as RuleNodeKind, i as RuleUse, al as STORAGE_MODES, am as STORE_DOORS, an as STORE_KNOBS, ao as STORE_REFUSAL_CODES, ap as StaleWriteDetail, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as StoredRecord, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, a as TableDisplay, aw as TableOrigin, T as TableType, g as Timestamp, 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 WriteConflict, aF as err, aG as isLockedStub, aH as isRecordsErr, aI as ok, aJ as splitLockedRows, aK as unwrapRecords } from '../record-C3thPhpR.cjs'; import { R as RecordsClient } from '../client-CCDI4mfn.cjs'; export { A as ARCHIVE_LANES, a as ARCHIVE_LANE_LABEL, b as ARCHIVE_LANE_MEANS, c as AUTOMATION_APP_TRIGGERS, d as ActionRefusal, e as ActionRunResult, f as AdminTable, g as AnonTokenBinding, h as ArchiveLane, i as ArchivedChecklistTemplate, j as ArchivedDoorRow, k as ArchivedForm, l as ArchivedRow, m as AsOf, n as AutomationAction, o as AutomationAppTrigger, p as AutomationAppTriggerTerms, q as AutomationComparison, r as AutomationDeclared, s as AutomationFilter, t as AutomationFlipped, u as AutomationItem, v as AutomationLastRun, w as AutomationList, x as AutomationRevision, y as AutomationRevisions, z as AutomationRun, B as AutomationRunStatus, C as AutomationRuns, D as AutomationSpec, E as AutomationStep, G as AutomationTested, H as AutomationToken, I as AutomationTrigger, J as AutomationValue, K as AutomationValues, L as AutomationWeekday, M as AutomationWhen, N as BUILT_KIND_WORD, O as CHOICE_NUDGES, P as CaptureField, Q as CaptureFileRef, S as CaptureOutcome, U as CaptureQuestion, V as CaptureSheetFace, W as CaptureSheetSummary, X as ChecklistDeclared, Y as ChecklistRequirement, Z as ChecklistRequirementKind, _ as ChecklistRoleSpec, $ as ChecklistRunStarted, a0 as ChecklistRunStep, a1 as ChecklistRunSummary, a2 as ChecklistSpec, a3 as ChecklistStepCompleted, a4 as ChecklistStepSpec, a5 as ChecklistTemplateShape, a6 as ChecklistTemplateSummary, a7 as ChecklistTrigger, a8 as ChecklistTriggerKind, a9 as ChoiceCellBack, aa as ChoiceLike, ab as ChoiceNudge, ac as ChoiceOption, ad as ChoiceRehome, ae as ChoiceUsage, af as ChoicesRehomed, ag as CommentThreadRead, ah as CommentWritten, ai as ConversationScope, aj as ConversationScopeContext, ak as CustomFieldTableType, al as DEFAULT_ARCHIVE_LANE, am as DEFAULT_PAGE_SIZE, an as DRILL_CHART_TOKENS, ao as DRILL_DESCRIPTION_MAX, ap as DRILL_DOORS, aq as DRILL_SCHEMA, ar as DataHomeTable, as as DecorationColor, at as DecorationPath, au as DecorationRule, av as DecorationRuleOp, aw as DecorationTarget, ax as DocRenderRow, ay as DocSignatureCheck, az as DocSignatureRow, aA as DocTemplateRow, aB as DocToken, aC as DocUnresolvedToken, aD as DrillAdHocOp, aE as DrillAnswer, aF as DrillAnswerRow, aG as DrillChartToken, aH as DrillDeclaration, aI as DrillDefinition, aJ as DrillDimension, aK as DrillFinding, aL as DrillGrain, aM as DrillHaving, aN as DrillLane, aO as DrillLevel, aP as DrillMeasure, aQ as DrillMeasureOp, aR as DrillMeasureWhereValue, aS as DrillPath, aT as DrillQuestion, aU as DrillRecords, aV as DrillRowsPage, aW as DrillSource, aX as DrillView, aY as EnrichAlternate, aZ as EnrichCell, a_ as EnrichDeclared, a$ as EnrichDueRow, b0 as EnrichRun, b1 as EnrichSource, b2 as Enrichment, b3 as EnrichmentSummary, b4 as EntityBackLinkItem, b5 as EntityBackLinks, b6 as EntityFieldRights, b7 as EntityFieldValue, b8 as EntityFieldsAcross, b9 as EntityRecordMatch, ba as EntityRecordRead, bb as EntityRecordsFound, bc as EntityRowWritten, bd as EntityTableFacts, be as ExternalPrincipalCard, F as FieldDrift, bf as FieldDriftAspect, bg as FieldHistoryEntry, bh as FieldNotifyOnAssign, bi as FieldRetypePreview, bj as FieldRetyped, bk as FormArchiveAnswer, bl as FormulaHistoryEntry, bm as FormulaParse, bn as FormulaPreview, bo as GridLayout, bp as GridLayoutMode, bq as GridRowHeight, br as HistoryActor, bs as HistoryActorKind, bt as HistoryChange, bu as HistoryRetention, bv as Home, bw as ImportBatchResult, bx as ImportColumnPlan, by as ImportColumnsDeclared, bz as ImportFinished, bA as ImportOpened, bB as ImportOutcome, bC as ImportPlan, bD as ImportPolicy, bE as ImportProposal, bF as ImportReport, bG as ImportRun, bH as InboundAddress, bI as InboundDeclared, bJ as InboxCounts, bK as InboxStateChange, bL as IoExportPage, bM as MigrationEntry, bN as MigrationUndone, bO as NewEntityFieldDeclaration, bP as OutsideShareAnswer, bQ as PIPELINE_RULE_KINDS, bR as ParentExtracted, bS as Pipeline, bT as PipelineColumn, bU as PipelineDeclared, bV as PipelineGate, bW as PipelineGatePreview, bX as PipelineMissingField, bY as PipelineMoveMany, bZ as PipelineMoveManyItem, b_ as PipelineMoveManyResult, b$ as PipelineMoveResult, c0 as PipelineMoveVerdict, c1 as PipelineRule, c2 as PipelineRuleKind, c3 as PipelineSpec, c4 as PipelineStage, c5 as PipelineVerdict, c6 as PromotedPredicate, c7 as PublishBinding, c8 as PublishBindingKind, c9 as QueryPlan, ca as RECORDS_LIMITS_DEFAULTS, cb as ROW_LABEL_FORMULA_MAX_LENGTH, cc as ROW_WEB_NOT_READY, cd as RecordChangeAction, ce as RecordComment, cf as RecordEvent, cg as RecordFollowSet, ch as RecordFollowers, ci as RecordHeader, cj as RecordHistoryEntry, ck as RecordMoved, cl as RecordQuery, cm as RecordRowControls, cn as RecordScopeComment, co as RecordScopeContext, cp as RecordScopeField, cq as RecordScopeHistoryEntry, cr as RecordScopeRelation, cs as RecordScopeWithheld, ct as RecordSplit, cu as RecordsLimits, cv as RecordsMerged, cw as RegisteredTable, cx as ResolvedPublishBinding, cy as ResolvedPublishBindingKind, cz as RestorePreview, cA as RestoreResult, cB as RetypeBehaviour, cC as RetypePreview, cD as RowAction, cE as RowActionStep, cF as RowDefaultsApplied, cG as SHOWN_TO_LABEL, cH as SHOWN_TO_VALUES, cI as SHOWN_TO_WHO_MAY_CHANGE, cJ as STAGE_RULE_ENFORCEMENT, cK as STAGE_RULE_ON_FAIL, cL as ShownTo, cM as StagePending, cN as StagePendingOnBoard, cO as StageRuleEnforcement, cP as StageRuleOnFail, cQ as StageRuleWarning, cR as SyncAutoRefresh, cS as Table, T as TableArchiveProgress, cT as TableCapacity, cU as TableCopyInProgress, cV as TableCopySpec, cW as TableDecorations, cX as TableDuplicateProgress, cY as TableDuplicated, cZ as TableFact, c_ as TableHome, c$ as TableHomeDestination, d0 as TableLevel, d1 as TableLevelApproval, d2 as TableLevelFacts, d3 as TableLevelSet, d4 as TableListEntry, d5 as TableLiveLocation, d6 as TableMoved, d7 as TablePlacement, d8 as TablePlacementFact, d9 as TableReaderRule, da as TableRestoreProgress, db as TableRowCount, dc as TableRowDefaults, dd as TableRowDefaultsPatch, de as TableRowLabel, df as TableSyncAnswer, dg as TableSyncResult, dh as TableSyncSettings, di as TableSyncSource, dj as TableSyncSourceDocument, dk as TableSyncSpec, dl as TableWebhook, dm as TableWebhookDeclared, dn as TypedChoiceDecision, dp as ViewLayout, dq as ViewOrderSet, dr as WorkApprovalDecision, ds as WorkApprovalFiled, dt as WorkApprovalState, du as WorkApprover, dv as WorkAssignment, dw as WorkAssignmentField, dx as WorkChange, dy as WorkDecideMany, dz as WorkDecideManyItem, dA as WorkDecideManyResult, dB as WorkDecideVerdict, dC as WorkDueState, dD as WorkGraph, dE as WorkInboxItem, dF as WorkInboxKind, dG as WorkInboxView, dH as WorkInstantiation, dI as WorkListFlavour, dJ as WorkListItem, dK as WorkOrigin, dL as WorkRecordState, dM as WorkSlotHold, dN as WorkState, dO as WorkTemplateNode, dP as WorkTemplateRelation, dQ as WorkTurn, dR as actionRefusals, dS as archivedByLine, dT as archivedWhen, dU as asChoiceNudge, dV as asWriteConflict, dW as automationWebhookUrl, dX as choiceSlug, dY as choiceValuesOf, dZ as choicesOf, d_ as clearsRowLabel, d$ as createRecordsClient, e0 as decideTypedChoice, e1 as declareDrillDefinition, e2 as drillAnswerOf, e3 as drillFindingKnob, e4 as emptyArchiveLine, e5 as exportPageXlsx, e6 as holdsARetiredChoice, e7 as intersectIds, e8 as isArchiveLane, e9 as isAutomationAppTrigger, ea as isFoundation, eb as isShownTo, ec as isTheChosen, ed as keptGroups, ee as keptOutOfSight, ef as keptTableHref, eg as levelHasShownTo, eh as looksLikeAnId, ei as mayDrag, ej as moveConsequence, ek as moveInOrder, el as offeredAsContext, em as optionKey, en as optionLabel, eo as parseFieldDrift, ep as parseTableCopiesInProgress, eq as parseTableDuplicateProgress, er as parseTableDuplicated, es as parseTableHome, et as parseTableMoved, eu as planQuery, ev as previewRetype, ew as previewRuleChange, ex as recordChangeTrigger, ey as recordSourceKey, ez as recordSourceTable, eA as recordsLimitsFrom, eB as recordsUseSentence, eC as rehomeSentence, eD as removedChoicesInUse, eE as ruleThatRefuses, eF as rulesWithTopStar, eG as sameDocument, eH as scopeChip, eI as sheetSyncSpec, eJ as valueConverts, eK as withRowCounts, eL as withTableFacts, eM as withTablePlacement } from '../client-CCDI4mfn.cjs'; import { c as RecordsDataSource } from '../ports-BSd-1p1l.cjs'; export { M as MyLevel, O as OpLedger, P as PermissionLevel, g as RecordsActor, d as RecordsChangeSink, R as RecordsConfig, b as RecordsErrorSink, h as RecordsFilter, f as RecordsRealtimePort, i as RecordsResolverPort, j as RecordsResponse, k as RecordsTableQuery, a as RowAgentPort, e as RowAgentTarget, S as STORE_PERMISSION_LEVELS, l as asPermissionLevel, m as atLeast, n as createOpLedger, o as defaultOpLedger, p as forgetAllOps, q as highestLevel, r as isOwnOp, s as mintOpId, t as rememberedOpCount } from '../ports-BSd-1p1l.cjs'; import { F as Field } from '../field-BJBjyD8y.cjs'; export { A as ADDRESS_PARTS, c as AGENT_WRITER_WORDS, d as AddressPart, e as AddressValue, B as BARCODE_SYMBOLOGIES, f as BUTTON_DOES, g as ButtonDoes, h as ButtonPressed, i as ButtonSettings, C as ChoiceOptions, j as CoerceOptions, k as Coerced, l as CoercedAnswers, m as CoercibleField, n as FIELD_KINDS, o as FieldDuplicated, p as FieldKind, q as FieldOptionEdit, r as FieldPatch, s as FieldProposal, b as FieldRule, a as FieldTypeWord, K as KernelTargets, N as NEWER_FIELD_KINDS, t as NOT_A_MEMBER_WORDS, u as NewFieldDeclaration, v as NewerFieldKind, P as ParityFieldTypeDescriptor, w as PersonStamp, R as RelationDisplay, x as RelationNameIndex, y as RelationNameMatch, z as RelationNamesAnswer, S as STATUS_GROUPS, D as STATUS_GROUP_WORDS, E as SYSTEM_WRITER_WORDS, G as StatusGroup, T as TableProposal, H as addressFromText, I as addressMapUrl, J as addressValueText, L as allowsOtherValues, M as buttonNeeds, O as buttonOf, Q as buttonUrlPlaceholders, U as coerceTypedAnswer, V as coerceTypedAnswers, W as coercionLabel, X as durationText, Y as entityReferenceKindsOf, Z as fieldKindFor, _ as isAddressValue, $ as isButtonField, a0 as isEntityReferenceConfig, a1 as isPersonStamp, a2 as newerKindExportWords, a3 as newerKindOf, a4 as newerKindWords, a5 as personStampText, a6 as ratingMaxOf, a7 as readTypedDuration, a8 as relationNameIndexOf, a9 as relationNameKey, aa as relationNamesIn, ab as richTextPlain, ac as safeLinkHref, ad as splitListCell, ae as statusGroupOf } from '../field-BJBjyD8y.cjs'; export { AI_FIELD_PRESETS, AiAutofillKind, AiFieldPreset, AiPresetAsk, AiPresetContext, AiPresetKey, BaseCopied, BaseCopyProgress, BaseCopyResult, BasePort, BaseSnapshotRecord, BaseTable, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChooseAlternateArgs, EVERY_RECORD_TYPE, EnrichInputField, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, NamesRecordTypes, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, REFUSALS_WORTH_REPEATING, ResolutionTriple, SetValuePeriodsArgs, TypedDate, TypedMatchScore, TypedNumber, TypedTime, ValuePeriod, WallParts, aiFieldPreset, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, baseCopyName, chooseAlternate, copyIdOfRefusal, defaultEnrichInputs, derivedLookOf, duplicateBase, fieldAppliesToEveryType, fieldAppliesToType, filterWithAutonumber, formulaLookOf, indexedDbStore, instantFromWallInZone, isAutonumberField, isDecided, isDerivedField, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, periodInForce, pickedLookOf, presetInputs, presetInstruction, presetsFor, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, recordTypeOf, restoreSnapshot, restoredBaseName, setValuePeriods, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText, typesOfField, valuePeriodsOf, valuePeriodsPatch, valuePeriodsProblem, wallPartsInZone, withDerivedLooks, withFormulaLooks, withinSensitivityCeiling } from '../index.cjs'; export { A as A_PERSONS_REFUSAL, h as PickListDocument, j as PickListIndexDocument, k as PickListIndexEntry, l as PickListItem, m as PickListItemInput, i as isAPersonsRefusal } from '../pickListDoors-cMy0JEig.cjs'; export { B as BookingAvailability, a as BookingDeclared, b as BookingSummary, c as BookingWindow, d as FormResults, e as FormRoute, F as FormSummary, f as Rule, g as RuleAnswer, R as RuleExpression, h as bookingPath, p as publicFormPath } from '../rule-Ch4aZVWV.cjs'; export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions, a as PORTAL_ACCENTS, b as PORTAL_ARCHIVE_FILTERS, P as PortalAccent, c as PortalArchiveAnswer, d as PortalArchiveFilter, e as PortalCard, f as PortalConfig, g as PortalConfigInput, h as PortalFooterLink, i as PortalFormAnswer, j as PortalFormInput, k as PortalFormRef, l as PortalFormSpec, m as PortalInvitation, n as PortalPreviewRow, o as PortalPrincipal, p as PortalRevocation, q as PortalStage, r as PortalStyle, s as PortalStyleInput, t as PortalSummary, u as PortalTableExposure, v as PortalTableRef, w as PublicPicture, x as emptyPortalArchiveLine, y as isPortalAccent, z as isPortalArchiveFilter, A as portalArchiveConsequence, B as portalConfirmLine, C as portalPath, E as portalTitleTypedBack } from '../portal-Cd8TMBAQ.cjs'; export { A as AggregateBucket, e as AggregateCompare, f as AggregateCompareKind, g as AggregateCompareWindows, h as AggregateDelta, b as AggregateFilter, j as AggregateGroupValue, c as AggregateMeasure, a as AggregateOperation, k as AggregateRow, l as AggregateWindow, m as DashboardBlock, D as DashboardBlockKind, n as DashboardBlockResult, o as DashboardRunResult, p as DashboardSummary, q as DashboardTarget, r as DashboardTargetBase, s as DashboardTargetOp, t as DashboardTargetResult, u as DashboardTotals, v as DigestPreview, F as FilterWords, I as InterfaceRead, w as InterfaceRows, x as InterfaceRowsField, M as MySubscription, Q as QuietHours, R as RecordFilter, y as RowTemplateRow, z as SavedViewColorBy, B as SavedViewDefinition, C as SavedViewLayout, d as SavedViewRow, E as SavedViewSpecIn, G as StoreFilter, H as StuckRow, J as Subscription, K as SubscriptionBlock, S as SubscriptionCadence, L as SubscriptionSpec, N as callersTimeZone, O as cellMatchesWords, P as filterWordsOf, T as hasQuietHours, i as isRuleFilter, U as liftWithheld, V as measureKey, W as stableFilterKey, X as withCallersClock } from '../subscription-BRwuydeh.cjs'; export { R as RELATIVE_DAY_KINDS, a as RelativeDayKind, b as RelativeFieldLookup, c as RelativeWindowOptions, h as holdsRelativeDays, l as lookupFromFields, r as readersTimeZone, d as relativeWindowBounds, e as resolveRelativeDays, s as setReadersTimeZone, w as weekStartIndexOf } from '../relativeDays-CFZpGUdI.cjs'; export { a as EntityRef, E as EntityRefWithWords, b as EntityReferenceKind, R as REVERSE_LINKS_PAGE_MAX, c as REVERSE_LINKS_RECORDS_PER_CALL, d as Relation, e as RelationCarries, f as RelationCoordinate, g as RelationIcons, h as RelationProperties, i as RelationTarget, j as RelationWordsManyArgs, k as ReverseColumn, l as ReverseLink, m as ReverseLinks, n as ReverseLinksFieldsArgs, o as ReverseLinksManyArgs, S as SourceArchived, p as entityReferenceKinds, q as entityReferenceSearch, r as entityReferenceWords, s as entityRefsOf, t as entityRefsToWrite, u as isReverseField, v as sourceArchivedOf } from '../relation-DuY2Eis-.cjs'; export { O as ObjectKind, a as ObjectOrganizationAnswer, c as OpeningViewShape, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, d as readOpeningViewShape, b as resolveObjectOrganization, w as whereIdOpensPort } from '../objectOrganization-DLLY7HMV.cjs'; import { TableKindFacts } from '../table-kind/index.cjs'; export { TABLE_KIND_PREFIX, TableRenderSchema, TableSchemaMode, fieldKindOf, isTableKind, tableIdOf, tableJsonSchema, tableKindMapping, tableKindSlug, tableRenderSchema } from '../table-kind/index.cjs'; export { D as DEFAULT_FIELDS, a as DeclareResult, E as EnsureResult, N as NewFieldSpec, b as NewTableSpec, c as addFields, d as declareTable, e as ensureTable, f as fieldDeclarationFor, t as tokenFor } from '../index-CXKR7hq9.cjs'; export { o as BulkCellOp, p as BulkDeleteOp, q as BulkInsertOp, r as BulkMergeOp, t as BulkOp, B as BulkOpError, a as BulkOpResult, u as BulkUpdateOp, v as BulkWriteResponse, D as DatasetField, w as DatasetRow, F as FieldDataType, J as Json, S as STORE_SCHEMA, b as ServiceErr, c as ServiceOk, d as ServiceResult, e as StoreCaller, f as StoreDoorAnswer, g as StoreDoorError, h as StoreDoors, i as SupabaseLike, j as asRecordsDataSource, k as describeBulkFailures, x as inferDataType, l as isBulkOpError, m as isServiceFailure, y as sanitizeFieldName, s as storeDoors, n as supabaseDataSource, z as validateFieldName } from '../table-logic-CIWcUW9o.cjs'; export { M as MAPPED_SQLSTATES, T as TIMED_OUT_MESSAGE, a as archivedOrganizationId, m as mapPgError, b as mapThrownError, s as staleWriteDetail } from '../results-light-DP847c0K.cjs'; import '../doors-CBiSnfzU.cjs'; declare function clientInOrganization(client: C, organizationId: string | null | undefined): C; declare function doorExists(name: string): boolean; /** * MAY A SCREEN ASK THIS DOOR AT ALL. True when the generated catalog lists it, or the config says * this store already has it (`RecordsConfig.knownDoors`). A door that is only OWED is not asked — so * before the chair's apply nothing is called and nothing is logged, and on the day the regenerated * catalog lists it the same screen starts asking with no code change. */ declare function doorReady(config: { knownDoors?: readonly string[] | undefined; } | null | undefined, name: string): boolean; /** The refusal a missing door gets. It always says who owes it. */ declare function doorAbsent(name: string): RecordsError; /** The doors this package calls, one place, so the suite can walk them. */ declare const DOORS: { readonly readRecord: "read_record"; readonly readRecords: "read_records"; readonly readRecordsByIds: "read_records_by_ids"; readonly readRecordsMatching: "read_records_matching"; readonly readRecordsPage: "read_records_page"; readonly readRecordsKeyset: "read_records_keyset"; readonly readRecordsArchived: "read_records_archived"; readonly queryRecordAsOf: "query_record_as_of"; readonly historyRetention: "history_retention"; readonly historyRetentionSet: "history_retention_set"; readonly historyRetentionFloorRaise: "history_retention_floor_raise"; readonly queryTableAsOf: "query_table_as_of"; readonly recordWrite: "record_write"; readonly recordWriteMany: "record_write_many"; readonly recordChangeMany: "record_change_many"; readonly recordWriteGraph: "record_write_graph"; readonly recordUpdate: "record_update"; readonly recordUpdateAddingChoices: "record_update_adding_choices"; readonly choiceNudge: "choice_nudge"; readonly fieldChoiceUsage: "field_choice_usage"; readonly fieldUpdateRehomingChoices: "field_update_rehoming_choices"; readonly recordDelete: "record_delete"; readonly recordRestore: "record_restore"; readonly migrateRetype: "migrate_retype"; readonly migrateMerge: "migrate_merge"; readonly migrateUndo: "migrate_undo"; readonly migrateSplit: "migrate_split"; readonly migrateExtractParent: "migrate_extract_parent"; readonly migrations: "migrations"; readonly recordValues: "record_values"; readonly recordValuesVersioned: "record_values_versioned"; readonly valueRead: "value_read"; readonly computedProvenance: "computed_provenance"; readonly recordApplicability: "record_applicability"; readonly applicableFields: "applicable_fields"; readonly fieldOptions: "field_options"; readonly pickListIndex: "pick_list_index"; readonly pickListGet: "pick_list_get"; readonly pickListForSelection: "pick_list_for_selection"; readonly pickListUpdate: "pick_list_update"; readonly parityValues: "parity_values"; readonly tableDeclare: "table_declare"; readonly tableCreate: "table_create"; readonly tableArchive: "table_archive"; readonly tableArchiveDeliberately: "table_archive_deliberately"; readonly tableRestore: "table_restore"; readonly fieldDeclare: "field_declare"; readonly fieldDeclareMany: "field_declare_many"; readonly fieldUpdate: "field_update"; readonly fieldRetypePreview: "field_retype_preview"; readonly fieldRetire: "field_retire"; readonly fieldRestore: "field_restore"; readonly fieldDuplicate: "field_duplicate"; readonly fieldSourceArchived: "field_source_archived"; readonly tableKindFacts: "table_kind_facts"; readonly tableLevelFacts: "table_level_facts"; readonly setTableConfidential: "set_table_confidential"; readonly setTableOrganization: "set_table_organization"; readonly entityTable: "entity_table"; readonly entityFields: "entity_fields"; readonly entityFieldsAcross: "entity_fields_across"; readonly entityFieldDeclare: "entity_field_declare"; readonly entityFieldUpdate: "entity_field_update"; readonly entityFieldRetire: "entity_field_retire"; readonly entityFieldRights: "entity_field_rights"; readonly entityRecordRead: "entity_record_read"; readonly entityBackLinks: "entity_back_links"; readonly entityRowWrite: "entity_row_write"; readonly entityRecordsFind: "entity_records_find"; readonly tableCapacity: "table_capacity"; readonly tableStorage: "table_storage"; readonly promoteTable: "promote_table"; readonly promoteField: "promote_field"; readonly promotedFields: "promoted_fields"; readonly promotedRead: "promoted_read"; readonly relationTargets: "relation_targets"; readonly relationOwn: "relation_own"; readonly relationWords: "relation_words"; readonly relationWordsMany: "relation_words_many"; readonly relationWordsWithIconsMany: "relation_words_with_icons_many"; readonly relationNamesMatch: "relation_names_match"; readonly reverseColumns: "reverse_columns"; readonly reverseLinksMany: "reverse_links_many"; readonly reverseLinksManyFields: "reverse_links_many_fields"; readonly relationReverseField: "relation_reverse_field"; readonly formulaPreview: "formula_preview"; readonly relationReverseSet: "relation_reverse_set"; readonly homeAdd: "home_add"; readonly tableHomesNamed: "table_homes_named"; readonly recordReparent: "record_reparent"; readonly containmentChain: "containment_chain"; readonly storeIsOpen: "store_is_open"; readonly myLevels: "my_levels"; readonly ioRevisions: "io_revisions"; readonly resolveFirstMatch: "resolve_first_match"; readonly personKernelId: "person_kernel_id"; readonly fieldKernelId: "field_kernel_id"; readonly ruleKernelId: "rule_kernel_id"; readonly tableKernelId: "table_kernel_id"; readonly pipelineDeclare: "pipeline_declare"; readonly pipelineRead: "pipeline_read"; readonly pipelineBoard: "pipeline_board"; readonly pipelineTransitionRefusal: "pipeline_transition_refusal"; readonly pipelineMove: "pipeline_move"; /** Lane S4: many cards, one call, a verdict and a version per card. */ readonly pipelineMoveMany: "pipeline_move_many"; readonly tableStageField: "table_stage_field"; readonly stageRuleOnFailKinds: "stage_rule_on_fail_kinds"; readonly stageRuleEnforcement: "stage_rule_enforcement"; readonly recordStagePending: "record_stage_pending"; readonly pipelinePending: "pipeline_pending"; readonly pipelineGatePreview: "pipeline_gate_preview"; readonly ruleMembers: "rule_members"; readonly ruleMembersVisible: "rule_members_visible"; readonly ruleMembership: "rule_membership"; readonly ruleRun: "rule_run"; readonly ruleEval: "rule_eval"; readonly forms: "forms"; readonly formDeclare: "form_declare"; /** * WHICH QUESTIONS THE OWNER'S PREVIEW ASKS NEXT (lane FORMS-FIX-1). The same store answer a * stranger's form gets (`custom._form_questions_asked` → `custom.rule_eval`), behind the * organization wall and the caller's own rung on the Table — never `rule_eval` from a browser. */ readonly formPreviewAsks: "form_preview_asks"; /** TYPEFORM-DUP: the owner's preview of the whole route — jumps, ending, score (`custom._form_route`). */ readonly formPreviewRoute: "form_preview_route"; /** TYPEFORM-DUP: views, starts, completions, drop-off and answers per question. */ readonly formResults: "form_results"; readonly formKnobs: "form_knobs"; readonly formLookOptions: "form_look_options"; /** CD-PAGE-08: set, clear or read a public form's password (only its hash is kept). */ readonly formSetPassword: "form_set_password"; readonly bookings: "bookings"; readonly bookingDeclare: "booking_declare"; readonly importPlan: "io_import_plan"; readonly importBegin: "io_import_begin"; readonly importDeclareColumns: "io_import_declare_columns"; readonly importRows: "io_import_rows"; readonly importFinish: "io_import_finish"; readonly importReport: "io_import_report"; readonly imports: "io_imports"; readonly importForget: "io_import_forget"; readonly inferColumn: "io_infer_column"; readonly inboundDeclare: "inbound_declare"; readonly inboundAddresses: "inbound_addresses"; readonly inboundSet: "inbound_set"; readonly portals: "portals"; readonly portalTables: "portal_tables"; readonly tableFacts: "table_facts"; readonly tablesLiveWhere: "where_tables_live"; readonly tableHome: "table_home"; readonly tableMove: "table_move"; readonly baseMove: "base_move"; readonly portalCard: "portal_card"; readonly portalDeclare: "portal_declare"; readonly portalInvite: "portal_invite"; readonly portalRevoke: "portal_revoke"; readonly portalPreview: "portal_preview"; readonly portalForm: "portal_form"; readonly portalFormSubmit: "portal_form_submit"; readonly listPortals: "list_portals"; readonly portalArchive: "portal_archive"; readonly portalRestore: "portal_restore"; readonly formArchive: "form_archive"; readonly formRestore: "form_restore"; readonly formsArchived: "forms_archived"; readonly checklistTemplatesArchived: "checklist_templates_archived"; readonly tableRowDefaults: "table_row_defaults"; readonly tableRowDefaultsSet: "table_row_defaults_set"; readonly tableRowDefaultsApply: "table_row_defaults_apply"; readonly tableRowLabel: "table_row_label"; readonly tableRowLabelSet: "table_row_label_set"; readonly recordRowControls: "record_row_controls"; readonly recordRowControlsSet: "record_row_controls_set"; readonly dashboards: "dashboards"; readonly dashboardDeclare: "dashboard_declare"; readonly dashboardRun: "dashboard_run"; readonly dashboardStuck: "dashboard_stuck"; readonly dashboardDelete: "dashboard_delete"; readonly interfaceRead: "interface_read"; readonly interfaceRows: "interface_rows"; readonly interfaceChart: "interface_chart"; readonly captureSheetDeclare: "capture_sheet_declare"; readonly capturePublish: "capture_publish"; readonly captureSheets: "capture_sheets"; readonly captureOpen: "capture_open"; readonly captureSubmit: "capture_submit"; readonly enrichments: "enrichments"; readonly enrichDeclare: "enrich_declare"; readonly enrichDue: "enrich_due"; readonly enrichCells: "enrich_cells"; readonly enrichLand: "enrich_land"; readonly enrichPin: "enrich_pin"; readonly enrichRuns: "enrich_runs"; readonly recordHistory: "record_history"; readonly fieldHistory: "field_history"; readonly formulaHistory: "formula_history"; readonly restorePreview: "record_restore_preview"; readonly restoreVersion: "record_restore_version"; readonly valueRestore: "value_restore"; readonly recordScopeContext: "record_scope_context"; readonly conversationScope: "conversation_scope"; readonly conversationScopeBind: "conversation_scope_bind"; readonly conversationScopeUnbind: "conversation_scope_unbind"; readonly conversationScopeContext: "conversation_scope_context"; readonly commentThread: "comment_thread"; readonly commentCounts: "comment_counts"; readonly commentWrite: "comment_write"; readonly commentResolve: "io_comment_resolve"; readonly recordFollowSet: "record_follow_set"; readonly recordFollowers: "record_followers"; readonly recordAggregate: "record_aggregate"; readonly recordAggregateAsOf: "record_aggregate_as_of"; readonly aggOperations: "agg_operations"; readonly aggBuckets: "agg_buckets"; readonly aggCalendar: "agg_calendar"; readonly aggSubscriptions: "agg_subscriptions"; readonly aggSubscriptionCadences: "agg_subscription_cadences"; readonly subscriptions: "subscriptions"; readonly subscriptionMute: "subscription_mute"; readonly subscriptionDeclare: "subscription_declare"; readonly subscriptionPreview: "subscription_preview"; readonly views: "views"; readonly viewDeclare: "view_declare"; readonly rowTemplates: "row_templates"; readonly rowTemplateDeclare: "row_template_declare"; readonly viewDesignate: "view_designate"; readonly viewLookRead: "view_look_read"; readonly viewLookSet: "view_look_set"; readonly subscriptionCadences: "subscription_cadences"; readonly docTemplateSave: "doc_template_save"; readonly docRenderBody: "doc_render_body"; readonly docRenderDocument: "doc_render_document"; readonly docTokens: "doc_tokens"; readonly docUnresolvedTokens: "doc_unresolved_tokens"; readonly docSign: "doc_sign"; readonly docSignatureRead: "doc_signature_read"; readonly docTemplates: "doc_templates"; readonly docTemplateDelete: "doc_template_delete"; readonly docTemplateRestore: "doc_template_restore"; readonly docRenderDelete: "doc_render_delete"; readonly docRenderRestore: "doc_render_restore"; readonly docRenders: "doc_renders"; readonly docSignatures: "doc_signatures"; readonly anonTokenIssue: "anon_token_issue"; readonly anonTokenVerify: "anon_token_verify"; readonly anonTokenRevoke: "anon_token_revoke"; /** The stranger's write. The TOKEN names the organization; a caller never does. */ readonly anonWrite: "anon_write"; /** SCR-30. The signed-in OFFLINE path: the client mints the key, the store dedupes on it. */ readonly anonCapture: "anon_capture"; readonly anonPublish: "anon_publish"; readonly workStates: "work_states"; readonly workTemplateDeclare: "work_template_declare"; readonly workTemplateInstantiate: "work_template_instantiate"; readonly workTemplateShape: "work_template_shape"; /** Why a graph would be refused — asked BEFORE it is written, never after. */ readonly workTemplateRefusal: "work_template_refusal"; readonly workWhoseTurn: "work_whose_turn"; readonly workTakeAssignment: "work_take_assignment"; readonly workHasAssignment: "work_has_assignment"; readonly workAssignmentFields: "work_assignment_fields"; readonly workTransitionRefusal: "work_transition_refusal"; readonly workInstantiationShape: "work_instantiation_shape"; readonly workSlotsDeclare: "work_slots_declare"; readonly workSlotHold: "work_slot_hold"; readonly workSlotRelease: "work_slot_release"; readonly workSlotHolds: "work_slot_holds"; readonly workSlotExpire: "work_slot_expire"; readonly workPerson: "work_person"; readonly workAssign: "work_assign"; readonly workRecordStates: "work_record_states"; readonly workSetState: "work_set_state"; readonly workList: "work_list"; readonly workTemplates: "work_templates"; /** THE ONE QUEUE: assignments, approvals and the agent's proposals together. */ readonly workInbox: "work_inbox"; readonly workApprovalApprovers: "work_approval_approvers"; readonly workApprovalRequest: "work_approval_request"; readonly workApprovalMayDecide: "work_approval_may_decide"; readonly workApprovalDecide: "work_approval_decide"; /** Lane S4: many inbox decisions, one call, a verdict per item. */ readonly workDecideMany: "work_decide_many"; /** Lane S5-PRIME-2: one person's own inbox state — snooze, clear, and the counts. */ readonly inboxSnooze: "inbox_snooze"; readonly inboxUnsnooze: "inbox_unsnooze"; readonly inboxClear: "inbox_clear"; readonly inboxUnclear: "inbox_unclear"; readonly inboxCounts: "inbox_counts"; readonly workApprovalRead: "work_approval_read"; readonly checklistRefusal: "checklist_refusal"; readonly checklistDeclare: "checklist_declare"; readonly checklistTemplates: "checklist_templates"; readonly checklistTemplateShape: "checklist_template_shape"; readonly checklistStart: "checklist_start"; readonly checklistRun: "checklist_run"; readonly checklistRuns: "checklist_runs"; readonly checklistStepComplete: "checklist_step_complete"; readonly checklistStepRefusal: "checklist_step_refusal"; readonly tableDecorate: "table_decorate"; readonly tableDecorations: "table_decorations"; readonly gridLayout: "grid_layout"; readonly formulaParse: "formula_parse"; readonly actionDeclare: "action_declare"; readonly rowActions: "row_actions"; readonly actionRun: "action_run"; readonly buttonPress: "button_press"; readonly timelineDependencyShift: "timeline_dependency_shift"; readonly recordsLimits: "records_limits"; readonly automationDeclare: "automation_declare"; readonly automations: "automations"; readonly automationArchive: "automation_archive"; readonly automationRestore: "automation_restore"; readonly automationSetEnabled: "automation_set_enabled"; readonly automationRuns: "automation_runs"; readonly automationTest: "automation_test"; readonly automationRevisions: "automation_revisions"; readonly automationRevisionRestore: "automation_revision_restore"; readonly tableWebhookDeclare: "table_webhook_declare"; readonly tableWebhooks: "table_webhooks"; readonly tableWebhookArchive: "table_webhook_archive"; readonly tableFromExample: "table_from_example"; readonly autonumberBackfill: "autonumber_backfill"; readonly fieldNotifyOnAssign: "field_notify_on_assign"; readonly ioExport: "io_export"; readonly tableListEverywhere: "table_list_everywhere"; readonly dataHomeTables: "data_home_tables"; readonly dataHome: "data_home"; readonly adminAllTables: "admin_all_tables"; readonly tableSync: "table_sync"; readonly tableCopySync: "table_copy_sync"; readonly tableSyncSettingsSet: "table_sync_settings_set"; readonly scopeTableProvision: "scope_table_provision"; readonly tableRowCounts: "table_row_counts"; readonly recordHeaders: "record_headers"; readonly viewRecordOrderSet: "view_record_order_set"; readonly readRecordsInViewOrder: "read_records_in_view_order"; readonly tableShareOutsideGrant: "table_share_outside_grant"; readonly tableDuplicate: "table_duplicate"; readonly tableDuplicateContinue: "table_duplicate_continue"; readonly baseCopyFinish: "base_copy_finish"; readonly copyTableExtras: "copy_table_extras"; readonly tableCopiesInProgress: "table_copies_in_progress"; readonly tableFind: "table_find"; readonly tableFindMany: "table_find_many"; readonly tableEnsure: "table_ensure"; readonly recordUpsert: "record_upsert"; readonly ruleDeclare: "rule_declare"; readonly fieldPropose: "field_propose"; readonly tablePropose: "table_propose"; readonly mergeFieldResolve: "merge_field_resolve"; }; type DoorKey = keyof typeof DOORS; /** Which of this package's doors the live store actually has, and which it does not. */ declare function doorCensus(): { present: string[]; absent: string[]; }; type Listener = (recordId: string) => void; /** Called by the client after a write door answered yes. */ declare function announceRecordChanged(recordId: string): void; /** Called by the client after `record_delete` answered yes (before it announces the change). */ declare function markRecordRemoved(recordId: string): void; /** Called by the client after `record_restore` answered yes (before it announces the change). */ declare function markRecordRestored(recordId: string): void; /** Whether this page archived the record and has not brought it back. */ declare function isRecordRemoved(recordId: string): boolean; /** Hear every record this page writes. Returns the unsubscribe. */ declare function onRecordChanged(listener: Listener): () => void; type TableListener = (tableId: string | null) => void; /** Called by the client after a structure door (a Field or choice change) answered yes. */ declare function announceTableStructureChanged(tableId: string | null): void; /** Hear every Table whose shape this page changes. Returns the unsubscribe. */ declare function onTableStructureChanged(listener: TableListener): () => void; /** * Read one Table's kind facts. `table` is the Table's id or its `table:` slug. * `dataSource` is a supabase-js client carrying the person's session (or a bound data source). */ declare function tableKindFacts(dataSource: unknown, table: string): Promise>; /** The edge label every store writes from a message to what it produced. */ declare const PRODUCED_BY_LABEL = "produced_by"; /** The edge's source entity — `chat.message`. */ declare const LANDING_SOURCE_TYPE = "message"; /** The edge target this package reads: a record of the store. */ declare const LANDING_TARGET_TYPES: { readonly record: "record"; }; /** * `record` is the only store this package answers. `kind_instance` exists so a host's own * legacy reader can hand its old rows to `outcomeForBlock` during the transition. */ type LandingStore = "record" | "kind_instance"; /** * The platform Field of an outputs table that the output's owner sets herself to keep it * (design §5.3). Keep confirms (§5.2): a kept output is never flagged for review. Writing it is * an ordinary `recordUpdate({ patch: { [OUTPUT_KEPT_KEY]: true } })` as the person — the store's * own envelope trigger admits exactly this one platform Field from a person. */ declare const OUTPUT_KEPT_KEY = "output_kept"; /** * - `saved`: the row is there and this reader can read it. * - `archived`: the row is in the archive (the store answered 02000 to an admitted reader). * - `unreadable`: the edge is there but the store refused the read — `refusal` says why. */ type LandingState = "saved" | "archived" | "unreadable"; interface Landing { store: LandingStore; recordId: string; /** The organization the row lives in (the edge's own). */ organizationId: string | null; /** The kind slug the output instantiates. `null` when the landing did not say. */ kind: string | null; /** The emitted block's fingerprint. `null` when the landing did not record one. */ fingerprint: string | null; /** The order among identical blocks of one message. */ ordinal: number | null; /** The render address the landing recorded — informative only, never matched on. */ blockId: string | null; /** The outputs table (record store only, from the edge). */ tableId: string | null; state: LandingState; title: string | null; /** * The review flag. Record store: true when any value was written by an agent and not yet by a * person (the store keeps confirmation per value). Kind store: the row's `confirmation`. * `null` when it could not be read. */ unconfirmed: boolean | null; archivedAt: string | null; createdAt: string | null; /** The store's own sentence when the read was refused. */ refusal: string | null; /** * A fork's copied output (B8): its chain belongs to another conversation. Read-only — no * actions are offered on it. */ fromSource: boolean; /** * THE ROWS THIS OUTPUT PUT IN OTHER TABLES (CD-AGENT-09, VISION "Kinds and their storage": "we * 'know' which of those entries came from an add or update from a __kind and clicking it shows * only that data"). A list output (a flashcard set's cards, a timeline's events) lands its items * as rows of their own kind's outputs table, each stamped with the output's Series * (`output_chain`) and Version (`output_generation`). One entry per table the items went to, * with the store's flat filter that shows exactly those rows. Record store only; absent when the * output holds no list, or the parent table's columns could not be read. */ contents?: LandingContents[]; } /** One table an output's list items landed in, and the filter that shows only them. */ interface LandingContents { /** The items' own outputs table. */ tableId: string; /** The column on the output that holds them ("Cards (flashcard)"). */ label: string; count: number; /** `{ output_chain, output_generation }`: this output's rows in that table, and no others. */ filter: Record; } /** The Fields an output's list items ride on: a relation the kind declared (`config.child_kind`). */ interface FieldRow { id?: string; data?: { key?: unknown; label?: unknown; type?: unknown; relation_target?: unknown; config?: { child_kind?: unknown; } | null; } | null; } /** * The tables an output's list items went to, from the output's own document and its table's * relation Fields. Pure: the reader hands in what it read. */ declare function landingContentsOf(document: unknown, fields: readonly FieldRow[]): LandingContents[]; interface LandingOutcomes { messageId: string; landings: Landing[]; } /** What a host knows about the block it is drawing. */ interface LandingBlock { kind: string; fingerprint: string | null | undefined; /** The block's order among identical blocks of this message, when the host knows it. */ ordinal?: number | null; /** * The render address. Accepted so a host can hand in what it has; NEVER used to match * (see the header). A guard plants a block-id matcher and must go red. */ blockId?: string | null; } type BlockOutcome = { state: "none"; } | { state: "landed"; landing: Landing; } | { state: "several"; landings: Landing[]; }; /** * The review flag of a record-store output, from its value envelopes as * `custom.record_values_versioned` answers them: any value whose last writer was an agent. * (`custom.read_record` answers the bare document — envelopes stripped — so it cannot say.) */ declare function valuesAreUnconfirmed(values: ReadonlyArray<{ actor?: unknown; }> | null | undefined): boolean; /** True when the owner kept this output (`output_kept`), which confirms it. */ declare function outputIsKept(document: unknown): boolean; /** * Every output this message produced in the record store, as this reader may see them. * * `dataSource` is a supabase-js client carrying the person's session (or a bound data source). * `conversationId`, when given, marks outputs whose chain belongs to another conversation as * `fromSource` (a forked conversation's copy). */ declare function landingOutcomesFor(dataSource: unknown, messageId: string, options?: { conversationId?: string | null; }): Promise>; /** * The outcome for ONE block: matched by (message, kind, fingerprint), never by block id. * * - A record-store landing matches only on an equal fingerprint — an output the store cannot * tie to these bytes is never claimed for them. * - A host-supplied kind-store row saved before fingerprints were recorded (fingerprint `null`), or a block that * carries none, matches by kind alone — the old card's truth, kept until wave 5. * - Several equal matches are told apart by `ordinal` when the host knows it; otherwise the answer * is `several` and the host says so. */ declare function outcomeForBlock(outcomes: LandingOutcomes, block: LandingBlock): BlockOutcome; /** True when any landing of `kind` for this block is in the record store. */ declare function blockLandedInStore(outcomes: LandingOutcomes, block: LandingBlock): boolean; /** What a data source's `rpc` answers for `custom.table_page_bundle` (PostgREST's `{ data, error }`). */ interface PrimedBundleAnswer { data: unknown; error: unknown; } /** * Hand the records client a table page's bundle that was asked elsewhere (the server render, as the * same person). The next records client that opens this Table in this organization uses it instead of * asking — once, within PRIMED_TTL_MS. */ declare function primeTablePageBundle(input: { organizationId: string; tableId: string; viewId?: string | null; answer: Promise | PrimedBundleAnswer; }): void; /** The primed answer for this page, once — or null (none, or stale). */ declare function takePrimedTablePageBundle(organizationId: string | null | undefined, tableId: string, viewId: string | null | undefined): Promise | null; /** Tests only: forget every primed answer. */ declare function forgetPrimedTablePageBundles(): void; /** * A RECORD PAGE'S BUNDLE (`custom.record_page_bundle`), asked elsewhere as the same person — the * record-page twin of `primeTablePageBundle`, held in the same registry, used once, while fresh. */ declare function primeRecordPageBundle(input: { organizationId: string; recordId: string; answer: Promise | PrimedBundleAnswer; }): void; /** How long a primed door answer stays servable, counted from when the server asked. */ declare const PRIMED_DOOR_TTL_MS = 10000; /** Keep one door's answer (`key` = door name + canonical arguments, as `seedKey` builds it). */ declare function primeDoorAnswer(key: string, data: unknown, at: number): void; /** * A write happened: nothing primed is trusted any more — or, with `doors`, only what those doors answered * (a saved view changes the views and the layout, never a record's value or a count of records). */ declare function dropPrimedDoorAnswers(doors?: readonly string[]): void; /** The published defaults, which are also what the store falls back to when it cannot read a knob. */ declare const DEFAULT_VALUE_MAX_BYTES = 100000; declare const DEFAULT_DOCUMENT_MAX_BYTES = 1048576; interface MirrorLimits { value_max_bytes?: number; document_max_bytes?: number; } /** * Predict `custom.validate_values`. Everything it checks WITHOUT a query is * mirrored; option membership and relation targets are deliberately left to the * door, and the mirror says nothing about them. */ declare function predictValueRefusals(fields: Field[], values: Record, recordType?: string): PredictedRefusal[]; /** Predict `custom.size_refusal`, with the same two ceilings and the same sentences. */ declare function predictSizeRefusal(document: RecordDocument, limits?: MirrorLimits): PredictedRefusal | null; /** * Predict `custom.value_envelope_refusal`. The store returns the FIRST problem * it finds and stops; so does this, key order included, so the two agree on * which sentence a person sees. */ declare function predictEnvelopeRefusal(document: RecordDocument): PredictedRefusal | null; /** Everything the mirror can see about one write, in the order the store sees it. */ declare function predictWriteRefusals(args: { fields: Field[]; document: RecordDocument; recordType?: string; limits?: MirrorLimits; }): PredictedRefusal[]; /** One exportable row: the values of one record, keyed by field key. */ type ExportRow = Record; /** * The same stringification: a string stays itself, everything else becomes its * JSON, and an absent value becomes the store's own absence WORD rather than an * empty cell. A blank cell would be the silent failure VAL-2 exists to prevent — * "we never asked" and "they refused" are different facts and the export says * which. */ declare function cellText(value: ReadValue | undefined): string; /** * ONE CELL OF ONE COLUMN (lane 10 P4): the column's own words for a value whose stored shape is not * what a person reads — an address on one line, a length of time as h:mm, who made a record by * name. Every other value is `cellText`'s. */ declare function exportCellText(field: Field, value: ReadValue | undefined): string; /** CSV through THE one writer (kit `toDelimited`; spreadsheet-safe by default). */ declare function exportCsv(fields: Field[], rows: ExportRow[]): string; /** * MARKDOWN: the same header row and the same cells as CSV and XLSX (`toAoa`), written as a pipe table — pasteable into a * note, an issue or a chat. A `|` in a cell is escaped, a line break becomes `
`, and an empty cell stays empty. * No column, no table: a table with no columns is the empty string. */ declare function exportMarkdown(fields: Field[], rows: ExportRow[]): string; /** The header row plus every cell, as the sheet writer takes it. */ declare function toAoa(fields: Field[], rows: ExportRow[]): string[][]; /** * The XLSX bytes, through Alchemy's one workbook engine. The import is dynamic so * a consumer that only ever exports CSV never pays for the library — the design-system module is loaded * the same way, and for the same reason. */ declare function exportXlsx(fields: Field[], rows: ExportRow[], sheetLabel?: string): Promise; /** * A PARSED FILE, AND NOTHING ELSE: its headings, and every row keyed by them. * * 🚨 THERE IS NO `field`, NO `unmapped` AND NO WAY TO ASK FOR ONE, and that is * the point. Until 2026-09-20 this parse ALSO decided which Field each heading * meant — it took `fields`, matched each header by key or label, keyed the rows * by whatever it matched, and **dropped every column it did not**. That cannot * be the input to `custom.io_import_plan` / `custom.io_import_rows`, whose whole * job is to decide the mapping and to OFFER what they could not match as a new * column: the store can only offer a column whose values reached it. * * Measured by looking at the screen: every unmapped column's samples came back * empty and its proposal read "every row in this column is empty, so there is * nothing to go on" — for columns plainly full of values. * * The fix is the SHAPE, not a second field beside the first. These functions no * longer take `fields`, so a parse cannot decide a mapping even by accident, and * there is no safe path left beside the unsafe one. */ interface ParsedImport { /** The file's own headings, in the file's own order and spelling. */ headers: string[]; /** Every row, keyed by heading. Every column is here; nothing is dropped. */ rows: Array>; } /** Comma-separated text as rows — THE one reader (kit `parseDelimited`), quotes and embedded newlines included. */ declare function parseCsv(text: string): string[][]; declare function importCsv(text: string): ParsedImport; declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise; /** The provenance kind a pointer cell's source carries. The Python side's `SOURCE_KIND`. */ declare const WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file"; /** What a pointer cell's provenance entry says about the file holding its whole text. */ interface WholeValuePointer { kind: typeof WHOLE_VALUE_SOURCE_KIND; /** The `files.files` id — what a host opens. */ file_id: Uuid; /** The kernel File record carrying that file. */ file_record: Uuid; /** The whole text's size, in UTF-8 bytes. */ bytes: number; /** The whole text's length, in characters. */ chars: number; sha256: string; /** How many characters the cell itself holds (the display words). */ shown_chars: number; mime?: string; moved_from?: Record; } /** The pointer behind `document[key]`, or null when the cell holds its whole value. */ declare function wholeValueOf(document: RecordDocument | null | undefined, key: string): WholeValuePointer | null; /** The same question of a value read through the door (its `source` is the resolved entry). */ declare function wholeValueOfRead(value: ReadValue | null | undefined): WholeValuePointer | null; /** A size a person reads: "728 KB". */ declare function wholeValueSize(pointer: WholeValuePointer): string; /** * The words an export writes for a pointer cell whose file could NOT be read: the display words, * then one sentence saying the whole text is elsewhere and where. Never the words alone — a * reader of the file would take the first thousand characters for the whole value. */ declare function wholeValueNotRead(words: string, pointer: WholeValuePointer, why?: string): string; /** How a host reads a file's whole text. The records package holds no bytes. */ type ReadFileText = (fileId: Uuid) => Promise; /** * THE EXPORT WRITES THE FILE'S CONTENT. Every pointer cell in `rows` (a ReadValue whose `source` * is a whole-value pointer) is replaced with the file's whole text, read once per file. A read that * fails, or no reader at all, writes the honest sentence of `wholeValueNotRead` instead. */ declare function withWholeValues(rows: ExportRow[], read?: ReadFileText | null): Promise; /** One door's answer, under its exact arguments. Plain JSON: it crosses from server to browser. */ interface RecordsSeedAnswer { door: string; args: Record; data: unknown; } /** What a server asked for a page, as the person, and when. */ interface RecordsSeed { /** Epoch ms when the server asked. */ at: number; answers: RecordsSeedAnswer[]; } /** The match key: a door and every argument, keys sorted at every depth. */ declare function seedKey(door: string, args: Record): string; /** * A data source that asks `source` and keeps every answer a door GAVE (errors are not kept). For a * server render: create a records client over it, ask what the page will ask, then `seed()`. */ declare function recordingDataSource(source: RecordsDataSource): { source: RecordsDataSource; seed: () => RecordsSeed; }; /** The seed as a lookup, built once per seed. */ declare function seedIndex(seed: RecordsSeed): Map; /** * ONE RUN AGAINST THE SEED: a data source answering from `index` only, and whether the run asked a * door the seed does not hold. It never opens a bundle itself (`opensInOneCall` off): the bundle's * parts are already answers in the index. */ declare function seededDataSource(index: Map): { source: RecordsDataSource; missed: () => boolean; }; export { DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_VALUE_MAX_BYTES, DOORS, Field, LANDING_SOURCE_TYPE, LANDING_TARGET_TYPES, OUTPUT_KEPT_KEY, PRIMED_DOOR_TTL_MS, PRODUCED_BY_LABEL, PredictedRefusal, ReadValue, RecordDocument, RecordsClient, RecordsDataSource, RecordsError, RecordsResult, TableKindFacts, Uuid, WHOLE_VALUE_SOURCE_KIND, announceRecordChanged, announceTableStructureChanged, blockLandedInStore, cellText, clientInOrganization, doorAbsent, doorCensus, doorExists, doorReady, dropPrimedDoorAnswers, exportCellText, exportCsv, exportMarkdown, exportXlsx, forgetPrimedTablePageBundles, importCsv, importXlsx, isRecordRemoved, landingContentsOf, landingOutcomesFor, markRecordRemoved, markRecordRestored, onRecordChanged, onTableStructureChanged, outcomeForBlock, outputIsKept, parseCsv, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, primeDoorAnswer, primeRecordPageBundle, primeTablePageBundle, recordingDataSource, seedIndex, seedKey, seededDataSource, tableKindFacts, takePrimedTablePageBundle, toAoa, valuesAreUnconfirmed, wholeValueNotRead, wholeValueOf, wholeValueOfRead, wholeValueSize, withWholeValues }; export type { BlockOutcome, DoorKey, ExportRow, Landing, LandingBlock, LandingContents, LandingOutcomes, LandingState, LandingStore, MirrorLimits, ParsedImport, PrimedBundleAnswer, ReadFileText, RecordsSeed, RecordsSeedAnswer, WholeValuePointer };