@ai-matrx/records 0.99.15 → 0.99.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { U as Uuid, $ as MergeFieldSource, _ as MergeFieldSemanticType, Z as MergeFieldModifier, a2 as OverridePolicy, B as Delivery, h as Timestamp, M as Freshness, n as RecordDocument, R as RecordsResult } from './record-CVPaFMLQ.cjs';
2
2
  export { t as ABSENCE_REASONS, u as ACTOR_VOCABULARY, v as AbsenceReason, A as Actor, w as COMPUTE_ON, x as CONTEXT_POLICIES, C as ComputeOn, d as ContextPolicy, y as DECLARABLE_FIELD_KINDS, z as DELIVERIES, D as DeclarableFieldKind, E as ENTITY_TOKENS, G as EntityToken, I as FIELD_SENSITIVITIES, J as FIELD_SOURCES, K as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, L as ForbiddenEnvelopeWord, 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, a0 as ON_DELETE, a1 as OVERRIDE_POLICIES, O as OnDelete, a3 as PARITY_FIELD_TYPES, a4 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a5 as PerValueAccessWord, P as PgError, r as PredictedRefusal, 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, l as ReadRow, s as ReadValue, ad as RecordChange, ae as RecordChangeResult, af as RecordGraphWritten, ag as RecordKeysetPage, ah as RecordPage, k as RecordPageSort, ai as RecordRead, aj as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, ak as RetiredActorWord, i as RuleNodeKind, j as RuleUse, al as STORAGE_MODES, am as STORE_DOORS, an as STORE_KNOBS, ao as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, ap as StoreDoorName, aq as StoreRefusalCode, ar as StoredRecord, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, b as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as WriteConflict, aE as err, aF as isLockedStub, aG as isRecordsErr, aH as ok, aI as splitLockedRows, aJ as unwrapRecords } from './record-CVPaFMLQ.cjs';
3
- import { K as CaptureFileRef, L as CaptureOutcome, R as RecordsClient } from './client-BhrN1XK2.cjs';
4
- export { A as ARCHIVE_LANES, b as ARCHIVE_LANE_LABEL, c as ARCHIVE_LANE_MEANS, e as ActionRefusal, f as ActionRunResult, g as AdminTable, h as AnonTokenBinding, i as ArchiveLane, j as ArchivedChecklistTemplate, k as ArchivedDoorRow, l as ArchivedForm, m as ArchivedRow, o as AutomationAction, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRun, w as AutomationRunStatus, x as AutomationRuns, y as AutomationSpec, z as AutomationStep, B as AutomationTested, C as AutomationTrigger, D as AutomationValue, E as AutomationValues, G as AutomationWeekday, H as BUILT_KIND_WORD, I as CHOICE_NUDGES, J as CaptureField, M as CaptureQuestion, N as CaptureSheetFace, O as CaptureSheetSummary, P as ChecklistDeclared, Q as ChecklistRequirement, S as ChecklistRequirementKind, U as ChecklistRoleSpec, V as ChecklistRunStarted, W as ChecklistRunStep, X as ChecklistRunSummary, Y as ChecklistSpec, Z as ChecklistStepCompleted, _ as ChecklistStepSpec, $ as ChecklistTemplateShape, a0 as ChecklistTemplateSummary, a1 as ChecklistTrigger, a2 as ChecklistTriggerKind, a3 as ChoiceCellBack, a4 as ChoiceLike, a5 as ChoiceNudge, a6 as ChoiceOption, a7 as ChoiceRehome, a8 as ChoiceUsage, a9 as ChoicesRehomed, aa as CommentThreadRead, ab as CommentWritten, ac as ConversationScope, ad as ConversationScopeContext, ae as CustomFieldTableType, af as DEFAULT_ARCHIVE_LANE, ah as DRILL_CHART_TOKENS, ai as DRILL_DESCRIPTION_MAX, aj as DRILL_DOORS, ak as DRILL_SCHEMA, al as DataHomeTable, am as DecorationColor, an as DecorationPath, ao as DecorationRule, ap as DecorationRuleOp, aq as DecorationTarget, ar as DocRenderRow, as as DocSignatureCheck, at as DocSignatureRow, au as DocTemplateRow, av as DocToken, aw as DocUnresolvedToken, ax as DrillAdHocOp, ay as DrillAnswer, az as DrillAnswerRow, aA as DrillChartToken, aB as DrillDeclaration, aC as DrillDefinition, aD as DrillDimension, aE as DrillFinding, aF as DrillGrain, aG as DrillHaving, aH as DrillLane, aI as DrillLevel, aJ as DrillMeasure, aK as DrillMeasureOp, aL as DrillMeasureWhereValue, aM as DrillPath, aN as DrillQuestion, aO as DrillRecords, aP as DrillRowsPage, aQ as DrillSource, aR as DrillView, aS as EnrichAlternate, aT as EnrichCell, aU as EnrichDeclared, aV as EnrichDueRow, aW as EnrichRun, aX as EnrichSource, aY as Enrichment, aZ as EnrichmentSummary, a_ as EntityBackLinkItem, a$ as EntityBackLinks, b0 as EntityFieldRights, b1 as EntityFieldValue, b2 as EntityFieldsAcross, b3 as EntityRecordMatch, b4 as EntityRecordRead, b5 as EntityRecordsFound, b6 as EntityRowWritten, b7 as EntityTableFacts, b8 as ExternalPrincipalCard, F as FieldDrift, b9 as FieldDriftAspect, ba as FieldHistoryEntry, bb as FieldRetyped, bc as FormArchiveAnswer, bd as FormulaParse, be as FormulaPreview, bf as GridLayout, bg as GridLayoutMode, bh as GridRowHeight, bi as HistoryActor, bj as HistoryActorKind, bk as HistoryChange, bl as Home, bm as ImportBatchResult, bn as ImportColumnPlan, bo as ImportColumnsDeclared, bp as ImportFinished, bq as ImportOpened, br as ImportOutcome, bs as ImportPlan, bt as ImportPolicy, bu as ImportProposal, bv as ImportReport, bw as ImportRun, bx as InboundAddress, by as InboundDeclared, bz as InboxCounts, bA as InboxStateChange, bB as IoExportPage, bC as MigrationEntry, bD as MigrationUndone, bE as NewEntityFieldDeclaration, bF as OutsideShareAnswer, bG as PIPELINE_RULE_KINDS, bH as ParentExtracted, bI as PickListDocument, bJ as PickListItem, bK as PickListItemInput, bL as Pipeline, bM as PipelineColumn, bN as PipelineDeclared, bO as PipelineGate, bP as PipelineGatePreview, bQ as PipelineMissingField, bR as PipelineMoveMany, bS as PipelineMoveManyItem, bT as PipelineMoveManyResult, bU as PipelineMoveResult, bV as PipelineMoveVerdict, bW as PipelineRule, bX as PipelineRuleKind, bY as PipelineSpec, bZ as PipelineStage, b_ as PipelineVerdict, c0 as PublishBinding, c1 as PublishBindingKind, c3 as ROW_LABEL_FORMULA_MAX_LENGTH, c4 as ROW_WEB_NOT_READY, c5 as RecordChangeAction, c6 as RecordComment, c7 as RecordEvent, c8 as RecordHeader, c9 as RecordHistoryEntry, cb as RecordRowControls, cc as RecordScopeComment, cd as RecordScopeContext, ce as RecordScopeField, cf as RecordScopeHistoryEntry, cg as RecordScopeRelation, ch as RecordScopeWithheld, ci as RecordSplit, cj as RecordsMerged, ck as RegisteredTable, cl as ResolvedPublishBinding, cm as ResolvedPublishBindingKind, cn as RestorePreview, co as RestoreResult, cp as RetypeBehaviour, cq as RetypePreview, cr as RowAction, cs as RowActionStep, ct as RowDefaultsApplied, cu as SHOWN_TO_LABEL, cv as SHOWN_TO_VALUES, cw as SHOWN_TO_WHO_MAY_CHANGE, cx as STAGE_RULE_ENFORCEMENT, cy as STAGE_RULE_ON_FAIL, cz as ShownTo, cA as StagePending, cB as StagePendingOnBoard, cC as StageRuleEnforcement, cD as StageRuleOnFail, cE as StageRuleWarning, cF as SyncAutoRefresh, cG as TABLE_KIND_PREFIX, cH as Table, T as TableArchiveProgress, cI as TableCapacity, cJ as TableCopyInProgress, cK as TableCopySpec, cL as TableDecorations, cM as TableDuplicateProgress, cN as TableDuplicated, cP as TableHome, cQ as TableHomeDestination, a as TableKindFacts, cR as TableLevel, cS as TableLevelApproval, cT as TableLevelFacts, cU as TableLevelSet, cV as TableListEntry, cX as TableMoved, cY as TablePlacement, cZ as TablePlacementFact, c_ as TableReaderRule, c$ as TableRenderSchema, d0 as TableRestoreProgress, d1 as TableRowCount, d2 as TableRowDefaults, d3 as TableRowDefaultsPatch, d4 as TableRowLabel, d5 as TableSchemaMode, d6 as TableSyncAnswer, d7 as TableSyncResult, d8 as TableSyncSettings, d9 as TableSyncSource, da as TableSyncSourceDocument, db as TableSyncSpec, dc as TableWebhook, dd as TableWebhookDeclared, de as TypedChoiceDecision, df as ViewLayout, dg as ViewOrderSet, dh as WorkApprovalDecision, di as WorkApprovalFiled, dj as WorkApprovalState, dk as WorkApprover, dl as WorkAssignment, dm as WorkAssignmentField, dn as WorkChange, dp as WorkDecideMany, dq as WorkDecideManyItem, dr as WorkDecideManyResult, ds as WorkDecideVerdict, dt as WorkDueState, du as WorkGraph, dv as WorkInboxItem, dw as WorkInboxKind, dx as WorkInboxView, dy as WorkInstantiation, dz as WorkListFlavour, dA as WorkListItem, dB as WorkOrigin, dC as WorkRecordState, dD as WorkSlotHold, dE as WorkState, dF as WorkTemplateNode, dG as WorkTemplateRelation, dH as WorkTurn, dI as actionRefusals, dJ as archivedByLine, dK as archivedWhen, dL as asChoiceNudge, dN as choiceSlug, dO as choiceValuesOf, dP as choicesOf, dQ as clearsRowLabel, dS as decideTypedChoice, dT as declareDrillDefinition, dU as drillAnswerOf, dV as drillFindingKnob, dW as emptyArchiveLine, dX as exportPageXlsx, dY as fieldKindOf, dZ as holdsARetiredChoice, e0 as isArchiveLane, e1 as isFoundation, e2 as isShownTo, e3 as isTableKind, e4 as isTheChosen, e5 as keptGroups, e6 as keptOutOfSight, e7 as keptTableHref, e8 as levelHasShownTo, e9 as looksLikeAnId, ea as mayDrag, eb as moveConsequence, ec as moveInOrder, ed as offeredAsContext, ee as optionKey, ef as optionLabel, eg as parseFieldDrift, eh as parseTableCopiesInProgress, ei as parseTableDuplicateProgress, ej as parseTableDuplicated, ek as parseTableHome, el as parseTableMoved, en as previewRetype, eo as previewRuleChange, ep as recordChangeTrigger, eq as recordSourceKey, er as recordSourceTable, es as recordsUseSentence, et as rehomeSentence, eu as removedChoicesInUse, ev as ruleThatRefuses, ew as rulesWithTopStar, ex as sameDocument, ey as scopeChip, ez as sheetSyncSpec, eA as tableIdOf, eB as tableJsonSchema, eC as tableKindMapping, eD as tableKindSlug, eE as tableRenderSchema, eF as valueConverts, eG as withRowCounts, eI as withTablePlacement } from './client-BhrN1XK2.cjs';
3
+ import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-D8vzRl-L.cjs';
4
+ export { A as ARCHIVE_LANES, a as ARCHIVE_LANE_LABEL, b as ARCHIVE_LANE_MEANS, 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, n as AutomationAction, o as AutomationDeclared, p as AutomationFilter, q as AutomationFlipped, r as AutomationItem, s as AutomationLastRun, t as AutomationList, u as AutomationRun, v as AutomationRunStatus, w as AutomationRuns, x as AutomationSpec, y as AutomationStep, z as AutomationTested, B as AutomationTrigger, C as AutomationValue, D as AutomationValues, E as AutomationWeekday, G as BUILT_KIND_WORD, H as CHOICE_NUDGES, I as CaptureField, L as CaptureQuestion, M as CaptureSheetFace, N as CaptureSheetSummary, O as ChecklistDeclared, P as ChecklistRequirement, Q as ChecklistRequirementKind, S as ChecklistRoleSpec, U as ChecklistRunStarted, V as ChecklistRunStep, W as ChecklistRunSummary, X as ChecklistSpec, Y as ChecklistStepCompleted, Z as ChecklistStepSpec, _ as ChecklistTemplateShape, $ as ChecklistTemplateSummary, a0 as ChecklistTrigger, a1 as ChecklistTriggerKind, a2 as ChoiceCellBack, a3 as ChoiceLike, a4 as ChoiceNudge, a5 as ChoiceOption, a6 as ChoiceRehome, a7 as ChoiceUsage, a8 as ChoicesRehomed, a9 as CommentThreadRead, aa as CommentWritten, ab as ConversationScope, ac as ConversationScopeContext, ad as CustomFieldTableType, ae as DEFAULT_ARCHIVE_LANE, ag as DRILL_CHART_TOKENS, ah as DRILL_DESCRIPTION_MAX, ai as DRILL_DOORS, aj as DRILL_SCHEMA, ak as DataHomeTable, al as DecorationColor, am as DecorationPath, an as DecorationRule, ao as DecorationRuleOp, ap as DecorationTarget, aq as DocRenderRow, ar as DocSignatureCheck, as as DocSignatureRow, at as DocTemplateRow, au as DocToken, av as DocUnresolvedToken, aw as DrillAdHocOp, ax as DrillAnswer, ay as DrillAnswerRow, az as DrillChartToken, aA as DrillDeclaration, aB as DrillDefinition, aC as DrillDimension, aD as DrillFinding, aE as DrillGrain, aF as DrillHaving, aG as DrillLane, aH as DrillLevel, aI as DrillMeasure, aJ as DrillMeasureOp, aK as DrillMeasureWhereValue, aL as DrillPath, aM as DrillQuestion, aN as DrillRecords, aO as DrillRowsPage, aP as DrillSource, aQ as DrillView, aR as EnrichAlternate, aS as EnrichCell, aT as EnrichDeclared, aU as EnrichDueRow, aV as EnrichRun, aW as EnrichSource, aX as Enrichment, aY as EnrichmentSummary, aZ as EntityBackLinkItem, a_ as EntityBackLinks, a$ as EntityFieldRights, b0 as EntityFieldValue, b1 as EntityFieldsAcross, b2 as EntityRecordMatch, b3 as EntityRecordRead, b4 as EntityRecordsFound, b5 as EntityRowWritten, b6 as EntityTableFacts, b7 as ExternalPrincipalCard, F as FieldDrift, b8 as FieldDriftAspect, b9 as FieldHistoryEntry, ba as FieldRetyped, bb as FormArchiveAnswer, bc as FormulaParse, bd as FormulaPreview, be as GridLayout, bf as GridLayoutMode, bg as GridRowHeight, bh as HistoryActor, bi as HistoryActorKind, bj as HistoryChange, bk as Home, bl as ImportBatchResult, bm as ImportColumnPlan, bn as ImportColumnsDeclared, bo as ImportFinished, bp as ImportOpened, bq as ImportOutcome, br as ImportPlan, bs as ImportPolicy, bt as ImportProposal, bu as ImportReport, bv as ImportRun, bw as InboundAddress, bx as InboundDeclared, by as InboxCounts, bz as InboxStateChange, bA as IoExportPage, bB as MigrationEntry, bC as MigrationUndone, bD as NewEntityFieldDeclaration, bE as OutsideShareAnswer, bF as PIPELINE_RULE_KINDS, bG as ParentExtracted, bH as PickListDocument, bI as PickListItem, bJ as PickListItemInput, bK as Pipeline, bL as PipelineColumn, bM as PipelineDeclared, bN as PipelineGate, bO as PipelineGatePreview, bP as PipelineMissingField, bQ as PipelineMoveMany, bR as PipelineMoveManyItem, bS as PipelineMoveManyResult, bT as PipelineMoveResult, bU as PipelineMoveVerdict, bV as PipelineRule, bW as PipelineRuleKind, bX as PipelineSpec, bY as PipelineStage, bZ as PipelineVerdict, b$ as PublishBinding, c0 as PublishBindingKind, c2 as ROW_LABEL_FORMULA_MAX_LENGTH, c3 as ROW_WEB_NOT_READY, c4 as RecordChangeAction, c5 as RecordComment, c6 as RecordEvent, c7 as RecordHeader, c8 as RecordHistoryEntry, ca as RecordRowControls, cb as RecordScopeComment, cc as RecordScopeContext, cd as RecordScopeField, ce as RecordScopeHistoryEntry, cf as RecordScopeRelation, cg as RecordScopeWithheld, ch as RecordSplit, ci as RecordsMerged, cj as RegisteredTable, ck as ResolvedPublishBinding, cl as ResolvedPublishBindingKind, cm as RestorePreview, cn as RestoreResult, co as RetypeBehaviour, cp as RetypePreview, cq as RowAction, cr as RowActionStep, cs as RowDefaultsApplied, ct as SHOWN_TO_LABEL, cu as SHOWN_TO_VALUES, cv as SHOWN_TO_WHO_MAY_CHANGE, cw as STAGE_RULE_ENFORCEMENT, cx as STAGE_RULE_ON_FAIL, cy as ShownTo, cz as StagePending, cA as StagePendingOnBoard, cB as StageRuleEnforcement, cC as StageRuleOnFail, cD as StageRuleWarning, cE as SyncAutoRefresh, cF as Table, T as TableArchiveProgress, cG as TableCapacity, cH as TableCopyInProgress, cI as TableCopySpec, cJ as TableDecorations, cK as TableDuplicateProgress, cL as TableDuplicated, cN as TableHome, cO as TableHomeDestination, cP as TableLevel, cQ as TableLevelApproval, cR as TableLevelFacts, cS as TableLevelSet, cT as TableListEntry, cV as TableMoved, cW as TablePlacement, cX as TablePlacementFact, cY as TableReaderRule, cZ as TableRestoreProgress, c_ as TableRowCount, c$ as TableRowDefaults, d0 as TableRowDefaultsPatch, d1 as TableRowLabel, d2 as TableSyncAnswer, d3 as TableSyncResult, d4 as TableSyncSettings, d5 as TableSyncSource, d6 as TableSyncSourceDocument, d7 as TableSyncSpec, d8 as TableWebhook, d9 as TableWebhookDeclared, da as TypedChoiceDecision, db as ViewLayout, dc as ViewOrderSet, dd as WorkApprovalDecision, de as WorkApprovalFiled, df as WorkApprovalState, dg as WorkApprover, dh as WorkAssignment, di as WorkAssignmentField, dj as WorkChange, dk as WorkDecideMany, dl as WorkDecideManyItem, dm as WorkDecideManyResult, dn as WorkDecideVerdict, dp as WorkDueState, dq as WorkGraph, dr as WorkInboxItem, ds as WorkInboxKind, dt as WorkInboxView, du as WorkInstantiation, dv as WorkListFlavour, dw as WorkListItem, dx as WorkOrigin, dy as WorkRecordState, dz as WorkSlotHold, dA as WorkState, dB as WorkTemplateNode, dC as WorkTemplateRelation, dD as WorkTurn, dE as actionRefusals, dF as archivedByLine, dG as archivedWhen, dH as asChoiceNudge, dJ as choiceSlug, dK as choiceValuesOf, dL as choicesOf, dM as clearsRowLabel, dO as decideTypedChoice, dP as declareDrillDefinition, dQ as drillAnswerOf, dR as drillFindingKnob, dS as emptyArchiveLine, dT as exportPageXlsx, dU as holdsARetiredChoice, dX as isArchiveLane, dY as isFoundation, dZ as isShownTo, d_ as isTheChosen, d$ as keptGroups, e0 as keptOutOfSight, e1 as keptTableHref, e2 as levelHasShownTo, e3 as looksLikeAnId, e4 as mayDrag, e5 as moveConsequence, e6 as moveInOrder, e7 as offeredAsContext, e8 as optionKey, e9 as optionLabel, ea as parseFieldDrift, eb as parseTableCopiesInProgress, ec as parseTableDuplicateProgress, ed as parseTableDuplicated, ee as parseTableHome, ef as parseTableMoved, eh as previewRetype, ei as previewRuleChange, ej as recordChangeTrigger, ek as recordSourceKey, el as recordSourceTable, em as recordsUseSentence, en as rehomeSentence, eo as removedChoicesInUse, ep as ruleThatRefuses, eq as rulesWithTopStar, er as sameDocument, es as scopeChip, et as sheetSyncSpec, eu as valueConverts, ev as withRowCounts, ex as withTablePlacement } from './client-D8vzRl-L.cjs';
5
5
  export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-D2_BQmR-.cjs';
6
6
  import { m as CoercibleField } from './field-Cw0kIDaG.cjs';
7
7
  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, n as FIELD_KINDS, F as Field, o as FieldDuplicated, p as FieldKind, q as FieldOptionEdit, r as FieldPatch, s as FieldProposal, b as FieldRule, a as FieldTypeWord, K as KernelTargets, t as NEWER_FIELD_KINDS, u as NOT_A_MEMBER_WORDS, N 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 addressText, 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-Cw0kIDaG.cjs';
@@ -10,6 +10,7 @@ export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions, a as PORTAL_A
10
10
  export { A as AggregateBucket, e as AggregateCompare, f as AggregateCompareKind, g as AggregateCompareWindows, h as AggregateDelta, b as AggregateFilter, i as AggregateGroupValue, c as AggregateMeasure, a as AggregateOperation, j as AggregateRow, k as AggregateWindow, l as DashboardBlock, D as DashboardBlockKind, m as DashboardBlockResult, n as DashboardRunResult, o as DashboardSummary, p as DashboardTarget, q as DashboardTargetBase, r as DashboardTargetOp, s as DashboardTargetResult, t as DashboardTotals, u as DigestPreview, M as MySubscription, Q as QuietHours, R as RecordFilter, v as RowTemplateRow, w as SavedViewColorBy, x as SavedViewDefinition, y as SavedViewLayout, d as SavedViewRow, z as SavedViewSpecIn, B as StoreFilter, C as StuckRow, E as Subscription, F as SubscriptionBlock, S as SubscriptionCadence, G as SubscriptionSpec, H as callersTimeZone, I as hasQuietHours, J as isRuleFilter, K as liftWithheld, L as measureKey, N as stableFilterKey, O as withCallersClock } from './subscription-8ioEsmOU.cjs';
11
11
  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-B6JqOI0b.cjs';
12
12
  export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-61jOlh2H.cjs';
13
+ export { TABLE_KIND_PREFIX, TableKindFacts, TableRenderSchema, TableSchemaMode, fieldKindOf, isTableKind, tableIdOf, tableJsonSchema, tableKindMapping, tableKindSlug, tableRenderSchema } from './table-kind/index.cjs';
13
14
  import './doors-BW2oHt5K.cjs';
14
15
 
15
16
  type WithFormat = CoercibleField & {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { U as Uuid, $ as MergeFieldSource, _ as MergeFieldSemanticType, Z as MergeFieldModifier, a2 as OverridePolicy, B as Delivery, h as Timestamp, M as Freshness, n as RecordDocument, R as RecordsResult } from './record-CVPaFMLQ.js';
2
2
  export { t as ABSENCE_REASONS, u as ACTOR_VOCABULARY, v as AbsenceReason, A as Actor, w as COMPUTE_ON, x as CONTEXT_POLICIES, C as ComputeOn, d as ContextPolicy, y as DECLARABLE_FIELD_KINDS, z as DELIVERIES, D as DeclarableFieldKind, E as ENTITY_TOKENS, G as EntityToken, I as FIELD_SENSITIVITIES, J as FIELD_SOURCES, K as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, L as ForbiddenEnvelopeWord, 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, a0 as ON_DELETE, a1 as OVERRIDE_POLICIES, O as OnDelete, a3 as PARITY_FIELD_TYPES, a4 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a5 as PerValueAccessWord, P as PgError, r as PredictedRefusal, 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, l as ReadRow, s as ReadValue, ad as RecordChange, ae as RecordChangeResult, af as RecordGraphWritten, ag as RecordKeysetPage, ah as RecordPage, k as RecordPageSort, ai as RecordRead, aj as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, ak as RetiredActorWord, i as RuleNodeKind, j as RuleUse, al as STORAGE_MODES, am as STORE_DOORS, an as STORE_KNOBS, ao as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, ap as StoreDoorName, aq as StoreRefusalCode, ar as StoredRecord, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, b as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as WriteConflict, aE as err, aF as isLockedStub, aG as isRecordsErr, aH as ok, aI as splitLockedRows, aJ as unwrapRecords } from './record-CVPaFMLQ.js';
3
- import { K as CaptureFileRef, L as CaptureOutcome, R as RecordsClient } from './client-BTUMagai.js';
4
- export { A as ARCHIVE_LANES, b as ARCHIVE_LANE_LABEL, c as ARCHIVE_LANE_MEANS, e as ActionRefusal, f as ActionRunResult, g as AdminTable, h as AnonTokenBinding, i as ArchiveLane, j as ArchivedChecklistTemplate, k as ArchivedDoorRow, l as ArchivedForm, m as ArchivedRow, o as AutomationAction, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRun, w as AutomationRunStatus, x as AutomationRuns, y as AutomationSpec, z as AutomationStep, B as AutomationTested, C as AutomationTrigger, D as AutomationValue, E as AutomationValues, G as AutomationWeekday, H as BUILT_KIND_WORD, I as CHOICE_NUDGES, J as CaptureField, M as CaptureQuestion, N as CaptureSheetFace, O as CaptureSheetSummary, P as ChecklistDeclared, Q as ChecklistRequirement, S as ChecklistRequirementKind, U as ChecklistRoleSpec, V as ChecklistRunStarted, W as ChecklistRunStep, X as ChecklistRunSummary, Y as ChecklistSpec, Z as ChecklistStepCompleted, _ as ChecklistStepSpec, $ as ChecklistTemplateShape, a0 as ChecklistTemplateSummary, a1 as ChecklistTrigger, a2 as ChecklistTriggerKind, a3 as ChoiceCellBack, a4 as ChoiceLike, a5 as ChoiceNudge, a6 as ChoiceOption, a7 as ChoiceRehome, a8 as ChoiceUsage, a9 as ChoicesRehomed, aa as CommentThreadRead, ab as CommentWritten, ac as ConversationScope, ad as ConversationScopeContext, ae as CustomFieldTableType, af as DEFAULT_ARCHIVE_LANE, ah as DRILL_CHART_TOKENS, ai as DRILL_DESCRIPTION_MAX, aj as DRILL_DOORS, ak as DRILL_SCHEMA, al as DataHomeTable, am as DecorationColor, an as DecorationPath, ao as DecorationRule, ap as DecorationRuleOp, aq as DecorationTarget, ar as DocRenderRow, as as DocSignatureCheck, at as DocSignatureRow, au as DocTemplateRow, av as DocToken, aw as DocUnresolvedToken, ax as DrillAdHocOp, ay as DrillAnswer, az as DrillAnswerRow, aA as DrillChartToken, aB as DrillDeclaration, aC as DrillDefinition, aD as DrillDimension, aE as DrillFinding, aF as DrillGrain, aG as DrillHaving, aH as DrillLane, aI as DrillLevel, aJ as DrillMeasure, aK as DrillMeasureOp, aL as DrillMeasureWhereValue, aM as DrillPath, aN as DrillQuestion, aO as DrillRecords, aP as DrillRowsPage, aQ as DrillSource, aR as DrillView, aS as EnrichAlternate, aT as EnrichCell, aU as EnrichDeclared, aV as EnrichDueRow, aW as EnrichRun, aX as EnrichSource, aY as Enrichment, aZ as EnrichmentSummary, a_ as EntityBackLinkItem, a$ as EntityBackLinks, b0 as EntityFieldRights, b1 as EntityFieldValue, b2 as EntityFieldsAcross, b3 as EntityRecordMatch, b4 as EntityRecordRead, b5 as EntityRecordsFound, b6 as EntityRowWritten, b7 as EntityTableFacts, b8 as ExternalPrincipalCard, F as FieldDrift, b9 as FieldDriftAspect, ba as FieldHistoryEntry, bb as FieldRetyped, bc as FormArchiveAnswer, bd as FormulaParse, be as FormulaPreview, bf as GridLayout, bg as GridLayoutMode, bh as GridRowHeight, bi as HistoryActor, bj as HistoryActorKind, bk as HistoryChange, bl as Home, bm as ImportBatchResult, bn as ImportColumnPlan, bo as ImportColumnsDeclared, bp as ImportFinished, bq as ImportOpened, br as ImportOutcome, bs as ImportPlan, bt as ImportPolicy, bu as ImportProposal, bv as ImportReport, bw as ImportRun, bx as InboundAddress, by as InboundDeclared, bz as InboxCounts, bA as InboxStateChange, bB as IoExportPage, bC as MigrationEntry, bD as MigrationUndone, bE as NewEntityFieldDeclaration, bF as OutsideShareAnswer, bG as PIPELINE_RULE_KINDS, bH as ParentExtracted, bI as PickListDocument, bJ as PickListItem, bK as PickListItemInput, bL as Pipeline, bM as PipelineColumn, bN as PipelineDeclared, bO as PipelineGate, bP as PipelineGatePreview, bQ as PipelineMissingField, bR as PipelineMoveMany, bS as PipelineMoveManyItem, bT as PipelineMoveManyResult, bU as PipelineMoveResult, bV as PipelineMoveVerdict, bW as PipelineRule, bX as PipelineRuleKind, bY as PipelineSpec, bZ as PipelineStage, b_ as PipelineVerdict, c0 as PublishBinding, c1 as PublishBindingKind, c3 as ROW_LABEL_FORMULA_MAX_LENGTH, c4 as ROW_WEB_NOT_READY, c5 as RecordChangeAction, c6 as RecordComment, c7 as RecordEvent, c8 as RecordHeader, c9 as RecordHistoryEntry, cb as RecordRowControls, cc as RecordScopeComment, cd as RecordScopeContext, ce as RecordScopeField, cf as RecordScopeHistoryEntry, cg as RecordScopeRelation, ch as RecordScopeWithheld, ci as RecordSplit, cj as RecordsMerged, ck as RegisteredTable, cl as ResolvedPublishBinding, cm as ResolvedPublishBindingKind, cn as RestorePreview, co as RestoreResult, cp as RetypeBehaviour, cq as RetypePreview, cr as RowAction, cs as RowActionStep, ct as RowDefaultsApplied, cu as SHOWN_TO_LABEL, cv as SHOWN_TO_VALUES, cw as SHOWN_TO_WHO_MAY_CHANGE, cx as STAGE_RULE_ENFORCEMENT, cy as STAGE_RULE_ON_FAIL, cz as ShownTo, cA as StagePending, cB as StagePendingOnBoard, cC as StageRuleEnforcement, cD as StageRuleOnFail, cE as StageRuleWarning, cF as SyncAutoRefresh, cG as TABLE_KIND_PREFIX, cH as Table, T as TableArchiveProgress, cI as TableCapacity, cJ as TableCopyInProgress, cK as TableCopySpec, cL as TableDecorations, cM as TableDuplicateProgress, cN as TableDuplicated, cP as TableHome, cQ as TableHomeDestination, a as TableKindFacts, cR as TableLevel, cS as TableLevelApproval, cT as TableLevelFacts, cU as TableLevelSet, cV as TableListEntry, cX as TableMoved, cY as TablePlacement, cZ as TablePlacementFact, c_ as TableReaderRule, c$ as TableRenderSchema, d0 as TableRestoreProgress, d1 as TableRowCount, d2 as TableRowDefaults, d3 as TableRowDefaultsPatch, d4 as TableRowLabel, d5 as TableSchemaMode, d6 as TableSyncAnswer, d7 as TableSyncResult, d8 as TableSyncSettings, d9 as TableSyncSource, da as TableSyncSourceDocument, db as TableSyncSpec, dc as TableWebhook, dd as TableWebhookDeclared, de as TypedChoiceDecision, df as ViewLayout, dg as ViewOrderSet, dh as WorkApprovalDecision, di as WorkApprovalFiled, dj as WorkApprovalState, dk as WorkApprover, dl as WorkAssignment, dm as WorkAssignmentField, dn as WorkChange, dp as WorkDecideMany, dq as WorkDecideManyItem, dr as WorkDecideManyResult, ds as WorkDecideVerdict, dt as WorkDueState, du as WorkGraph, dv as WorkInboxItem, dw as WorkInboxKind, dx as WorkInboxView, dy as WorkInstantiation, dz as WorkListFlavour, dA as WorkListItem, dB as WorkOrigin, dC as WorkRecordState, dD as WorkSlotHold, dE as WorkState, dF as WorkTemplateNode, dG as WorkTemplateRelation, dH as WorkTurn, dI as actionRefusals, dJ as archivedByLine, dK as archivedWhen, dL as asChoiceNudge, dN as choiceSlug, dO as choiceValuesOf, dP as choicesOf, dQ as clearsRowLabel, dS as decideTypedChoice, dT as declareDrillDefinition, dU as drillAnswerOf, dV as drillFindingKnob, dW as emptyArchiveLine, dX as exportPageXlsx, dY as fieldKindOf, dZ as holdsARetiredChoice, e0 as isArchiveLane, e1 as isFoundation, e2 as isShownTo, e3 as isTableKind, e4 as isTheChosen, e5 as keptGroups, e6 as keptOutOfSight, e7 as keptTableHref, e8 as levelHasShownTo, e9 as looksLikeAnId, ea as mayDrag, eb as moveConsequence, ec as moveInOrder, ed as offeredAsContext, ee as optionKey, ef as optionLabel, eg as parseFieldDrift, eh as parseTableCopiesInProgress, ei as parseTableDuplicateProgress, ej as parseTableDuplicated, ek as parseTableHome, el as parseTableMoved, en as previewRetype, eo as previewRuleChange, ep as recordChangeTrigger, eq as recordSourceKey, er as recordSourceTable, es as recordsUseSentence, et as rehomeSentence, eu as removedChoicesInUse, ev as ruleThatRefuses, ew as rulesWithTopStar, ex as sameDocument, ey as scopeChip, ez as sheetSyncSpec, eA as tableIdOf, eB as tableJsonSchema, eC as tableKindMapping, eD as tableKindSlug, eE as tableRenderSchema, eF as valueConverts, eG as withRowCounts, eI as withTablePlacement } from './client-BTUMagai.js';
3
+ import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-DuoWeGcM.js';
4
+ export { A as ARCHIVE_LANES, a as ARCHIVE_LANE_LABEL, b as ARCHIVE_LANE_MEANS, 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, n as AutomationAction, o as AutomationDeclared, p as AutomationFilter, q as AutomationFlipped, r as AutomationItem, s as AutomationLastRun, t as AutomationList, u as AutomationRun, v as AutomationRunStatus, w as AutomationRuns, x as AutomationSpec, y as AutomationStep, z as AutomationTested, B as AutomationTrigger, C as AutomationValue, D as AutomationValues, E as AutomationWeekday, G as BUILT_KIND_WORD, H as CHOICE_NUDGES, I as CaptureField, L as CaptureQuestion, M as CaptureSheetFace, N as CaptureSheetSummary, O as ChecklistDeclared, P as ChecklistRequirement, Q as ChecklistRequirementKind, S as ChecklistRoleSpec, U as ChecklistRunStarted, V as ChecklistRunStep, W as ChecklistRunSummary, X as ChecklistSpec, Y as ChecklistStepCompleted, Z as ChecklistStepSpec, _ as ChecklistTemplateShape, $ as ChecklistTemplateSummary, a0 as ChecklistTrigger, a1 as ChecklistTriggerKind, a2 as ChoiceCellBack, a3 as ChoiceLike, a4 as ChoiceNudge, a5 as ChoiceOption, a6 as ChoiceRehome, a7 as ChoiceUsage, a8 as ChoicesRehomed, a9 as CommentThreadRead, aa as CommentWritten, ab as ConversationScope, ac as ConversationScopeContext, ad as CustomFieldTableType, ae as DEFAULT_ARCHIVE_LANE, ag as DRILL_CHART_TOKENS, ah as DRILL_DESCRIPTION_MAX, ai as DRILL_DOORS, aj as DRILL_SCHEMA, ak as DataHomeTable, al as DecorationColor, am as DecorationPath, an as DecorationRule, ao as DecorationRuleOp, ap as DecorationTarget, aq as DocRenderRow, ar as DocSignatureCheck, as as DocSignatureRow, at as DocTemplateRow, au as DocToken, av as DocUnresolvedToken, aw as DrillAdHocOp, ax as DrillAnswer, ay as DrillAnswerRow, az as DrillChartToken, aA as DrillDeclaration, aB as DrillDefinition, aC as DrillDimension, aD as DrillFinding, aE as DrillGrain, aF as DrillHaving, aG as DrillLane, aH as DrillLevel, aI as DrillMeasure, aJ as DrillMeasureOp, aK as DrillMeasureWhereValue, aL as DrillPath, aM as DrillQuestion, aN as DrillRecords, aO as DrillRowsPage, aP as DrillSource, aQ as DrillView, aR as EnrichAlternate, aS as EnrichCell, aT as EnrichDeclared, aU as EnrichDueRow, aV as EnrichRun, aW as EnrichSource, aX as Enrichment, aY as EnrichmentSummary, aZ as EntityBackLinkItem, a_ as EntityBackLinks, a$ as EntityFieldRights, b0 as EntityFieldValue, b1 as EntityFieldsAcross, b2 as EntityRecordMatch, b3 as EntityRecordRead, b4 as EntityRecordsFound, b5 as EntityRowWritten, b6 as EntityTableFacts, b7 as ExternalPrincipalCard, F as FieldDrift, b8 as FieldDriftAspect, b9 as FieldHistoryEntry, ba as FieldRetyped, bb as FormArchiveAnswer, bc as FormulaParse, bd as FormulaPreview, be as GridLayout, bf as GridLayoutMode, bg as GridRowHeight, bh as HistoryActor, bi as HistoryActorKind, bj as HistoryChange, bk as Home, bl as ImportBatchResult, bm as ImportColumnPlan, bn as ImportColumnsDeclared, bo as ImportFinished, bp as ImportOpened, bq as ImportOutcome, br as ImportPlan, bs as ImportPolicy, bt as ImportProposal, bu as ImportReport, bv as ImportRun, bw as InboundAddress, bx as InboundDeclared, by as InboxCounts, bz as InboxStateChange, bA as IoExportPage, bB as MigrationEntry, bC as MigrationUndone, bD as NewEntityFieldDeclaration, bE as OutsideShareAnswer, bF as PIPELINE_RULE_KINDS, bG as ParentExtracted, bH as PickListDocument, bI as PickListItem, bJ as PickListItemInput, bK as Pipeline, bL as PipelineColumn, bM as PipelineDeclared, bN as PipelineGate, bO as PipelineGatePreview, bP as PipelineMissingField, bQ as PipelineMoveMany, bR as PipelineMoveManyItem, bS as PipelineMoveManyResult, bT as PipelineMoveResult, bU as PipelineMoveVerdict, bV as PipelineRule, bW as PipelineRuleKind, bX as PipelineSpec, bY as PipelineStage, bZ as PipelineVerdict, b$ as PublishBinding, c0 as PublishBindingKind, c2 as ROW_LABEL_FORMULA_MAX_LENGTH, c3 as ROW_WEB_NOT_READY, c4 as RecordChangeAction, c5 as RecordComment, c6 as RecordEvent, c7 as RecordHeader, c8 as RecordHistoryEntry, ca as RecordRowControls, cb as RecordScopeComment, cc as RecordScopeContext, cd as RecordScopeField, ce as RecordScopeHistoryEntry, cf as RecordScopeRelation, cg as RecordScopeWithheld, ch as RecordSplit, ci as RecordsMerged, cj as RegisteredTable, ck as ResolvedPublishBinding, cl as ResolvedPublishBindingKind, cm as RestorePreview, cn as RestoreResult, co as RetypeBehaviour, cp as RetypePreview, cq as RowAction, cr as RowActionStep, cs as RowDefaultsApplied, ct as SHOWN_TO_LABEL, cu as SHOWN_TO_VALUES, cv as SHOWN_TO_WHO_MAY_CHANGE, cw as STAGE_RULE_ENFORCEMENT, cx as STAGE_RULE_ON_FAIL, cy as ShownTo, cz as StagePending, cA as StagePendingOnBoard, cB as StageRuleEnforcement, cC as StageRuleOnFail, cD as StageRuleWarning, cE as SyncAutoRefresh, cF as Table, T as TableArchiveProgress, cG as TableCapacity, cH as TableCopyInProgress, cI as TableCopySpec, cJ as TableDecorations, cK as TableDuplicateProgress, cL as TableDuplicated, cN as TableHome, cO as TableHomeDestination, cP as TableLevel, cQ as TableLevelApproval, cR as TableLevelFacts, cS as TableLevelSet, cT as TableListEntry, cV as TableMoved, cW as TablePlacement, cX as TablePlacementFact, cY as TableReaderRule, cZ as TableRestoreProgress, c_ as TableRowCount, c$ as TableRowDefaults, d0 as TableRowDefaultsPatch, d1 as TableRowLabel, d2 as TableSyncAnswer, d3 as TableSyncResult, d4 as TableSyncSettings, d5 as TableSyncSource, d6 as TableSyncSourceDocument, d7 as TableSyncSpec, d8 as TableWebhook, d9 as TableWebhookDeclared, da as TypedChoiceDecision, db as ViewLayout, dc as ViewOrderSet, dd as WorkApprovalDecision, de as WorkApprovalFiled, df as WorkApprovalState, dg as WorkApprover, dh as WorkAssignment, di as WorkAssignmentField, dj as WorkChange, dk as WorkDecideMany, dl as WorkDecideManyItem, dm as WorkDecideManyResult, dn as WorkDecideVerdict, dp as WorkDueState, dq as WorkGraph, dr as WorkInboxItem, ds as WorkInboxKind, dt as WorkInboxView, du as WorkInstantiation, dv as WorkListFlavour, dw as WorkListItem, dx as WorkOrigin, dy as WorkRecordState, dz as WorkSlotHold, dA as WorkState, dB as WorkTemplateNode, dC as WorkTemplateRelation, dD as WorkTurn, dE as actionRefusals, dF as archivedByLine, dG as archivedWhen, dH as asChoiceNudge, dJ as choiceSlug, dK as choiceValuesOf, dL as choicesOf, dM as clearsRowLabel, dO as decideTypedChoice, dP as declareDrillDefinition, dQ as drillAnswerOf, dR as drillFindingKnob, dS as emptyArchiveLine, dT as exportPageXlsx, dU as holdsARetiredChoice, dX as isArchiveLane, dY as isFoundation, dZ as isShownTo, d_ as isTheChosen, d$ as keptGroups, e0 as keptOutOfSight, e1 as keptTableHref, e2 as levelHasShownTo, e3 as looksLikeAnId, e4 as mayDrag, e5 as moveConsequence, e6 as moveInOrder, e7 as offeredAsContext, e8 as optionKey, e9 as optionLabel, ea as parseFieldDrift, eb as parseTableCopiesInProgress, ec as parseTableDuplicateProgress, ed as parseTableDuplicated, ee as parseTableHome, ef as parseTableMoved, eh as previewRetype, ei as previewRuleChange, ej as recordChangeTrigger, ek as recordSourceKey, el as recordSourceTable, em as recordsUseSentence, en as rehomeSentence, eo as removedChoicesInUse, ep as ruleThatRefuses, eq as rulesWithTopStar, er as sameDocument, es as scopeChip, et as sheetSyncSpec, eu as valueConverts, ev as withRowCounts, ex as withTablePlacement } from './client-DuoWeGcM.js';
5
5
  export { M as MyLevel, O as OpLedger, P as PERMISSION_LEVELS, g as PermissionLevel, h as RecordsActor, e as RecordsChangeSink, a as RecordsConfig, d as RecordsDataSource, c as RecordsErrorSink, i as RecordsFilter, R as RecordsRealtimePort, j as RecordsResolverPort, k as RecordsResponse, l as RecordsTableQuery, b as RowAgentPort, f as RowAgentTarget, m as asPermissionLevel, n as atLeast, o as createOpLedger, p as defaultOpLedger, q as forgetAllOps, r as highestLevel, s as isOwnOp, t as mintOpId, u as rememberedOpCount } from './ports-DopjYwYG.js';
6
6
  import { m as CoercibleField } from './field-0bRLy9ZN.js';
7
7
  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, n as FIELD_KINDS, F as Field, o as FieldDuplicated, p as FieldKind, q as FieldOptionEdit, r as FieldPatch, s as FieldProposal, b as FieldRule, a as FieldTypeWord, K as KernelTargets, t as NEWER_FIELD_KINDS, u as NOT_A_MEMBER_WORDS, N 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 addressText, 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-0bRLy9ZN.js';
@@ -10,6 +10,7 @@ export { D as DEFAULT_PORTAL_ARCHIVE_FILTER, F as FormLookOptions, a as PORTAL_A
10
10
  export { A as AggregateBucket, e as AggregateCompare, f as AggregateCompareKind, g as AggregateCompareWindows, h as AggregateDelta, b as AggregateFilter, i as AggregateGroupValue, c as AggregateMeasure, a as AggregateOperation, j as AggregateRow, k as AggregateWindow, l as DashboardBlock, D as DashboardBlockKind, m as DashboardBlockResult, n as DashboardRunResult, o as DashboardSummary, p as DashboardTarget, q as DashboardTargetBase, r as DashboardTargetOp, s as DashboardTargetResult, t as DashboardTotals, u as DigestPreview, M as MySubscription, Q as QuietHours, R as RecordFilter, v as RowTemplateRow, w as SavedViewColorBy, x as SavedViewDefinition, y as SavedViewLayout, d as SavedViewRow, z as SavedViewSpecIn, B as StoreFilter, C as StuckRow, E as Subscription, F as SubscriptionBlock, S as SubscriptionCadence, G as SubscriptionSpec, H as callersTimeZone, I as hasQuietHours, J as isRuleFilter, K as liftWithheld, L as measureKey, N as stableFilterKey, O as withCallersClock } from './subscription-BUggri40.js';
11
11
  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-BhUQJAOi.js';
12
12
  export { a as ObjectKind, O as ObjectOrganizationAnswer, R as RecordOrganizationPort, W as WHERE_ID_OPENS_DOOR, r as readObjectOrganizationAnswer, b as resolveObjectOrganization, w as whereIdOpensPort } from './objectOrganization-tPXgAo39.js';
13
+ export { TABLE_KIND_PREFIX, TableKindFacts, TableRenderSchema, TableSchemaMode, fieldKindOf, isTableKind, tableIdOf, tableJsonSchema, tableKindMapping, tableKindSlug, tableRenderSchema } from './table-kind/index.js';
13
14
  import './doors-CiCqbOu_.js';
14
15
 
15
16
  type WithFormat = CoercibleField & {
@@ -1,5 +1,5 @@
1
1
  import { A as AggregateBucket } from '../subscription-8ioEsmOU.cjs';
2
- import { R as RecordsClient } from '../client-BhrN1XK2.cjs';
2
+ import { R as RecordsClient } from '../client-D8vzRl-L.cjs';
3
3
  import { F as Field } from '../field-Cw0kIDaG.cjs';
4
4
  import { H as HiddenFieldNotice, U as Uuid, R as RecordsResult } from '../record-CVPaFMLQ.cjs';
5
5
  import { R as RuleExpression } from '../rule-ZSckB2NY.cjs';
@@ -7,6 +7,7 @@ import '../relation-B6JqOI0b.cjs';
7
7
  import '../ports-D2_BQmR-.cjs';
8
8
  import '../doors-BW2oHt5K.cjs';
9
9
  import '../portal-CYg30IWl.cjs';
10
+ import '../table-kind/index.cjs';
10
11
 
11
12
  type QuestionOp = "count" | "sum" | "avg" | "min" | "max";
12
13
  declare const QUESTION_OPS: readonly QuestionOp[];
@@ -1,5 +1,5 @@
1
1
  import { A as AggregateBucket } from '../subscription-BUggri40.js';
2
- import { R as RecordsClient } from '../client-BTUMagai.js';
2
+ import { R as RecordsClient } from '../client-DuoWeGcM.js';
3
3
  import { F as Field } from '../field-0bRLy9ZN.js';
4
4
  import { H as HiddenFieldNotice, U as Uuid, R as RecordsResult } from '../record-CVPaFMLQ.js';
5
5
  import { R as RuleExpression } from '../rule-BwLz0-40.js';
@@ -7,6 +7,7 @@ import '../relation-BhUQJAOi.js';
7
7
  import '../ports-DopjYwYG.js';
8
8
  import '../doors-CiCqbOu_.js';
9
9
  import '../portal-6E1E9651.js';
10
+ import '../table-kind/index.js';
10
11
 
11
12
  type QuestionOp = "count" | "sum" | "avg" | "min" | "max";
12
13
  declare const QUESTION_OPS: readonly QuestionOp[];
@@ -1,5 +1,5 @@
1
1
  import { RealtimeManager } from '@ai-matrx/realtime';
2
- import { R as RecordsClient } from '../client-BhrN1XK2.cjs';
2
+ import { R as RecordsClient } from '../client-D8vzRl-L.cjs';
3
3
  import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-VHk95pB1.cjs';
4
4
  import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-61jOlh2H.cjs';
5
5
  import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-D2_BQmR-.cjs';
@@ -11,6 +11,7 @@ import '../relation-B6JqOI0b.cjs';
11
11
  import '../field-Cw0kIDaG.cjs';
12
12
  import '../doors-BW2oHt5K.cjs';
13
13
  import '../portal-CYg30IWl.cjs';
14
+ import '../table-kind/index.cjs';
14
15
  import '../types-BRMqDFGE.cjs';
15
16
 
16
17
  /** A signed-in database identity: the client every door and live change rides, and who it is. */
@@ -1,5 +1,5 @@
1
1
  import { RealtimeManager } from '@ai-matrx/realtime';
2
- import { R as RecordsClient } from '../client-BTUMagai.js';
2
+ import { R as RecordsClient } from '../client-DuoWeGcM.js';
3
3
  import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-BurGLCot.js';
4
4
  import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-tPXgAo39.js';
5
5
  import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-DopjYwYG.js';
@@ -11,6 +11,7 @@ import '../relation-BhUQJAOi.js';
11
11
  import '../field-0bRLy9ZN.js';
12
12
  import '../doors-CiCqbOu_.js';
13
13
  import '../portal-6E1E9651.js';
14
+ import '../table-kind/index.js';
14
15
  import '../types-B1xhDHsk.js';
15
16
 
16
17
  /** A signed-in database identity: the client every door and live change rides, and who it is. */
@@ -0,0 +1,421 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/table-kind.ts
21
+ var table_kind_exports = {};
22
+ __export(table_kind_exports, {
23
+ TABLE_KIND_PREFIX: () => TABLE_KIND_PREFIX,
24
+ fieldKindOf: () => fieldKindOf,
25
+ isTableKind: () => isTableKind,
26
+ tableIdOf: () => tableIdOf,
27
+ tableJsonSchema: () => tableJsonSchema,
28
+ tableKindMapping: () => tableKindMapping,
29
+ tableKindSlug: () => tableKindSlug,
30
+ tableRenderSchema: () => tableRenderSchema
31
+ });
32
+ module.exports = __toCommonJS(table_kind_exports);
33
+ var import_uuid = require("@ai-matrx/kit/uuid");
34
+
35
+ // src/table-kind-mapping.json
36
+ var table_kind_mapping_default = {
37
+ about: "THE ONE MAPPING from a store Field to a kind's three schemas (KINDS-GLUE wave 3 \xA72). Hand-written here; aidream copies it verbatim to packages/matrx-graph/matrx_graph/table_kind_mapping.json (scripts/generate_table_kind_mapping.py --check). Both languages derive from this file only: @ai-matrx/records src/table-kind.ts and matrx_graph.table_kinds. Keys of `kinds` are the store's field kinds (custom.field_kinds() plus the formula `system` kinds custom.field_kind_of answers). Stored mode only: `column_source_default` is custom.table_column_source's answer when the facts carry none (silence means the doctrine: Field rows are the columns); `platform_keys` mirrors custom.record_platform_keys() with each key's shape (parent_id: custom.containment_parent's uuid cast; icon: the record's own @ai-matrx/icons name, a string or null); `stored_patterns` mirror custom.validate_values' relation id regex and, for dates, refuse a string the timestamptz cast can never read (no digits, not a special word) while never refusing one it can.",
38
+ version: 2,
39
+ kernels: {
40
+ file: "11111111-0000-4000-8000-000000000006",
41
+ person: "11111111-0000-4000-8000-000000000005"
42
+ },
43
+ system_kinds: ["created_by", "modified_by", "autonumber", "created_time", "modified_time"],
44
+ by_behaviour: {
45
+ text: "text",
46
+ range: "number",
47
+ list: "select",
48
+ relation: "relation",
49
+ boolean: "checkbox",
50
+ formula: "formula"
51
+ },
52
+ choice_enum_limit: 100,
53
+ rating_max: 5,
54
+ address_parts: ["street", "city", "region", "postal_code", "country"],
55
+ address_part_max: 200,
56
+ column_source_default: "fields",
57
+ platform_keys: {
58
+ parent_id: { type: ["string", "null"], pattern: "^(?:\\{[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7}\\}|[0-9a-fA-F]{4}(?:-?[0-9a-fA-F]{4}){7})$" },
59
+ icon: { type: ["string", "null"] }
60
+ },
61
+ stored_patterns: {
62
+ record_id: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
63
+ datetime: "[0-9][^0-9]+[0-9]|[0-9]{5}|^\\s*(?:[Nn][Oo][Ww]|[Tt][Oo][Dd][Aa][Yy]|[Tt][Oo][Mm][Oo][Rr][Rr][Oo][Ww]|[Yy][Ee][Ss][Tt][Ee][Rr][Dd][Aa][Yy]|[Ee][Pp][Oo][Cc][Hh])(?![A-Za-z])"
64
+ },
65
+ kinds: {
66
+ text: { shape: "string", value: { type: "string" } },
67
+ long_text: { shape: "string", value: { type: "string" } },
68
+ email: { shape: "string", value: { type: "string", format: "email" } },
69
+ phone: { shape: "string", value: { type: "string" } },
70
+ url: { shape: "string", value: { type: "string" } },
71
+ barcode: { shape: "string", value: { type: "string", maxLength: 256 } },
72
+ rich_text: { shape: "string", value: { type: "string" }, hint: "Markdown, no HTML." },
73
+ signature: { shape: "string", value: { type: "string", readOnly: true }, authored: false },
74
+ number: { shape: "number", value: { type: "number" } },
75
+ currency: { shape: "number", value: { type: "number" }, unit: true },
76
+ percent: { shape: "number", value: { type: "number" }, hint: "A whole percent: 6 means 6%." },
77
+ rating: { shape: "number", value: { type: "integer", minimum: 0 }, rating: true },
78
+ duration: { shape: "number", value: { type: "number", minimum: 0 }, hint: "A length of time in seconds." },
79
+ datetime: { shape: "datetime" },
80
+ checkbox: { shape: "boolean", value: { type: "boolean" } },
81
+ select: { shape: "choice" },
82
+ multi_select: { shape: "choice" },
83
+ status: { shape: "choice" },
84
+ relation: { shape: "relation" },
85
+ member: { shape: "relation" },
86
+ attachment: { shape: "relation", authored: false },
87
+ entity_reference: { shape: "entity_reference" },
88
+ address: { shape: "address" },
89
+ formula: { shape: "computed" },
90
+ lookup: { shape: "computed" },
91
+ rollup: { shape: "computed" },
92
+ count: { shape: "computed" },
93
+ created_by: { shape: "computed" },
94
+ modified_by: { shape: "computed" },
95
+ autonumber: { shape: "computed" },
96
+ created_time: { shape: "computed" },
97
+ modified_time: { shape: "computed" }
98
+ },
99
+ render: {
100
+ string: { one: { type: "string" }, many: { type: "string[]" } },
101
+ number: { one: { type: "number" }, many: { type: "number[]" } },
102
+ boolean: { one: { type: "boolean" }, many: { type: "boolean[]" } },
103
+ datetime: { one: { type: "union", scalars: ["string", "number"] }, many: { type: "json" } },
104
+ relation: { one: { type: "json" }, many: { type: "json" } },
105
+ entity_reference: { one: { type: "json" }, many: { type: "json" } },
106
+ address: { one: { type: "json" }, many: { type: "json" } },
107
+ computed: { one: { type: "json" }, many: { type: "json" } }
108
+ }
109
+ };
110
+
111
+ // src/table-kind.ts
112
+ var TABLE_KIND_PREFIX = "table:";
113
+ var KIND_KEY = "__kind";
114
+ var M = table_kind_mapping_default;
115
+ function tableKindMapping() {
116
+ return M;
117
+ }
118
+ function isTableKind(slug) {
119
+ return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) && (0, import_uuid.isLowercaseUuidShape)(slug.slice(TABLE_KIND_PREFIX.length));
120
+ }
121
+ function tableKindSlug(tableId) {
122
+ const slug = `${TABLE_KIND_PREFIX}${String(tableId).trim().toLowerCase()}`;
123
+ if (!isTableKind(slug)) throw new Error(`${JSON.stringify(tableId)} is not a table id`);
124
+ return slug;
125
+ }
126
+ function tableIdOf(slug) {
127
+ if (!isTableKind(slug)) throw new Error(`${JSON.stringify(slug)} is not a table kind`);
128
+ return slug.slice(TABLE_KIND_PREFIX.length);
129
+ }
130
+ function clone(value) {
131
+ return JSON.parse(JSON.stringify(value));
132
+ }
133
+ function truthy(value) {
134
+ return value === true || value === "true";
135
+ }
136
+ function configOf(d) {
137
+ const cfg = d.config;
138
+ return cfg && typeof cfg === "object" && !Array.isArray(cfg) ? cfg : {};
139
+ }
140
+ function parityType(d) {
141
+ const t = d.type;
142
+ const fmt = d.format;
143
+ const cfg = configOf(d);
144
+ if (t === "boolean") return "checkbox";
145
+ if (t === "list") return truthy(d.multi) ? "multi_select" : "select";
146
+ if (t === "relation" && d.relation_target === M.kernels.file) return "attachment";
147
+ if (t === "relation" && d.relation_target === M.kernels.person) return "member";
148
+ if (t === "formula" && "pick" in cfg) return "lookup";
149
+ if (t === "formula" && "agg" in cfg) return "rollup";
150
+ if (t === "formula" && "expr" in cfg) return "formula";
151
+ if (t === "text" && (fmt === "url" || fmt === "email" || fmt === "phone")) return fmt;
152
+ if (t === "range" && fmt === "percent") return "percent";
153
+ if (t === "range" && d.unit && fmt === "currency") return "currency";
154
+ if (t === "range" && (cfg.kind === "date" || cfg.kind === "datetime")) return "datetime";
155
+ return null;
156
+ }
157
+ function fieldKindOf(d) {
158
+ const t = d.type;
159
+ const fmt = d.format;
160
+ const cfg = configOf(d);
161
+ if (t === "range" && (fmt === "rating" || fmt === "duration")) return fmt;
162
+ if (t === "text" && (fmt === "address" || fmt === "barcode" || fmt === "rich_text" || fmt === "signature")) return fmt;
163
+ if (t === "list" && fmt === "status") return "status";
164
+ if (t === "formula" && fmt === "count" && cfg.agg === "count") return "count";
165
+ if (t === "formula" && typeof cfg.system === "string" && M.system_kinds.includes(cfg.system)) return cfg.system;
166
+ if (t === "relation" && Array.isArray(cfg.allowed_types)) return "entity_reference";
167
+ const parity = parityType(d);
168
+ if (parity !== null) return parity;
169
+ if (t === "text") return fmt === "long" || truthy(cfg.multiline) ? "long_text" : "text";
170
+ if (t === "range") return "number";
171
+ if (t === "relation") return "relation";
172
+ return null;
173
+ }
174
+ function fieldKind(d) {
175
+ if ("field_kind" in d) return typeof d.field_kind === "string" ? d.field_kind : null;
176
+ return fieldKindOf(d);
177
+ }
178
+ function kindSpec(d) {
179
+ const kind = fieldKind(d) ?? M.by_behaviour[String(d.type)] ?? "formula";
180
+ return M.kinds[kind] ?? M.kinds.formula;
181
+ }
182
+ function unconditionalRules(d) {
183
+ const rules = Array.isArray(d.rules) ? d.rules : [];
184
+ return rules.filter(
185
+ (r) => !!r && typeof r === "object" && !Array.isArray(r) && !(Array.isArray(r.applies_to_types) && r.applies_to_types.length > 0) && !(typeof r.applies_to_types === "string" && r.applies_to_types !== "")
186
+ );
187
+ }
188
+ function numberOf(value) {
189
+ if (typeof value === "boolean") return null;
190
+ if (typeof value === "number" && Number.isFinite(value)) return value;
191
+ if (typeof value === "string" && /^-?[0-9]+(\.[0-9]+)?$/.test(value)) return Number(value);
192
+ return null;
193
+ }
194
+ function choiceTokens(facts, key) {
195
+ const tokens = [];
196
+ for (const choice of facts.choices?.[key] ?? []) {
197
+ for (const token of [choice.key, choice.label, choice.id]) {
198
+ if (typeof token === "string" && token && !tokens.includes(token)) tokens.push(token);
199
+ }
200
+ }
201
+ return tokens;
202
+ }
203
+ function liveChoiceKeys(facts, key) {
204
+ const keys = [];
205
+ for (const choice of facts.choices?.[key] ?? []) {
206
+ const k = choice.key;
207
+ if (!choice.retired && typeof k === "string" && k && !keys.includes(k)) keys.push(k);
208
+ }
209
+ return keys;
210
+ }
211
+ function item(facts, d, mode) {
212
+ const spec = kindSpec(d);
213
+ const shape = spec.shape;
214
+ const cfg = configOf(d);
215
+ const key = String(d.key);
216
+ if (shape === "string" || shape === "number" || shape === "boolean") {
217
+ const out = clone(spec.value ?? {});
218
+ for (const rule of unconditionalRules(d)) {
219
+ const kind = rule.kind;
220
+ const value = numberOf(rule.value);
221
+ if (shape === "number" && kind === "min" && value !== null) out.minimum = value;
222
+ else if (shape === "number" && kind === "max" && value !== null) out.maximum = value;
223
+ else if (shape === "string" && kind === "length" && value !== null) out.maxLength = Math.trunc(value);
224
+ }
225
+ if (spec.rating && !("maximum" in out)) out.maximum = M.rating_max;
226
+ if (spec.unit && d.unit && mode === "stored") out["x-matrx-unit"] = d.unit;
227
+ return out;
228
+ }
229
+ if (shape === "datetime") {
230
+ if (mode === "stored") return { type: ["number", "string"], pattern: M.stored_patterns.datetime };
231
+ return { type: "string", format: cfg.kind === "date" ? "date" : "date-time" };
232
+ }
233
+ if (shape === "choice") {
234
+ if (truthy(cfg.allow_other)) return { type: "string" };
235
+ if (mode === "stored") return { type: "string", enum: choiceTokens(facts, key) };
236
+ const live = liveChoiceKeys(facts, key);
237
+ if (live.length === 0 || live.length > M.choice_enum_limit) return { type: "string" };
238
+ return { type: "string", enum: live };
239
+ }
240
+ if (shape === "relation") {
241
+ if (mode === "stored") return { type: "string", format: "uuid", pattern: M.stored_patterns.record_id };
242
+ return { type: "string", format: "uuid" };
243
+ }
244
+ if (shape === "entity_reference") {
245
+ const allowed = (Array.isArray(cfg.allowed_types) ? cfg.allowed_types : []).filter(
246
+ (t) => typeof t === "string"
247
+ );
248
+ const id = { type: "string", format: "uuid" };
249
+ if (mode === "stored") id.pattern = M.stored_patterns.record_id;
250
+ const out = {
251
+ type: "object",
252
+ properties: { token: { type: "string", enum: allowed }, id },
253
+ required: ["token", "id"]
254
+ };
255
+ if (mode === "authored") out.additionalProperties = false;
256
+ return out;
257
+ }
258
+ if (shape === "address") {
259
+ const part = mode === "authored" ? { type: "string", maxLength: M.address_part_max } : { type: ["string", "null"], maxLength: M.address_part_max };
260
+ const out = {
261
+ type: "object",
262
+ properties: Object.fromEntries(M.address_parts.map((p) => [p, { ...part }])),
263
+ additionalProperties: false
264
+ };
265
+ if (mode === "stored") out.minProperties = 1;
266
+ return out;
267
+ }
268
+ return { readOnly: true };
269
+ }
270
+ function isTyped(d) {
271
+ return Array.isArray(d.applies_to_types) && d.applies_to_types.length > 0;
272
+ }
273
+ function storedValue(facts, d) {
274
+ const shape = kindSpec(d).shape;
275
+ if (shape === "computed") return { readOnly: true };
276
+ const one = item(facts, d, "stored");
277
+ const required = truthy(d.required) && !isTyped(d);
278
+ let value;
279
+ if (shape === "relation" || shape === "entity_reference") {
280
+ const many = { type: "array", items: one };
281
+ const ceiling = numberOf(d.relation_max);
282
+ if (ceiling !== null) many.maxItems = Math.trunc(ceiling);
283
+ if (required) many.minItems = 1;
284
+ value = { anyOf: [one, many] };
285
+ } else if (truthy(d.multi)) {
286
+ value = { type: "array", items: one };
287
+ if (required) value.minItems = 1;
288
+ } else {
289
+ value = one;
290
+ }
291
+ return required ? value : { anyOf: [value, { type: "null" }] };
292
+ }
293
+ function authoredValue(facts, d, typeLabels2) {
294
+ const spec = kindSpec(d);
295
+ const shape = spec.shape;
296
+ const one = item(facts, d, "authored");
297
+ let value;
298
+ if (shape === "relation" || shape === "entity_reference") {
299
+ value = { type: "array", items: one };
300
+ const ceiling = numberOf(d.relation_max);
301
+ if (ceiling !== null) value.maxItems = Math.trunc(ceiling);
302
+ } else if (truthy(d.multi)) {
303
+ value = { type: "array", items: one };
304
+ } else {
305
+ value = one;
306
+ }
307
+ const extras = [];
308
+ if (spec.unit && d.unit) extras.push(`Amount in ${String(d.unit)}.`);
309
+ if (spec.hint) extras.push(spec.hint);
310
+ if (typeLabels2.length > 0) extras.push(`Only for ${typeLabels2.join(", ")} records.`);
311
+ const label = String(d.label || d.key);
312
+ value.description = extras.length > 0 ? `${label}. ${extras.join(" ")}` : label;
313
+ return value;
314
+ }
315
+ function isAuthored(d) {
316
+ const spec = kindSpec(d);
317
+ return spec.shape !== "computed" && spec.authored !== false;
318
+ }
319
+ function typeChoice(facts, word) {
320
+ for (const choice of facts.choices?.[facts.type_field ?? ""] ?? []) {
321
+ if (word === choice.key || word === choice.label || word === choice.id) return choice;
322
+ }
323
+ return null;
324
+ }
325
+ function typeSynonyms(facts, word) {
326
+ const choice = typeChoice(facts, word);
327
+ if (!choice) return [word, [word]];
328
+ const out = [];
329
+ for (const token of [choice.key, choice.label, choice.id]) {
330
+ if (typeof token === "string" && token && !out.includes(token)) out.push(token);
331
+ }
332
+ return [String(choice.key || word), out];
333
+ }
334
+ function typeLabels(facts, d) {
335
+ const labels = [];
336
+ for (const word of d.applies_to_types ?? []) {
337
+ const choice = typeChoice(facts, String(word));
338
+ const label = choice ? String(choice.label || choice.key) : String(word);
339
+ if (!labels.includes(label)) labels.push(label);
340
+ }
341
+ return labels;
342
+ }
343
+ function liveFields(facts) {
344
+ return (facts.fields ?? []).filter((d) => !!d && typeof d === "object" && !!d.key);
345
+ }
346
+ function tableJsonSchema(facts, mode) {
347
+ const slug = tableKindSlug(String(facts.table_id));
348
+ const fields = liveFields(facts);
349
+ const properties = { [KIND_KEY]: { const: slug } };
350
+ const required = [KIND_KEY];
351
+ if (mode === "stored") {
352
+ const branches = /* @__PURE__ */ new Map();
353
+ for (const d of fields) {
354
+ const key = String(d.key);
355
+ properties[key] = storedValue(facts, d);
356
+ const computed = kindSpec(d).shape === "computed";
357
+ if (!truthy(d.required) || computed) continue;
358
+ if (!isTyped(d)) {
359
+ required.push(key);
360
+ continue;
361
+ }
362
+ if (!facts.type_field) continue;
363
+ for (const word of d.applies_to_types) {
364
+ const [typeKey, synonyms] = typeSynonyms(facts, String(word));
365
+ let branch = branches.get(typeKey);
366
+ if (!branch) {
367
+ branch = {
368
+ if: { properties: { [facts.type_field]: { enum: synonyms } }, required: [facts.type_field] },
369
+ then: { required: [], properties: {} }
370
+ };
371
+ branches.set(typeKey, branch);
372
+ }
373
+ if (!branch.then.required.includes(key)) {
374
+ branch.then.required.push(key);
375
+ branch.then.properties[key] = { not: { type: "null" } };
376
+ }
377
+ }
378
+ }
379
+ const platformKeys = Array.isArray(facts.platform_keys) ? facts.platform_keys : Object.keys(M.platform_keys);
380
+ for (const name of platformKeys) {
381
+ if (typeof name === "string" && !(name in properties)) properties[name] = clone(M.platform_keys[name] ?? {});
382
+ }
383
+ const schema = {
384
+ type: "object",
385
+ properties,
386
+ patternProperties: { "^_": {} },
387
+ required
388
+ };
389
+ if ((facts.column_source || M.column_source_default) === "fields") schema.additionalProperties = false;
390
+ if (branches.size > 0) schema.allOf = [...branches.values()];
391
+ return schema;
392
+ }
393
+ for (const d of fields) {
394
+ if (!isAuthored(d)) continue;
395
+ const key = String(d.key);
396
+ const typed = isTyped(d);
397
+ properties[key] = authoredValue(facts, d, typed ? typeLabels(facts, d) : []);
398
+ if (truthy(d.required) && !typed) required.push(key);
399
+ }
400
+ return { type: "object", properties, required, additionalProperties: false };
401
+ }
402
+ function tableRenderSchema(facts) {
403
+ const slug = tableKindSlug(String(facts.table_id));
404
+ const out = {};
405
+ for (const d of liveFields(facts)) {
406
+ const key = String(d.key);
407
+ const shape = kindSpec(d).shape;
408
+ const multi = truthy(d.multi);
409
+ let field;
410
+ if (shape === "choice") {
411
+ field = { type: multi ? "string[]" : "enum", values: choiceTokens(facts, key) };
412
+ if (truthy(configOf(d).allow_other)) field.open = true;
413
+ } else {
414
+ field = clone(M.render[shape][multi ? "many" : "one"]);
415
+ }
416
+ field.nullable = true;
417
+ out[key] = field;
418
+ }
419
+ return { kind: slug, fields: out };
420
+ }
421
+ //# sourceMappingURL=index.cjs.map