@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/CHANGELOG.md +11 -0
- package/dist/{client-BhrN1XK2.d.cts → client-D8vzRl-L.d.cts} +2 -83
- package/dist/{client-BTUMagai.d.ts → client-DuoWeGcM.d.ts} +2 -83
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/data/index.d.cts +2 -1
- package/dist/data/index.d.ts +2 -1
- package/dist/{declareTable-D8Mq6wNq.d.ts → declareTable-DO8U62Pf.d.ts} +1 -1
- package/dist/{declareTable-BU3IURyS.d.cts → declareTable-T0LWvfIO.d.cts} +1 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.cjs.map +1 -1
- package/dist/forms/index.js +1 -1
- package/dist/forms/index.js.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/questions/index.d.cts +2 -1
- package/dist/questions/index.d.ts +2 -1
- package/dist/setup/index.d.cts +2 -1
- package/dist/setup/index.d.ts +2 -1
- package/dist/table-kind/index.cjs +421 -0
- package/dist/table-kind/index.cjs.map +1 -0
- package/dist/table-kind/index.d.cts +83 -0
- package/dist/table-kind/index.d.ts +83 -0
- package/dist/table-kind/index.js +400 -0
- package/dist/table-kind/index.js.map +1 -0
- package/dist/typed-table/index.d.cts +3 -2
- package/dist/typed-table/index.d.ts +3 -2
- package/dist/views/index.d.cts +2 -1
- package/dist/views/index.d.ts +2 -1
- package/package.json +12 -2
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 {
|
|
4
|
-
export { A as ARCHIVE_LANES,
|
|
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 {
|
|
4
|
-
export { A as ARCHIVE_LANES,
|
|
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-
|
|
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-
|
|
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[];
|
package/dist/setup/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RealtimeManager } from '@ai-matrx/realtime';
|
|
2
|
-
import { R as RecordsClient } from '../client-
|
|
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. */
|
package/dist/setup/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RealtimeManager } from '@ai-matrx/realtime';
|
|
2
|
-
import { R as RecordsClient } from '../client-
|
|
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
|