@ai-matrx/records 0.99.28 → 0.99.29
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 +7 -0
- package/dist/{client-B7LYr-aE.d.cts → client-B7KEs9hi.d.cts} +10 -0
- package/dist/{client-m4soDpHA.d.ts → client-Dthx26hr.d.ts} +10 -0
- package/dist/core/index.cjs +76 -10
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +76 -10
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +12 -1
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +1 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +12 -1
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-D5Zs-SjU.d.ts → declareTable-CvBu5dTJ.d.ts} +1 -1
- package/dist/{declareTable-Bnrzv-Bg.d.cts → declareTable-enQs2N0E.d.cts} +1 -1
- package/dist/first-page/index.d.cts +2 -0
- package/dist/first-page/index.d.ts +2 -0
- package/dist/index.cjs +64 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -3
- package/dist/index.d.ts +29 -3
- package/dist/index.js +64 -9
- package/dist/index.js.map +1 -1
- package/dist/questions/index.d.cts +1 -1
- package/dist/questions/index.d.ts +1 -1
- package/dist/react/index.cjs +78 -12
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +37 -1
- package/dist/react/index.d.ts +37 -1
- package/dist/react/index.js +78 -12
- package/dist/react/index.js.map +1 -1
- package/dist/setup/index.cjs +12 -1
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +1 -1
- package/dist/setup/index.d.ts +1 -1
- package/dist/setup/index.js +12 -1
- package/dist/setup/index.js.map +1 -1
- package/dist/typed-table/index.cjs +12 -1
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +2 -2
- package/dist/typed-table/index.d.ts +2 -2
- package/dist/typed-table/index.js +12 -1
- package/dist/typed-table/index.js.map +1 -1
- package/dist/views/index.d.cts +1 -1
- package/dist/views/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { U as Uuid, R as RecordsResult, a0 as MergeFieldSource, $ as MergeFieldSemanticType, _ as MergeFieldModifier, a3 as OverridePolicy, B as Delivery, h as Timestamp, N as Freshness, n as RecordDocument } from './record-C8q21jjB.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 FORMULA_NODE_RESULTS, L as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, M as ForbiddenEnvelopeWord, H as HiddenFieldNotice, Q as KERNEL_TABLES, V as KernelTableName, W as KeysetRow, X as MERGE_FIELD_MODIFIERS, Y as MERGE_FIELD_SEMANTIC_TYPES, Z as MERGE_FIELD_SOURCES, a1 as ON_DELETE, a2 as OVERRIDE_POLICIES, O as OnDelete, a4 as PARITY_FIELD_TYPES, a5 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a6 as PerValueAccessWord, P as PgError, r as PredictedRefusal, a7 as ProvenancePointer, a8 as RELATION_BINDINGS, a9 as RELATION_CARDINALITIES, aa as RELATION_FLAVORS, ab as RETIRED_ACTOR_WORDS, ac as RULE_NODE_KINDS, ad as RULE_USES, l as ReadRow, s as ReadValue, ae as RecordChange, af as RecordChangeResult, ag as RecordGraphWritten, ah as RecordKeysetPage, ai as RecordPage, k as RecordPageSort, aj as RecordRead, ak as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, al as RetiredActorWord, i as RuleNodeKind, j as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as StoredRecord, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, b as TableDisplay, aw as TableOrigin, T as TableType, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, aE as WriteConflict, aF as err, aG as isLockedStub, aH as isRecordsErr, aI as ok, aJ as splitLockedRows, aK as unwrapRecords } from './record-C8q21jjB.cjs';
|
|
3
|
-
import { cP as TableDuplicateProgress, cQ as TableDuplicated, O as CaptureFileRef, P as CaptureOutcome, R as RecordsClient } from './client-
|
|
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 AutomationComparison, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRevision, w as AutomationRevisions, x as AutomationRun, y as AutomationRunStatus, z as AutomationRuns, B as AutomationSpec, C as AutomationStep, D as AutomationTested, E as AutomationToken, G as AutomationTrigger, H as AutomationValue, I as AutomationValues, J as AutomationWeekday, K as AutomationWhen, L as BUILT_KIND_WORD, M as CHOICE_NUDGES, N as CaptureField, Q as CaptureQuestion, S as CaptureSheetFace, U as CaptureSheetSummary, V as ChecklistDeclared, W as ChecklistRequirement, X as ChecklistRequirementKind, Y as ChecklistRoleSpec, Z as ChecklistRunStarted, _ as ChecklistRunStep, $ as ChecklistRunSummary, a0 as ChecklistSpec, a1 as ChecklistStepCompleted, a2 as ChecklistStepSpec, a3 as ChecklistTemplateShape, a4 as ChecklistTemplateSummary, a5 as ChecklistTrigger, a6 as ChecklistTriggerKind, a7 as ChoiceCellBack, a8 as ChoiceLike, a9 as ChoiceNudge, aa as ChoiceOption, ab as ChoiceRehome, ac as ChoiceUsage, ad as ChoicesRehomed, ae as CommentThreadRead, af as CommentWritten, ag as ConversationScope, ah as ConversationScopeContext, ai as CustomFieldTableType, aj as DEFAULT_ARCHIVE_LANE, al as DRILL_CHART_TOKENS, am as DRILL_DESCRIPTION_MAX, an as DRILL_DOORS, ao as DRILL_SCHEMA, ap as DataHomeTable, aq as DecorationColor, ar as DecorationPath, as as DecorationRule, at as DecorationRuleOp, au as DecorationTarget, av as DocRenderRow, aw as DocSignatureCheck, ax as DocSignatureRow, ay as DocTemplateRow, az as DocToken, aA as DocUnresolvedToken, aB as DrillAdHocOp, aC as DrillAnswer, aD as DrillAnswerRow, aE as DrillChartToken, aF as DrillDeclaration, aG as DrillDefinition, aH as DrillDimension, aI as DrillFinding, aJ as DrillGrain, aK as DrillHaving, aL as DrillLane, aM as DrillLevel, aN as DrillMeasure, aO as DrillMeasureOp, aP as DrillMeasureWhereValue, aQ as DrillPath, aR as DrillQuestion, aS as DrillRecords, aT as DrillRowsPage, aU as DrillSource, aV as DrillView, aW as EnrichAlternate, aX as EnrichCell, aY as EnrichDeclared, aZ as EnrichDueRow, a_ as EnrichRun, a$ as EnrichSource, b0 as Enrichment, b1 as EnrichmentSummary, b2 as EntityBackLinkItem, b3 as EntityBackLinks, b4 as EntityFieldRights, b5 as EntityFieldValue, b6 as EntityFieldsAcross, b7 as EntityRecordMatch, b8 as EntityRecordRead, b9 as EntityRecordsFound, ba as EntityRowWritten, bb as EntityTableFacts, bc as ExternalPrincipalCard, F as FieldDrift, bd as FieldDriftAspect, be as FieldHistoryEntry, bf as FieldRetyped, bg as FormArchiveAnswer, bh as FormulaParse, bi as FormulaPreview, bj as GridLayout, bk as GridLayoutMode, bl as GridRowHeight, bm as HistoryActor, bn as HistoryActorKind, bo as HistoryChange, bp as Home, bq as ImportBatchResult, br as ImportColumnPlan, bs as ImportColumnsDeclared, bt as ImportFinished, bu as ImportOpened, bv as ImportOutcome, bw as ImportPlan, bx as ImportPolicy, by as ImportProposal, bz as ImportReport, bA as ImportRun, bB as InboundAddress, bC as InboundDeclared, bD as InboxCounts, bE as InboxStateChange, bF as IoExportPage, bG as MigrationEntry, bH as MigrationUndone, bI as NewEntityFieldDeclaration, bJ as OutsideShareAnswer, bK as PIPELINE_RULE_KINDS, bL as ParentExtracted, bM as PickListDocument, bN as PickListItem, bO as PickListItemInput, bP as Pipeline, bQ as PipelineColumn, bR as PipelineDeclared, bS as PipelineGate, bT as PipelineGatePreview, bU as PipelineMissingField, bV as PipelineMoveMany, bW as PipelineMoveManyItem, bX as PipelineMoveManyResult, bY as PipelineMoveResult, bZ as PipelineMoveVerdict, b_ as PipelineRule, b$ as PipelineRuleKind, c0 as PipelineSpec, c1 as PipelineStage, c2 as PipelineVerdict, c4 as PublishBinding, c5 as PublishBindingKind, c7 as ROW_LABEL_FORMULA_MAX_LENGTH, c8 as ROW_WEB_NOT_READY, c9 as RecordChangeAction, ca as RecordComment, cb as RecordEvent, cc as RecordHeader, cd as RecordHistoryEntry, cf as RecordRowControls, cg as RecordScopeComment, ch as RecordScopeContext, ci as RecordScopeField, cj as RecordScopeHistoryEntry, ck as RecordScopeRelation, cl as RecordScopeWithheld, cm as RecordSplit, cn as RecordsMerged, co as RegisteredTable, cp as ResolvedPublishBinding, cq as ResolvedPublishBindingKind, cr as RestorePreview, cs as RestoreResult, ct as RetypeBehaviour, cu as RetypePreview, cv as RowAction, cw as RowActionStep, cx as RowDefaultsApplied, cy as SHOWN_TO_LABEL, cz as SHOWN_TO_VALUES, cA as SHOWN_TO_WHO_MAY_CHANGE, cB as STAGE_RULE_ENFORCEMENT, cC as STAGE_RULE_ON_FAIL, cD as ShownTo, cE as StagePending, cF as StagePendingOnBoard, cG as StageRuleEnforcement, cH as StageRuleOnFail, cI as StageRuleWarning, cJ as SyncAutoRefresh, cK as Table, T as TableArchiveProgress, cL as TableCapacity, cM as TableCopyInProgress, cN as TableCopySpec, cO as TableDecorations, cS as TableHome, cT as TableHomeDestination, cU as TableLevel, cV as TableLevelApproval, cW as TableLevelFacts, cX as TableLevelSet, cY as TableListEntry, c_ as TableMoved, c$ as TablePlacement, d0 as TablePlacementFact, d1 as TableReaderRule, d2 as TableRestoreProgress, d3 as TableRowCount, d4 as TableRowDefaults, d5 as TableRowDefaultsPatch, d6 as TableRowLabel, d7 as TableSyncAnswer, d8 as TableSyncResult, d9 as TableSyncSettings, da as TableSyncSource, db as TableSyncSourceDocument, dc as TableSyncSpec, dd as TableWebhook, de as TableWebhookDeclared, df as TypedChoiceDecision, dg as ViewLayout, dh as ViewOrderSet, di as WorkApprovalDecision, dj as WorkApprovalFiled, dk as WorkApprovalState, dl as WorkApprover, dm as WorkAssignment, dn as WorkAssignmentField, dp as WorkChange, dq as WorkDecideMany, dr as WorkDecideManyItem, ds as WorkDecideManyResult, dt as WorkDecideVerdict, du as WorkDueState, dv as WorkGraph, dw as WorkInboxItem, dx as WorkInboxKind, dy as WorkInboxView, dz as WorkInstantiation, dA as WorkListFlavour, dB as WorkListItem, dC as WorkOrigin, dD as WorkRecordState, dE as WorkSlotHold, dF as WorkState, dG as WorkTemplateNode, dH as WorkTemplateRelation, dI as WorkTurn, dJ as actionRefusals, dK as archivedByLine, dL as archivedWhen, dM as asChoiceNudge, dO as automationWebhookUrl, dP as choiceSlug, dQ as choiceValuesOf, dR as choicesOf, dS as clearsRowLabel, dU as decideTypedChoice, dV as declareDrillDefinition, dW as drillAnswerOf, dX as drillFindingKnob, dY as emptyArchiveLine, dZ as exportPageXlsx, d_ as holdsARetiredChoice, e1 as isArchiveLane, e2 as isFoundation, e3 as isShownTo, 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 valueConverts, eB as withRowCounts, eD as withTablePlacement } from './client-
|
|
3
|
+
import { cP as TableDuplicateProgress, cQ as TableDuplicated, O as CaptureFileRef, P as CaptureOutcome, R as RecordsClient } from './client-B7KEs9hi.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 AutomationComparison, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRevision, w as AutomationRevisions, x as AutomationRun, y as AutomationRunStatus, z as AutomationRuns, B as AutomationSpec, C as AutomationStep, D as AutomationTested, E as AutomationToken, G as AutomationTrigger, H as AutomationValue, I as AutomationValues, J as AutomationWeekday, K as AutomationWhen, L as BUILT_KIND_WORD, M as CHOICE_NUDGES, N as CaptureField, Q as CaptureQuestion, S as CaptureSheetFace, U as CaptureSheetSummary, V as ChecklistDeclared, W as ChecklistRequirement, X as ChecklistRequirementKind, Y as ChecklistRoleSpec, Z as ChecklistRunStarted, _ as ChecklistRunStep, $ as ChecklistRunSummary, a0 as ChecklistSpec, a1 as ChecklistStepCompleted, a2 as ChecklistStepSpec, a3 as ChecklistTemplateShape, a4 as ChecklistTemplateSummary, a5 as ChecklistTrigger, a6 as ChecklistTriggerKind, a7 as ChoiceCellBack, a8 as ChoiceLike, a9 as ChoiceNudge, aa as ChoiceOption, ab as ChoiceRehome, ac as ChoiceUsage, ad as ChoicesRehomed, ae as CommentThreadRead, af as CommentWritten, ag as ConversationScope, ah as ConversationScopeContext, ai as CustomFieldTableType, aj as DEFAULT_ARCHIVE_LANE, al as DRILL_CHART_TOKENS, am as DRILL_DESCRIPTION_MAX, an as DRILL_DOORS, ao as DRILL_SCHEMA, ap as DataHomeTable, aq as DecorationColor, ar as DecorationPath, as as DecorationRule, at as DecorationRuleOp, au as DecorationTarget, av as DocRenderRow, aw as DocSignatureCheck, ax as DocSignatureRow, ay as DocTemplateRow, az as DocToken, aA as DocUnresolvedToken, aB as DrillAdHocOp, aC as DrillAnswer, aD as DrillAnswerRow, aE as DrillChartToken, aF as DrillDeclaration, aG as DrillDefinition, aH as DrillDimension, aI as DrillFinding, aJ as DrillGrain, aK as DrillHaving, aL as DrillLane, aM as DrillLevel, aN as DrillMeasure, aO as DrillMeasureOp, aP as DrillMeasureWhereValue, aQ as DrillPath, aR as DrillQuestion, aS as DrillRecords, aT as DrillRowsPage, aU as DrillSource, aV as DrillView, aW as EnrichAlternate, aX as EnrichCell, aY as EnrichDeclared, aZ as EnrichDueRow, a_ as EnrichRun, a$ as EnrichSource, b0 as Enrichment, b1 as EnrichmentSummary, b2 as EntityBackLinkItem, b3 as EntityBackLinks, b4 as EntityFieldRights, b5 as EntityFieldValue, b6 as EntityFieldsAcross, b7 as EntityRecordMatch, b8 as EntityRecordRead, b9 as EntityRecordsFound, ba as EntityRowWritten, bb as EntityTableFacts, bc as ExternalPrincipalCard, F as FieldDrift, bd as FieldDriftAspect, be as FieldHistoryEntry, bf as FieldRetyped, bg as FormArchiveAnswer, bh as FormulaParse, bi as FormulaPreview, bj as GridLayout, bk as GridLayoutMode, bl as GridRowHeight, bm as HistoryActor, bn as HistoryActorKind, bo as HistoryChange, bp as Home, bq as ImportBatchResult, br as ImportColumnPlan, bs as ImportColumnsDeclared, bt as ImportFinished, bu as ImportOpened, bv as ImportOutcome, bw as ImportPlan, bx as ImportPolicy, by as ImportProposal, bz as ImportReport, bA as ImportRun, bB as InboundAddress, bC as InboundDeclared, bD as InboxCounts, bE as InboxStateChange, bF as IoExportPage, bG as MigrationEntry, bH as MigrationUndone, bI as NewEntityFieldDeclaration, bJ as OutsideShareAnswer, bK as PIPELINE_RULE_KINDS, bL as ParentExtracted, bM as PickListDocument, bN as PickListItem, bO as PickListItemInput, bP as Pipeline, bQ as PipelineColumn, bR as PipelineDeclared, bS as PipelineGate, bT as PipelineGatePreview, bU as PipelineMissingField, bV as PipelineMoveMany, bW as PipelineMoveManyItem, bX as PipelineMoveManyResult, bY as PipelineMoveResult, bZ as PipelineMoveVerdict, b_ as PipelineRule, b$ as PipelineRuleKind, c0 as PipelineSpec, c1 as PipelineStage, c2 as PipelineVerdict, c4 as PublishBinding, c5 as PublishBindingKind, c7 as ROW_LABEL_FORMULA_MAX_LENGTH, c8 as ROW_WEB_NOT_READY, c9 as RecordChangeAction, ca as RecordComment, cb as RecordEvent, cc as RecordHeader, cd as RecordHistoryEntry, cf as RecordRowControls, cg as RecordScopeComment, ch as RecordScopeContext, ci as RecordScopeField, cj as RecordScopeHistoryEntry, ck as RecordScopeRelation, cl as RecordScopeWithheld, cm as RecordSplit, cn as RecordsMerged, co as RegisteredTable, cp as ResolvedPublishBinding, cq as ResolvedPublishBindingKind, cr as RestorePreview, cs as RestoreResult, ct as RetypeBehaviour, cu as RetypePreview, cv as RowAction, cw as RowActionStep, cx as RowDefaultsApplied, cy as SHOWN_TO_LABEL, cz as SHOWN_TO_VALUES, cA as SHOWN_TO_WHO_MAY_CHANGE, cB as STAGE_RULE_ENFORCEMENT, cC as STAGE_RULE_ON_FAIL, cD as ShownTo, cE as StagePending, cF as StagePendingOnBoard, cG as StageRuleEnforcement, cH as StageRuleOnFail, cI as StageRuleWarning, cJ as SyncAutoRefresh, cK as Table, T as TableArchiveProgress, cL as TableCapacity, cM as TableCopyInProgress, cN as TableCopySpec, cO as TableDecorations, cS as TableHome, cT as TableHomeDestination, cU as TableLevel, cV as TableLevelApproval, cW as TableLevelFacts, cX as TableLevelSet, cY as TableListEntry, c_ as TableMoved, c$ as TablePlacement, d0 as TablePlacementFact, d1 as TableReaderRule, d2 as TableRestoreProgress, d3 as TableRowCount, d4 as TableRowDefaults, d5 as TableRowDefaultsPatch, d6 as TableRowLabel, d7 as TableSyncAnswer, d8 as TableSyncResult, d9 as TableSyncSettings, da as TableSyncSource, db as TableSyncSourceDocument, dc as TableSyncSpec, dd as TableWebhook, de as TableWebhookDeclared, df as TypedChoiceDecision, dg as ViewLayout, dh as ViewOrderSet, di as WorkApprovalDecision, dj as WorkApprovalFiled, dk as WorkApprovalState, dl as WorkApprover, dm as WorkAssignment, dn as WorkAssignmentField, dp as WorkChange, dq as WorkDecideMany, dr as WorkDecideManyItem, ds as WorkDecideManyResult, dt as WorkDecideVerdict, du as WorkDueState, dv as WorkGraph, dw as WorkInboxItem, dx as WorkInboxKind, dy as WorkInboxView, dz as WorkInstantiation, dA as WorkListFlavour, dB as WorkListItem, dC as WorkOrigin, dD as WorkRecordState, dE as WorkSlotHold, dF as WorkState, dG as WorkTemplateNode, dH as WorkTemplateRelation, dI as WorkTurn, dJ as actionRefusals, dK as archivedByLine, dL as archivedWhen, dM as asChoiceNudge, dO as automationWebhookUrl, dP as choiceSlug, dQ as choiceValuesOf, dR as choicesOf, dS as clearsRowLabel, dU as decideTypedChoice, dV as declareDrillDefinition, dW as drillAnswerOf, dX as drillFindingKnob, dY as emptyArchiveLine, dZ as exportPageXlsx, d_ as holdsARetiredChoice, e1 as isArchiveLane, e2 as isFoundation, e3 as isShownTo, 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 valueConverts, eB as withRowCounts, eD as withTablePlacement } from './client-B7KEs9hi.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-iATV-A2v.cjs';
|
|
6
6
|
import { m as CoercibleField } from './field-ppX29ddi.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-ppX29ddi.cjs';
|
|
@@ -171,6 +171,19 @@ interface BasePort {
|
|
|
171
171
|
/** `RecordsClient.tableArchive` / its restore: put a copy away, or bring it back to be copied from. */
|
|
172
172
|
archive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
173
173
|
unarchive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
174
|
+
/** The door that makes a table's Home today (`declareTable`): a new record "<name>" in the person kernel. A NEW base is a new Home. */
|
|
175
|
+
createHome?(name: string): Promise<RecordsResult<Uuid>>;
|
|
176
|
+
/** The one door that moves a table between Homes: `custom.record_reparent` (`RecordsClient.recordReparent`). Pages and automations ride on their table. */
|
|
177
|
+
moveInto?(tableId: Uuid, homeId: Uuid): Promise<RecordsResult<unknown>>;
|
|
178
|
+
/** Columns and views of a table (`RecordsClient.fields` / `views`): a copy's automations and pages name the COPY's column and view ids. */
|
|
179
|
+
fieldsOf?(tableId: Uuid): Promise<RecordsResult<Array<{
|
|
180
|
+
id: Uuid;
|
|
181
|
+
key: string;
|
|
182
|
+
}>>>;
|
|
183
|
+
viewsOf?(tableId: Uuid): Promise<RecordsResult<Array<{
|
|
184
|
+
id: Uuid;
|
|
185
|
+
name: string;
|
|
186
|
+
}>>>;
|
|
174
187
|
}
|
|
175
188
|
interface BaseCopyProgress {
|
|
176
189
|
/** 1-based position of the table being copied, and how many there are. */
|
|
@@ -180,6 +193,8 @@ interface BaseCopyProgress {
|
|
|
180
193
|
pass: TableDuplicateProgress | null;
|
|
181
194
|
}
|
|
182
195
|
interface BaseCopied {
|
|
196
|
+
/** The NEW Home every copied table now lives in (a copy is its own base); null when the port cannot make Homes. */
|
|
197
|
+
homeId: Uuid | null;
|
|
183
198
|
/** Source table id → its copy. */
|
|
184
199
|
pairs: Record<Uuid, Uuid>;
|
|
185
200
|
tables: Array<{
|
|
@@ -210,6 +225,8 @@ type BaseCopyResult = {
|
|
|
210
225
|
};
|
|
211
226
|
/** "Harbor Studio (copy)", the same word the table dialog offers. */
|
|
212
227
|
declare function baseCopyName(name: string): string;
|
|
228
|
+
/** "Harbor Studio (restored 10/15/2026)". */
|
|
229
|
+
declare function restoredBaseName(name: string, on: string): string;
|
|
213
230
|
/** Duplicate every table of a base. `names` (by source table id) overrides the "<name>" a copy is given. */
|
|
214
231
|
declare function duplicateBase(port: BasePort, args: {
|
|
215
232
|
organizationId: Uuid;
|
|
@@ -218,9 +235,16 @@ declare function duplicateBase(port: BasePort, args: {
|
|
|
218
235
|
/** The copy's name for each table; default the source's own name (the copies live together in the new base). */
|
|
219
236
|
nameFor?: (table: BaseTable) => string;
|
|
220
237
|
onProgress?: (p: BaseCopyProgress) => void;
|
|
238
|
+
/** Put the copies in a NEW Home with this name (a base is a Home); absent keeps each copy where the per-table door put it. */
|
|
239
|
+
homeName?: string;
|
|
221
240
|
}): Promise<BaseCopyResult>;
|
|
222
241
|
/** Every table id (and any id of a copied table) inside a document becomes its copy's id. Column keys are kept by a copy, so they stay. */
|
|
223
242
|
declare function pointAtCopies<T>(doc: T, pairs: Record<Uuid, Uuid>): T;
|
|
243
|
+
/**
|
|
244
|
+
* Every id a copy renamed, old → new: the tables, then each column (matched by key, which a copy keeps) and each view (matched by
|
|
245
|
+
* name). An automation or page of the copy that kept the ORIGINAL's column or view ids would watch the wrong table.
|
|
246
|
+
*/
|
|
247
|
+
declare function idsOfCopies(port: BasePort, pairs: Record<Uuid, Uuid>): Promise<Record<Uuid, Uuid>>;
|
|
224
248
|
interface BaseSnapshotRecord {
|
|
225
249
|
label: string;
|
|
226
250
|
origin: "manual" | "schedule";
|
|
@@ -251,6 +275,8 @@ declare function snapshotBase(port: BasePort, args: {
|
|
|
251
275
|
declare function restoreSnapshot(port: BasePort, args: {
|
|
252
276
|
organizationId: Uuid;
|
|
253
277
|
snapshot: BaseSnapshotRecord;
|
|
278
|
+
baseName?: string;
|
|
279
|
+
restoredOn?: string;
|
|
254
280
|
onProgress?: (p: BaseCopyProgress) => void;
|
|
255
281
|
}): Promise<BaseCopyResult>;
|
|
256
282
|
|
|
@@ -563,4 +589,4 @@ declare function alternatePatch(document: RecordDocument, field_key: string, alt
|
|
|
563
589
|
};
|
|
564
590
|
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordAsOf" | "recordUpdate">, { record_id, field_key, alternate_index, rank }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
565
591
|
|
|
566
|
-
export { type BaseCopied, type BaseCopyProgress, type BaseCopyResult, type BasePort, type BaseSnapshotRecord, type BaseTable, CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, TableDuplicateProgress, TableDuplicated, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, baseCopyName, chooseAlternate, duplicateBase, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, pointAtCopies, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
592
|
+
export { type BaseCopied, type BaseCopyProgress, type BaseCopyResult, type BasePort, type BaseSnapshotRecord, type BaseTable, CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, TableDuplicateProgress, TableDuplicated, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, baseCopyName, chooseAlternate, duplicateBase, filterWithAutonumber, idsOfCopies, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, pointAtCopies, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, restoredBaseName, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { U as Uuid, R as RecordsResult, a0 as MergeFieldSource, $ as MergeFieldSemanticType, _ as MergeFieldModifier, a3 as OverridePolicy, B as Delivery, h as Timestamp, N as Freshness, n as RecordDocument } from './record-C8q21jjB.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 FORMULA_NODE_RESULTS, L as FRESHNESS, o as FieldBehavior, c as FieldSensitivity, F as FieldSource, M as ForbiddenEnvelopeWord, H as HiddenFieldNotice, Q as KERNEL_TABLES, V as KernelTableName, W as KeysetRow, X as MERGE_FIELD_MODIFIERS, Y as MERGE_FIELD_SEMANTIC_TYPES, Z as MERGE_FIELD_SOURCES, a1 as ON_DELETE, a2 as OVERRIDE_POLICIES, O as OnDelete, a4 as PARITY_FIELD_TYPES, a5 as PER_VALUE_ACCESS_WORDS, p as ParityFieldType, a6 as PerValueAccessWord, P as PgError, r as PredictedRefusal, a7 as ProvenancePointer, a8 as RELATION_BINDINGS, a9 as RELATION_CARDINALITIES, aa as RELATION_FLAVORS, ab as RETIRED_ACTOR_WORDS, ac as RULE_NODE_KINDS, ad as RULE_USES, l as ReadRow, s as ReadValue, ae as RecordChange, af as RecordChangeResult, ag as RecordGraphWritten, ah as RecordKeysetPage, ai as RecordPage, k as RecordPageSort, aj as RecordRead, ak as RecordRevision, a as RecordsError, m as RecordsErrorCode, g as RelationBinding, f as RelationCardinality, e as RelationFlavor, al as RetiredActorWord, i as RuleNodeKind, j as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, q as StaleWriteDetail, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as StoredRecord, at as TABLE_DISPLAYS, au as TABLE_ORIGINS, av as TABLE_TYPES, b as TableDisplay, aw as TableOrigin, T as TableType, ax as VALUE_ALTERNATE_KEYS, ay as VALUE_ENVELOPE_KEYS, az as ValueAlternate, aA as ValueAlternateKey, aB as ValueEnvelope, aC as ValueEnvelopeKey, aD as ValueSource, aE as WriteConflict, aF as err, aG as isLockedStub, aH as isRecordsErr, aI as ok, aJ as splitLockedRows, aK as unwrapRecords } from './record-C8q21jjB.js';
|
|
3
|
-
import { cP as TableDuplicateProgress, cQ as TableDuplicated, O as CaptureFileRef, P as CaptureOutcome, R as RecordsClient } from './client-
|
|
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 AutomationComparison, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRevision, w as AutomationRevisions, x as AutomationRun, y as AutomationRunStatus, z as AutomationRuns, B as AutomationSpec, C as AutomationStep, D as AutomationTested, E as AutomationToken, G as AutomationTrigger, H as AutomationValue, I as AutomationValues, J as AutomationWeekday, K as AutomationWhen, L as BUILT_KIND_WORD, M as CHOICE_NUDGES, N as CaptureField, Q as CaptureQuestion, S as CaptureSheetFace, U as CaptureSheetSummary, V as ChecklistDeclared, W as ChecklistRequirement, X as ChecklistRequirementKind, Y as ChecklistRoleSpec, Z as ChecklistRunStarted, _ as ChecklistRunStep, $ as ChecklistRunSummary, a0 as ChecklistSpec, a1 as ChecklistStepCompleted, a2 as ChecklistStepSpec, a3 as ChecklistTemplateShape, a4 as ChecklistTemplateSummary, a5 as ChecklistTrigger, a6 as ChecklistTriggerKind, a7 as ChoiceCellBack, a8 as ChoiceLike, a9 as ChoiceNudge, aa as ChoiceOption, ab as ChoiceRehome, ac as ChoiceUsage, ad as ChoicesRehomed, ae as CommentThreadRead, af as CommentWritten, ag as ConversationScope, ah as ConversationScopeContext, ai as CustomFieldTableType, aj as DEFAULT_ARCHIVE_LANE, al as DRILL_CHART_TOKENS, am as DRILL_DESCRIPTION_MAX, an as DRILL_DOORS, ao as DRILL_SCHEMA, ap as DataHomeTable, aq as DecorationColor, ar as DecorationPath, as as DecorationRule, at as DecorationRuleOp, au as DecorationTarget, av as DocRenderRow, aw as DocSignatureCheck, ax as DocSignatureRow, ay as DocTemplateRow, az as DocToken, aA as DocUnresolvedToken, aB as DrillAdHocOp, aC as DrillAnswer, aD as DrillAnswerRow, aE as DrillChartToken, aF as DrillDeclaration, aG as DrillDefinition, aH as DrillDimension, aI as DrillFinding, aJ as DrillGrain, aK as DrillHaving, aL as DrillLane, aM as DrillLevel, aN as DrillMeasure, aO as DrillMeasureOp, aP as DrillMeasureWhereValue, aQ as DrillPath, aR as DrillQuestion, aS as DrillRecords, aT as DrillRowsPage, aU as DrillSource, aV as DrillView, aW as EnrichAlternate, aX as EnrichCell, aY as EnrichDeclared, aZ as EnrichDueRow, a_ as EnrichRun, a$ as EnrichSource, b0 as Enrichment, b1 as EnrichmentSummary, b2 as EntityBackLinkItem, b3 as EntityBackLinks, b4 as EntityFieldRights, b5 as EntityFieldValue, b6 as EntityFieldsAcross, b7 as EntityRecordMatch, b8 as EntityRecordRead, b9 as EntityRecordsFound, ba as EntityRowWritten, bb as EntityTableFacts, bc as ExternalPrincipalCard, F as FieldDrift, bd as FieldDriftAspect, be as FieldHistoryEntry, bf as FieldRetyped, bg as FormArchiveAnswer, bh as FormulaParse, bi as FormulaPreview, bj as GridLayout, bk as GridLayoutMode, bl as GridRowHeight, bm as HistoryActor, bn as HistoryActorKind, bo as HistoryChange, bp as Home, bq as ImportBatchResult, br as ImportColumnPlan, bs as ImportColumnsDeclared, bt as ImportFinished, bu as ImportOpened, bv as ImportOutcome, bw as ImportPlan, bx as ImportPolicy, by as ImportProposal, bz as ImportReport, bA as ImportRun, bB as InboundAddress, bC as InboundDeclared, bD as InboxCounts, bE as InboxStateChange, bF as IoExportPage, bG as MigrationEntry, bH as MigrationUndone, bI as NewEntityFieldDeclaration, bJ as OutsideShareAnswer, bK as PIPELINE_RULE_KINDS, bL as ParentExtracted, bM as PickListDocument, bN as PickListItem, bO as PickListItemInput, bP as Pipeline, bQ as PipelineColumn, bR as PipelineDeclared, bS as PipelineGate, bT as PipelineGatePreview, bU as PipelineMissingField, bV as PipelineMoveMany, bW as PipelineMoveManyItem, bX as PipelineMoveManyResult, bY as PipelineMoveResult, bZ as PipelineMoveVerdict, b_ as PipelineRule, b$ as PipelineRuleKind, c0 as PipelineSpec, c1 as PipelineStage, c2 as PipelineVerdict, c4 as PublishBinding, c5 as PublishBindingKind, c7 as ROW_LABEL_FORMULA_MAX_LENGTH, c8 as ROW_WEB_NOT_READY, c9 as RecordChangeAction, ca as RecordComment, cb as RecordEvent, cc as RecordHeader, cd as RecordHistoryEntry, cf as RecordRowControls, cg as RecordScopeComment, ch as RecordScopeContext, ci as RecordScopeField, cj as RecordScopeHistoryEntry, ck as RecordScopeRelation, cl as RecordScopeWithheld, cm as RecordSplit, cn as RecordsMerged, co as RegisteredTable, cp as ResolvedPublishBinding, cq as ResolvedPublishBindingKind, cr as RestorePreview, cs as RestoreResult, ct as RetypeBehaviour, cu as RetypePreview, cv as RowAction, cw as RowActionStep, cx as RowDefaultsApplied, cy as SHOWN_TO_LABEL, cz as SHOWN_TO_VALUES, cA as SHOWN_TO_WHO_MAY_CHANGE, cB as STAGE_RULE_ENFORCEMENT, cC as STAGE_RULE_ON_FAIL, cD as ShownTo, cE as StagePending, cF as StagePendingOnBoard, cG as StageRuleEnforcement, cH as StageRuleOnFail, cI as StageRuleWarning, cJ as SyncAutoRefresh, cK as Table, T as TableArchiveProgress, cL as TableCapacity, cM as TableCopyInProgress, cN as TableCopySpec, cO as TableDecorations, cS as TableHome, cT as TableHomeDestination, cU as TableLevel, cV as TableLevelApproval, cW as TableLevelFacts, cX as TableLevelSet, cY as TableListEntry, c_ as TableMoved, c$ as TablePlacement, d0 as TablePlacementFact, d1 as TableReaderRule, d2 as TableRestoreProgress, d3 as TableRowCount, d4 as TableRowDefaults, d5 as TableRowDefaultsPatch, d6 as TableRowLabel, d7 as TableSyncAnswer, d8 as TableSyncResult, d9 as TableSyncSettings, da as TableSyncSource, db as TableSyncSourceDocument, dc as TableSyncSpec, dd as TableWebhook, de as TableWebhookDeclared, df as TypedChoiceDecision, dg as ViewLayout, dh as ViewOrderSet, di as WorkApprovalDecision, dj as WorkApprovalFiled, dk as WorkApprovalState, dl as WorkApprover, dm as WorkAssignment, dn as WorkAssignmentField, dp as WorkChange, dq as WorkDecideMany, dr as WorkDecideManyItem, ds as WorkDecideManyResult, dt as WorkDecideVerdict, du as WorkDueState, dv as WorkGraph, dw as WorkInboxItem, dx as WorkInboxKind, dy as WorkInboxView, dz as WorkInstantiation, dA as WorkListFlavour, dB as WorkListItem, dC as WorkOrigin, dD as WorkRecordState, dE as WorkSlotHold, dF as WorkState, dG as WorkTemplateNode, dH as WorkTemplateRelation, dI as WorkTurn, dJ as actionRefusals, dK as archivedByLine, dL as archivedWhen, dM as asChoiceNudge, dO as automationWebhookUrl, dP as choiceSlug, dQ as choiceValuesOf, dR as choicesOf, dS as clearsRowLabel, dU as decideTypedChoice, dV as declareDrillDefinition, dW as drillAnswerOf, dX as drillFindingKnob, dY as emptyArchiveLine, dZ as exportPageXlsx, d_ as holdsARetiredChoice, e1 as isArchiveLane, e2 as isFoundation, e3 as isShownTo, 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 valueConverts, eB as withRowCounts, eD as withTablePlacement } from './client-
|
|
3
|
+
import { cP as TableDuplicateProgress, cQ as TableDuplicated, O as CaptureFileRef, P as CaptureOutcome, R as RecordsClient } from './client-Dthx26hr.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 AutomationComparison, p as AutomationDeclared, q as AutomationFilter, r as AutomationFlipped, s as AutomationItem, t as AutomationLastRun, u as AutomationList, v as AutomationRevision, w as AutomationRevisions, x as AutomationRun, y as AutomationRunStatus, z as AutomationRuns, B as AutomationSpec, C as AutomationStep, D as AutomationTested, E as AutomationToken, G as AutomationTrigger, H as AutomationValue, I as AutomationValues, J as AutomationWeekday, K as AutomationWhen, L as BUILT_KIND_WORD, M as CHOICE_NUDGES, N as CaptureField, Q as CaptureQuestion, S as CaptureSheetFace, U as CaptureSheetSummary, V as ChecklistDeclared, W as ChecklistRequirement, X as ChecklistRequirementKind, Y as ChecklistRoleSpec, Z as ChecklistRunStarted, _ as ChecklistRunStep, $ as ChecklistRunSummary, a0 as ChecklistSpec, a1 as ChecklistStepCompleted, a2 as ChecklistStepSpec, a3 as ChecklistTemplateShape, a4 as ChecklistTemplateSummary, a5 as ChecklistTrigger, a6 as ChecklistTriggerKind, a7 as ChoiceCellBack, a8 as ChoiceLike, a9 as ChoiceNudge, aa as ChoiceOption, ab as ChoiceRehome, ac as ChoiceUsage, ad as ChoicesRehomed, ae as CommentThreadRead, af as CommentWritten, ag as ConversationScope, ah as ConversationScopeContext, ai as CustomFieldTableType, aj as DEFAULT_ARCHIVE_LANE, al as DRILL_CHART_TOKENS, am as DRILL_DESCRIPTION_MAX, an as DRILL_DOORS, ao as DRILL_SCHEMA, ap as DataHomeTable, aq as DecorationColor, ar as DecorationPath, as as DecorationRule, at as DecorationRuleOp, au as DecorationTarget, av as DocRenderRow, aw as DocSignatureCheck, ax as DocSignatureRow, ay as DocTemplateRow, az as DocToken, aA as DocUnresolvedToken, aB as DrillAdHocOp, aC as DrillAnswer, aD as DrillAnswerRow, aE as DrillChartToken, aF as DrillDeclaration, aG as DrillDefinition, aH as DrillDimension, aI as DrillFinding, aJ as DrillGrain, aK as DrillHaving, aL as DrillLane, aM as DrillLevel, aN as DrillMeasure, aO as DrillMeasureOp, aP as DrillMeasureWhereValue, aQ as DrillPath, aR as DrillQuestion, aS as DrillRecords, aT as DrillRowsPage, aU as DrillSource, aV as DrillView, aW as EnrichAlternate, aX as EnrichCell, aY as EnrichDeclared, aZ as EnrichDueRow, a_ as EnrichRun, a$ as EnrichSource, b0 as Enrichment, b1 as EnrichmentSummary, b2 as EntityBackLinkItem, b3 as EntityBackLinks, b4 as EntityFieldRights, b5 as EntityFieldValue, b6 as EntityFieldsAcross, b7 as EntityRecordMatch, b8 as EntityRecordRead, b9 as EntityRecordsFound, ba as EntityRowWritten, bb as EntityTableFacts, bc as ExternalPrincipalCard, F as FieldDrift, bd as FieldDriftAspect, be as FieldHistoryEntry, bf as FieldRetyped, bg as FormArchiveAnswer, bh as FormulaParse, bi as FormulaPreview, bj as GridLayout, bk as GridLayoutMode, bl as GridRowHeight, bm as HistoryActor, bn as HistoryActorKind, bo as HistoryChange, bp as Home, bq as ImportBatchResult, br as ImportColumnPlan, bs as ImportColumnsDeclared, bt as ImportFinished, bu as ImportOpened, bv as ImportOutcome, bw as ImportPlan, bx as ImportPolicy, by as ImportProposal, bz as ImportReport, bA as ImportRun, bB as InboundAddress, bC as InboundDeclared, bD as InboxCounts, bE as InboxStateChange, bF as IoExportPage, bG as MigrationEntry, bH as MigrationUndone, bI as NewEntityFieldDeclaration, bJ as OutsideShareAnswer, bK as PIPELINE_RULE_KINDS, bL as ParentExtracted, bM as PickListDocument, bN as PickListItem, bO as PickListItemInput, bP as Pipeline, bQ as PipelineColumn, bR as PipelineDeclared, bS as PipelineGate, bT as PipelineGatePreview, bU as PipelineMissingField, bV as PipelineMoveMany, bW as PipelineMoveManyItem, bX as PipelineMoveManyResult, bY as PipelineMoveResult, bZ as PipelineMoveVerdict, b_ as PipelineRule, b$ as PipelineRuleKind, c0 as PipelineSpec, c1 as PipelineStage, c2 as PipelineVerdict, c4 as PublishBinding, c5 as PublishBindingKind, c7 as ROW_LABEL_FORMULA_MAX_LENGTH, c8 as ROW_WEB_NOT_READY, c9 as RecordChangeAction, ca as RecordComment, cb as RecordEvent, cc as RecordHeader, cd as RecordHistoryEntry, cf as RecordRowControls, cg as RecordScopeComment, ch as RecordScopeContext, ci as RecordScopeField, cj as RecordScopeHistoryEntry, ck as RecordScopeRelation, cl as RecordScopeWithheld, cm as RecordSplit, cn as RecordsMerged, co as RegisteredTable, cp as ResolvedPublishBinding, cq as ResolvedPublishBindingKind, cr as RestorePreview, cs as RestoreResult, ct as RetypeBehaviour, cu as RetypePreview, cv as RowAction, cw as RowActionStep, cx as RowDefaultsApplied, cy as SHOWN_TO_LABEL, cz as SHOWN_TO_VALUES, cA as SHOWN_TO_WHO_MAY_CHANGE, cB as STAGE_RULE_ENFORCEMENT, cC as STAGE_RULE_ON_FAIL, cD as ShownTo, cE as StagePending, cF as StagePendingOnBoard, cG as StageRuleEnforcement, cH as StageRuleOnFail, cI as StageRuleWarning, cJ as SyncAutoRefresh, cK as Table, T as TableArchiveProgress, cL as TableCapacity, cM as TableCopyInProgress, cN as TableCopySpec, cO as TableDecorations, cS as TableHome, cT as TableHomeDestination, cU as TableLevel, cV as TableLevelApproval, cW as TableLevelFacts, cX as TableLevelSet, cY as TableListEntry, c_ as TableMoved, c$ as TablePlacement, d0 as TablePlacementFact, d1 as TableReaderRule, d2 as TableRestoreProgress, d3 as TableRowCount, d4 as TableRowDefaults, d5 as TableRowDefaultsPatch, d6 as TableRowLabel, d7 as TableSyncAnswer, d8 as TableSyncResult, d9 as TableSyncSettings, da as TableSyncSource, db as TableSyncSourceDocument, dc as TableSyncSpec, dd as TableWebhook, de as TableWebhookDeclared, df as TypedChoiceDecision, dg as ViewLayout, dh as ViewOrderSet, di as WorkApprovalDecision, dj as WorkApprovalFiled, dk as WorkApprovalState, dl as WorkApprover, dm as WorkAssignment, dn as WorkAssignmentField, dp as WorkChange, dq as WorkDecideMany, dr as WorkDecideManyItem, ds as WorkDecideManyResult, dt as WorkDecideVerdict, du as WorkDueState, dv as WorkGraph, dw as WorkInboxItem, dx as WorkInboxKind, dy as WorkInboxView, dz as WorkInstantiation, dA as WorkListFlavour, dB as WorkListItem, dC as WorkOrigin, dD as WorkRecordState, dE as WorkSlotHold, dF as WorkState, dG as WorkTemplateNode, dH as WorkTemplateRelation, dI as WorkTurn, dJ as actionRefusals, dK as archivedByLine, dL as archivedWhen, dM as asChoiceNudge, dO as automationWebhookUrl, dP as choiceSlug, dQ as choiceValuesOf, dR as choicesOf, dS as clearsRowLabel, dU as decideTypedChoice, dV as declareDrillDefinition, dW as drillAnswerOf, dX as drillFindingKnob, dY as emptyArchiveLine, dZ as exportPageXlsx, d_ as holdsARetiredChoice, e1 as isArchiveLane, e2 as isFoundation, e3 as isShownTo, 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 valueConverts, eB as withRowCounts, eD as withTablePlacement } from './client-Dthx26hr.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-BCNNghmf.js';
|
|
6
6
|
import { m as CoercibleField } from './field-BHlhq24W.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-BHlhq24W.js';
|
|
@@ -171,6 +171,19 @@ interface BasePort {
|
|
|
171
171
|
/** `RecordsClient.tableArchive` / its restore: put a copy away, or bring it back to be copied from. */
|
|
172
172
|
archive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
173
173
|
unarchive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
174
|
+
/** The door that makes a table's Home today (`declareTable`): a new record "<name>" in the person kernel. A NEW base is a new Home. */
|
|
175
|
+
createHome?(name: string): Promise<RecordsResult<Uuid>>;
|
|
176
|
+
/** The one door that moves a table between Homes: `custom.record_reparent` (`RecordsClient.recordReparent`). Pages and automations ride on their table. */
|
|
177
|
+
moveInto?(tableId: Uuid, homeId: Uuid): Promise<RecordsResult<unknown>>;
|
|
178
|
+
/** Columns and views of a table (`RecordsClient.fields` / `views`): a copy's automations and pages name the COPY's column and view ids. */
|
|
179
|
+
fieldsOf?(tableId: Uuid): Promise<RecordsResult<Array<{
|
|
180
|
+
id: Uuid;
|
|
181
|
+
key: string;
|
|
182
|
+
}>>>;
|
|
183
|
+
viewsOf?(tableId: Uuid): Promise<RecordsResult<Array<{
|
|
184
|
+
id: Uuid;
|
|
185
|
+
name: string;
|
|
186
|
+
}>>>;
|
|
174
187
|
}
|
|
175
188
|
interface BaseCopyProgress {
|
|
176
189
|
/** 1-based position of the table being copied, and how many there are. */
|
|
@@ -180,6 +193,8 @@ interface BaseCopyProgress {
|
|
|
180
193
|
pass: TableDuplicateProgress | null;
|
|
181
194
|
}
|
|
182
195
|
interface BaseCopied {
|
|
196
|
+
/** The NEW Home every copied table now lives in (a copy is its own base); null when the port cannot make Homes. */
|
|
197
|
+
homeId: Uuid | null;
|
|
183
198
|
/** Source table id → its copy. */
|
|
184
199
|
pairs: Record<Uuid, Uuid>;
|
|
185
200
|
tables: Array<{
|
|
@@ -210,6 +225,8 @@ type BaseCopyResult = {
|
|
|
210
225
|
};
|
|
211
226
|
/** "Harbor Studio (copy)", the same word the table dialog offers. */
|
|
212
227
|
declare function baseCopyName(name: string): string;
|
|
228
|
+
/** "Harbor Studio (restored 10/15/2026)". */
|
|
229
|
+
declare function restoredBaseName(name: string, on: string): string;
|
|
213
230
|
/** Duplicate every table of a base. `names` (by source table id) overrides the "<name>" a copy is given. */
|
|
214
231
|
declare function duplicateBase(port: BasePort, args: {
|
|
215
232
|
organizationId: Uuid;
|
|
@@ -218,9 +235,16 @@ declare function duplicateBase(port: BasePort, args: {
|
|
|
218
235
|
/** The copy's name for each table; default the source's own name (the copies live together in the new base). */
|
|
219
236
|
nameFor?: (table: BaseTable) => string;
|
|
220
237
|
onProgress?: (p: BaseCopyProgress) => void;
|
|
238
|
+
/** Put the copies in a NEW Home with this name (a base is a Home); absent keeps each copy where the per-table door put it. */
|
|
239
|
+
homeName?: string;
|
|
221
240
|
}): Promise<BaseCopyResult>;
|
|
222
241
|
/** Every table id (and any id of a copied table) inside a document becomes its copy's id. Column keys are kept by a copy, so they stay. */
|
|
223
242
|
declare function pointAtCopies<T>(doc: T, pairs: Record<Uuid, Uuid>): T;
|
|
243
|
+
/**
|
|
244
|
+
* Every id a copy renamed, old → new: the tables, then each column (matched by key, which a copy keeps) and each view (matched by
|
|
245
|
+
* name). An automation or page of the copy that kept the ORIGINAL's column or view ids would watch the wrong table.
|
|
246
|
+
*/
|
|
247
|
+
declare function idsOfCopies(port: BasePort, pairs: Record<Uuid, Uuid>): Promise<Record<Uuid, Uuid>>;
|
|
224
248
|
interface BaseSnapshotRecord {
|
|
225
249
|
label: string;
|
|
226
250
|
origin: "manual" | "schedule";
|
|
@@ -251,6 +275,8 @@ declare function snapshotBase(port: BasePort, args: {
|
|
|
251
275
|
declare function restoreSnapshot(port: BasePort, args: {
|
|
252
276
|
organizationId: Uuid;
|
|
253
277
|
snapshot: BaseSnapshotRecord;
|
|
278
|
+
baseName?: string;
|
|
279
|
+
restoredOn?: string;
|
|
254
280
|
onProgress?: (p: BaseCopyProgress) => void;
|
|
255
281
|
}): Promise<BaseCopyResult>;
|
|
256
282
|
|
|
@@ -563,4 +589,4 @@ declare function alternatePatch(document: RecordDocument, field_key: string, alt
|
|
|
563
589
|
};
|
|
564
590
|
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordAsOf" | "recordUpdate">, { record_id, field_key, alternate_index, rank }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
565
591
|
|
|
566
|
-
export { type BaseCopied, type BaseCopyProgress, type BaseCopyResult, type BasePort, type BaseSnapshotRecord, type BaseTable, CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, TableDuplicateProgress, TableDuplicated, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, baseCopyName, chooseAlternate, duplicateBase, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, pointAtCopies, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
592
|
+
export { type BaseCopied, type BaseCopyProgress, type BaseCopyResult, type BasePort, type BaseSnapshotRecord, type BaseTable, CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, type ChooseAlternateArgs, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, RecordDocument, RecordsResult, type ResolutionTriple, TableDuplicateProgress, TableDuplicated, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, baseCopyName, chooseAlternate, duplicateBase, filterWithAutonumber, idsOfCopies, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, pointAtCopies, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, restoredBaseName, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.js
CHANGED
|
@@ -1700,6 +1700,9 @@ function moveConsequence(home, to) {
|
|
|
1700
1700
|
function baseCopyName(name) {
|
|
1701
1701
|
return `${name.trim() || "Base"} (copy)`;
|
|
1702
1702
|
}
|
|
1703
|
+
function restoredBaseName(name, on) {
|
|
1704
|
+
return `${name.trim() || "Base"} (restored ${on})`;
|
|
1705
|
+
}
|
|
1703
1706
|
async function duplicateBase(port, args) {
|
|
1704
1707
|
const made = [];
|
|
1705
1708
|
const pairs = {};
|
|
@@ -1719,10 +1722,21 @@ async function duplicateBase(port, args) {
|
|
|
1719
1722
|
}
|
|
1720
1723
|
const fin = args.tables.length > 1 ? await port.finish({ organizationId: args.organizationId, pairs }) : null;
|
|
1721
1724
|
if (fin && !fin.ok) return { ok: false, error: fin.error, stoppedAt: args.tables[args.tables.length - 1], made };
|
|
1725
|
+
let homeId = null;
|
|
1726
|
+
if (args.homeName && port.createHome && port.moveInto) {
|
|
1727
|
+
const home = await port.createHome(args.homeName);
|
|
1728
|
+
if (!home.ok) return { ok: false, error: home.error, stoppedAt: args.tables[args.tables.length - 1], made };
|
|
1729
|
+
homeId = home.data;
|
|
1730
|
+
for (const m of made) {
|
|
1731
|
+
const moved = await port.moveInto(m.copy.id, homeId);
|
|
1732
|
+
if (!moved.ok) return { ok: false, error: moved.error, stoppedAt: m.from, made };
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1722
1735
|
const extras = await copyExtras(port, args.tables, pairs);
|
|
1723
1736
|
return {
|
|
1724
1737
|
ok: true,
|
|
1725
1738
|
data: {
|
|
1739
|
+
homeId,
|
|
1726
1740
|
pairs,
|
|
1727
1741
|
tables: made,
|
|
1728
1742
|
relinkedColumns: fin?.ok ? fin.data.relinked_columns : 0,
|
|
@@ -1737,10 +1751,47 @@ function pointAtCopies(doc, pairs) {
|
|
|
1737
1751
|
for (const [from, to] of Object.entries(pairs)) text = text.split(from).join(to);
|
|
1738
1752
|
return JSON.parse(text);
|
|
1739
1753
|
}
|
|
1754
|
+
function sentence(error) {
|
|
1755
|
+
const m = error?.message;
|
|
1756
|
+
return typeof m === "string" && m ? m : "the store gave no reason.";
|
|
1757
|
+
}
|
|
1758
|
+
function refusedSentence(data) {
|
|
1759
|
+
const errors = data?._errors;
|
|
1760
|
+
const lines = errors ? Object.entries(errors).map(([path, why]) => `${path}: ${why}`) : [];
|
|
1761
|
+
return lines.length ? lines.join("; ") : "the store gave no reason.";
|
|
1762
|
+
}
|
|
1763
|
+
async function idsOfCopies(port, pairs) {
|
|
1764
|
+
const ids = { ...pairs };
|
|
1765
|
+
if (!port.fieldsOf && !port.viewsOf) return ids;
|
|
1766
|
+
for (const [from, to] of Object.entries(pairs)) {
|
|
1767
|
+
if (port.fieldsOf) {
|
|
1768
|
+
const [a, b] = await Promise.all([port.fieldsOf(from), port.fieldsOf(to)]);
|
|
1769
|
+
if (a.ok && b.ok) {
|
|
1770
|
+
const byKey = new Map(b.data.map((f) => [f.key, f.id]));
|
|
1771
|
+
for (const f of a.data) {
|
|
1772
|
+
const n = byKey.get(f.key);
|
|
1773
|
+
if (n && n !== f.id) ids[f.id] = n;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
if (port.viewsOf) {
|
|
1778
|
+
const [a, b] = await Promise.all([port.viewsOf(from), port.viewsOf(to)]);
|
|
1779
|
+
if (a.ok && b.ok) {
|
|
1780
|
+
const byName = new Map(b.data.map((v) => [v.name, v.id]));
|
|
1781
|
+
for (const v of a.data) {
|
|
1782
|
+
const n = byName.get(v.name);
|
|
1783
|
+
if (n && n !== v.id) ids[v.id] = n;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
return ids;
|
|
1789
|
+
}
|
|
1740
1790
|
async function copyExtras(port, tables, pairs) {
|
|
1741
1791
|
let automations = 0;
|
|
1742
1792
|
let pages = 0;
|
|
1743
1793
|
const extrasRefused = [];
|
|
1794
|
+
const ids = await idsOfCopies(port, pairs);
|
|
1744
1795
|
for (const t of tables) {
|
|
1745
1796
|
const copy = pairs[t.id];
|
|
1746
1797
|
if (!copy) continue;
|
|
@@ -1748,13 +1799,14 @@ async function copyExtras(port, tables, pairs) {
|
|
|
1748
1799
|
const list = await port.automations(t.id);
|
|
1749
1800
|
if (list.ok) {
|
|
1750
1801
|
for (const a of list.data.automations) {
|
|
1751
|
-
const made = await port.automationDeclare({ table_id: copy, spec: pointAtCopies(a.spec,
|
|
1802
|
+
const made = await port.automationDeclare({ table_id: copy, spec: pointAtCopies(a.spec, ids) });
|
|
1752
1803
|
if (made.ok && made.data.ok && made.data.automation_id) {
|
|
1753
|
-
await port.automationSetEnabled?.({ automation_id: made.data.automation_id, enabled: false });
|
|
1754
|
-
|
|
1755
|
-
|
|
1804
|
+
const off = await port.automationSetEnabled?.({ automation_id: made.data.automation_id, enabled: false });
|
|
1805
|
+
if (off && !off.ok) extrasRefused.push(`Automation "${a.name}" on ${t.name} was copied but could not be switched off: ${sentence(off.error)}`);
|
|
1806
|
+
else automations += 1;
|
|
1807
|
+
} else extrasRefused.push(`Automation "${a.name}" on ${t.name} was not copied: ${made.ok ? refusedSentence(made.data) : sentence(made.error)}`);
|
|
1756
1808
|
}
|
|
1757
|
-
}
|
|
1809
|
+
} else extrasRefused.push(`The automations of ${t.name} could not be read: ${sentence(list.error)}`);
|
|
1758
1810
|
}
|
|
1759
1811
|
if (port.dashboards && port.dashboardDeclare) {
|
|
1760
1812
|
const list = await port.dashboards(t.id);
|
|
@@ -1763,13 +1815,13 @@ async function copyExtras(port, tables, pairs) {
|
|
|
1763
1815
|
const made = await port.dashboardDeclare({
|
|
1764
1816
|
table_id: copy,
|
|
1765
1817
|
name: d.name,
|
|
1766
|
-
blocks: pointAtCopies(d.blocks,
|
|
1767
|
-
presentation: pointAtCopies(d.presentation,
|
|
1818
|
+
blocks: pointAtCopies(d.blocks, ids),
|
|
1819
|
+
presentation: pointAtCopies(d.presentation, ids)
|
|
1768
1820
|
});
|
|
1769
1821
|
if (made.ok) pages += 1;
|
|
1770
|
-
else extrasRefused.push(`Page "${d.name}" on ${t.name} was not copied
|
|
1822
|
+
else extrasRefused.push(`Page "${d.name}" on ${t.name} was not copied: ${sentence(made.error)}`);
|
|
1771
1823
|
}
|
|
1772
|
-
}
|
|
1824
|
+
} else extrasRefused.push(`The pages of ${t.name} could not be read: ${sentence(list.error)}`);
|
|
1773
1825
|
}
|
|
1774
1826
|
}
|
|
1775
1827
|
return { automations, pages, extrasRefused };
|
|
@@ -1808,6 +1860,7 @@ async function restoreSnapshot(port, args) {
|
|
|
1808
1860
|
tables: sources,
|
|
1809
1861
|
withRecords: true,
|
|
1810
1862
|
nameFor: (t) => `${byCopy.get(t.id) ?? t.name} (restored)`,
|
|
1863
|
+
homeName: restoredBaseName(args.baseName ?? "Base", args.restoredOn ?? (/* @__PURE__ */ new Date()).toLocaleDateString()),
|
|
1811
1864
|
...args.onProgress ? { onProgress: args.onProgress } : {}
|
|
1812
1865
|
});
|
|
1813
1866
|
for (const s of sources) await port.archive?.(s.id);
|
|
@@ -5703,6 +5756,7 @@ export {
|
|
|
5703
5756
|
hasQuietHours,
|
|
5704
5757
|
highestLevel,
|
|
5705
5758
|
holdsARetiredChoice,
|
|
5759
|
+
idsOfCopies,
|
|
5706
5760
|
indexedDbStore,
|
|
5707
5761
|
isAddressValue,
|
|
5708
5762
|
isArchiveLane,
|
|
@@ -5778,6 +5832,7 @@ export {
|
|
|
5778
5832
|
removedChoicesInUse,
|
|
5779
5833
|
resolveObjectOrganization,
|
|
5780
5834
|
restoreSnapshot,
|
|
5835
|
+
restoredBaseName,
|
|
5781
5836
|
richTextPlain,
|
|
5782
5837
|
ruleThatRefuses,
|
|
5783
5838
|
rulesWithTopStar,
|