@ai-matrx/records 0.99.22 → 0.99.23
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 +23 -1
- package/dist/core/index.cjs +78 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +78 -0
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +78 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -4
- package/dist/index.d.ts +104 -4
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +78 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +101 -1
- package/dist/react/index.d.ts +101 -1
- package/dist/react/index.js +78 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as Uuid, a0 as MergeFieldSource, $ as MergeFieldSemanticType, _ as MergeFieldModifier, a3 as OverridePolicy, B as Delivery, h as Timestamp, N as Freshness, n as RecordDocument
|
|
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-RFRxkq2n.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-RFRxkq2n.cjs';
|
|
3
|
-
import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-DiX72o3n.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,
|
|
3
|
+
import { cK as TableDuplicateProgress, cL as TableDuplicated, J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-DiX72o3n.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, 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-DiX72o3n.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-L9DlTlKi.cjs';
|
|
6
6
|
import { m as CoercibleField } from './field-G-YJctb7.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-G-YJctb7.cjs';
|
|
@@ -115,6 +115,106 @@ type TypedNumber = {
|
|
|
115
115
|
};
|
|
116
116
|
declare function readTypedNumber(raw: string): TypedNumber;
|
|
117
117
|
|
|
118
|
+
interface BaseTable {
|
|
119
|
+
id: Uuid;
|
|
120
|
+
name: string;
|
|
121
|
+
}
|
|
122
|
+
interface BasePort {
|
|
123
|
+
/** `RecordsClient.tableDuplicate`: one table, with its own passes looped until done. */
|
|
124
|
+
tableDuplicate(args: {
|
|
125
|
+
tableId: Uuid;
|
|
126
|
+
withRecords?: boolean;
|
|
127
|
+
name?: string | null;
|
|
128
|
+
organizationId?: Uuid | null;
|
|
129
|
+
onProgress?: (progress: TableDuplicateProgress) => void;
|
|
130
|
+
}): Promise<RecordsResult<TableDuplicated>>;
|
|
131
|
+
/** `custom.base_copy_finish`: {old table id: its copy's id} → how many link columns and cells now point inside the copy. */
|
|
132
|
+
finish(args: {
|
|
133
|
+
organizationId: Uuid;
|
|
134
|
+
pairs: Record<Uuid, Uuid>;
|
|
135
|
+
}): Promise<RecordsResult<{
|
|
136
|
+
relinked_columns: number;
|
|
137
|
+
relinked_cells: number;
|
|
138
|
+
}>>;
|
|
139
|
+
/** `RecordsClient.tableArchive` / its restore: put a copy away, or bring it back to be copied from. */
|
|
140
|
+
archive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
141
|
+
unarchive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
142
|
+
}
|
|
143
|
+
interface BaseCopyProgress {
|
|
144
|
+
/** 1-based position of the table being copied, and how many there are. */
|
|
145
|
+
at: number;
|
|
146
|
+
of: number;
|
|
147
|
+
tableName: string;
|
|
148
|
+
pass: TableDuplicateProgress | null;
|
|
149
|
+
}
|
|
150
|
+
interface BaseCopied {
|
|
151
|
+
/** Source table id → its copy. */
|
|
152
|
+
pairs: Record<Uuid, Uuid>;
|
|
153
|
+
tables: Array<{
|
|
154
|
+
from: BaseTable;
|
|
155
|
+
copy: BaseTable;
|
|
156
|
+
records: number;
|
|
157
|
+
}>;
|
|
158
|
+
relinkedColumns: number;
|
|
159
|
+
relinkedCells: number;
|
|
160
|
+
/** What a copy never carries, from the per-table door's own words, once per table. */
|
|
161
|
+
notCopied: string[];
|
|
162
|
+
}
|
|
163
|
+
type BaseCopyResult = {
|
|
164
|
+
ok: true;
|
|
165
|
+
data: BaseCopied;
|
|
166
|
+
}
|
|
167
|
+
/** The table it stopped at; the copies made before it are named so they can be opened or archived. */
|
|
168
|
+
| {
|
|
169
|
+
ok: false;
|
|
170
|
+
error: unknown;
|
|
171
|
+
stoppedAt: BaseTable;
|
|
172
|
+
made: BaseCopied["tables"];
|
|
173
|
+
};
|
|
174
|
+
/** "Harbor Studio (copy)", the same word the table dialog offers. */
|
|
175
|
+
declare function baseCopyName(name: string): string;
|
|
176
|
+
/** Duplicate every table of a base. `names` (by source table id) overrides the "<name>" a copy is given. */
|
|
177
|
+
declare function duplicateBase(port: BasePort, args: {
|
|
178
|
+
organizationId: Uuid;
|
|
179
|
+
tables: readonly BaseTable[];
|
|
180
|
+
withRecords: boolean;
|
|
181
|
+
/** The copy's name for each table; default the source's own name (the copies live together in the new base). */
|
|
182
|
+
nameFor?: (table: BaseTable) => string;
|
|
183
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
184
|
+
}): Promise<BaseCopyResult>;
|
|
185
|
+
interface BaseSnapshotRecord {
|
|
186
|
+
label: string;
|
|
187
|
+
origin: "manual" | "schedule";
|
|
188
|
+
/** Source table → the put-away copy that holds its columns, views and records as they were. */
|
|
189
|
+
tables: Array<{
|
|
190
|
+
table_id: Uuid;
|
|
191
|
+
snapshot_table_id: Uuid;
|
|
192
|
+
name: string;
|
|
193
|
+
records: number;
|
|
194
|
+
}>;
|
|
195
|
+
}
|
|
196
|
+
/** Take a snapshot: copy every table WITH records, then put each copy away so no list shows it. */
|
|
197
|
+
declare function snapshotBase(port: BasePort, args: {
|
|
198
|
+
organizationId: Uuid;
|
|
199
|
+
tables: readonly BaseTable[];
|
|
200
|
+
label: string;
|
|
201
|
+
origin?: "manual" | "schedule";
|
|
202
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
203
|
+
}): Promise<{
|
|
204
|
+
ok: true;
|
|
205
|
+
snapshot: BaseSnapshotRecord;
|
|
206
|
+
} | {
|
|
207
|
+
ok: false;
|
|
208
|
+
error: unknown;
|
|
209
|
+
stoppedAt: BaseTable;
|
|
210
|
+
}>;
|
|
211
|
+
/** Restore a snapshot as a NEW base: each put-away copy is brought back, copied under its own name, and put away again. */
|
|
212
|
+
declare function restoreSnapshot(port: BasePort, args: {
|
|
213
|
+
organizationId: Uuid;
|
|
214
|
+
snapshot: BaseSnapshotRecord;
|
|
215
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
216
|
+
}): Promise<BaseCopyResult>;
|
|
217
|
+
|
|
118
218
|
/** One file waiting to go up, with its bytes until they have. */
|
|
119
219
|
interface QueuedCaptureFile {
|
|
120
220
|
field: string;
|
|
@@ -424,4 +524,4 @@ declare function alternatePatch(document: RecordDocument, field_key: string, alt
|
|
|
424
524
|
};
|
|
425
525
|
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordAsOf" | "recordUpdate">, { record_id, field_key, alternate_index, rank }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
426
526
|
|
|
427
|
-
export { 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, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, chooseAlternate, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
527
|
+
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, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as Uuid, a0 as MergeFieldSource, $ as MergeFieldSemanticType, _ as MergeFieldModifier, a3 as OverridePolicy, B as Delivery, h as Timestamp, N as Freshness, n as RecordDocument
|
|
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-RFRxkq2n.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-RFRxkq2n.js';
|
|
3
|
-
import { J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-jKnxxxak.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,
|
|
3
|
+
import { cK as TableDuplicateProgress, cL as TableDuplicated, J as CaptureFileRef, K as CaptureOutcome, R as RecordsClient } from './client-jKnxxxak.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, 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-jKnxxxak.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-Ds4p6jgW.js';
|
|
6
6
|
import { m as CoercibleField } from './field-DNZa8pwR.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-DNZa8pwR.js';
|
|
@@ -115,6 +115,106 @@ type TypedNumber = {
|
|
|
115
115
|
};
|
|
116
116
|
declare function readTypedNumber(raw: string): TypedNumber;
|
|
117
117
|
|
|
118
|
+
interface BaseTable {
|
|
119
|
+
id: Uuid;
|
|
120
|
+
name: string;
|
|
121
|
+
}
|
|
122
|
+
interface BasePort {
|
|
123
|
+
/** `RecordsClient.tableDuplicate`: one table, with its own passes looped until done. */
|
|
124
|
+
tableDuplicate(args: {
|
|
125
|
+
tableId: Uuid;
|
|
126
|
+
withRecords?: boolean;
|
|
127
|
+
name?: string | null;
|
|
128
|
+
organizationId?: Uuid | null;
|
|
129
|
+
onProgress?: (progress: TableDuplicateProgress) => void;
|
|
130
|
+
}): Promise<RecordsResult<TableDuplicated>>;
|
|
131
|
+
/** `custom.base_copy_finish`: {old table id: its copy's id} → how many link columns and cells now point inside the copy. */
|
|
132
|
+
finish(args: {
|
|
133
|
+
organizationId: Uuid;
|
|
134
|
+
pairs: Record<Uuid, Uuid>;
|
|
135
|
+
}): Promise<RecordsResult<{
|
|
136
|
+
relinked_columns: number;
|
|
137
|
+
relinked_cells: number;
|
|
138
|
+
}>>;
|
|
139
|
+
/** `RecordsClient.tableArchive` / its restore: put a copy away, or bring it back to be copied from. */
|
|
140
|
+
archive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
141
|
+
unarchive?(tableId: Uuid): Promise<RecordsResult<unknown>>;
|
|
142
|
+
}
|
|
143
|
+
interface BaseCopyProgress {
|
|
144
|
+
/** 1-based position of the table being copied, and how many there are. */
|
|
145
|
+
at: number;
|
|
146
|
+
of: number;
|
|
147
|
+
tableName: string;
|
|
148
|
+
pass: TableDuplicateProgress | null;
|
|
149
|
+
}
|
|
150
|
+
interface BaseCopied {
|
|
151
|
+
/** Source table id → its copy. */
|
|
152
|
+
pairs: Record<Uuid, Uuid>;
|
|
153
|
+
tables: Array<{
|
|
154
|
+
from: BaseTable;
|
|
155
|
+
copy: BaseTable;
|
|
156
|
+
records: number;
|
|
157
|
+
}>;
|
|
158
|
+
relinkedColumns: number;
|
|
159
|
+
relinkedCells: number;
|
|
160
|
+
/** What a copy never carries, from the per-table door's own words, once per table. */
|
|
161
|
+
notCopied: string[];
|
|
162
|
+
}
|
|
163
|
+
type BaseCopyResult = {
|
|
164
|
+
ok: true;
|
|
165
|
+
data: BaseCopied;
|
|
166
|
+
}
|
|
167
|
+
/** The table it stopped at; the copies made before it are named so they can be opened or archived. */
|
|
168
|
+
| {
|
|
169
|
+
ok: false;
|
|
170
|
+
error: unknown;
|
|
171
|
+
stoppedAt: BaseTable;
|
|
172
|
+
made: BaseCopied["tables"];
|
|
173
|
+
};
|
|
174
|
+
/** "Harbor Studio (copy)", the same word the table dialog offers. */
|
|
175
|
+
declare function baseCopyName(name: string): string;
|
|
176
|
+
/** Duplicate every table of a base. `names` (by source table id) overrides the "<name>" a copy is given. */
|
|
177
|
+
declare function duplicateBase(port: BasePort, args: {
|
|
178
|
+
organizationId: Uuid;
|
|
179
|
+
tables: readonly BaseTable[];
|
|
180
|
+
withRecords: boolean;
|
|
181
|
+
/** The copy's name for each table; default the source's own name (the copies live together in the new base). */
|
|
182
|
+
nameFor?: (table: BaseTable) => string;
|
|
183
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
184
|
+
}): Promise<BaseCopyResult>;
|
|
185
|
+
interface BaseSnapshotRecord {
|
|
186
|
+
label: string;
|
|
187
|
+
origin: "manual" | "schedule";
|
|
188
|
+
/** Source table → the put-away copy that holds its columns, views and records as they were. */
|
|
189
|
+
tables: Array<{
|
|
190
|
+
table_id: Uuid;
|
|
191
|
+
snapshot_table_id: Uuid;
|
|
192
|
+
name: string;
|
|
193
|
+
records: number;
|
|
194
|
+
}>;
|
|
195
|
+
}
|
|
196
|
+
/** Take a snapshot: copy every table WITH records, then put each copy away so no list shows it. */
|
|
197
|
+
declare function snapshotBase(port: BasePort, args: {
|
|
198
|
+
organizationId: Uuid;
|
|
199
|
+
tables: readonly BaseTable[];
|
|
200
|
+
label: string;
|
|
201
|
+
origin?: "manual" | "schedule";
|
|
202
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
203
|
+
}): Promise<{
|
|
204
|
+
ok: true;
|
|
205
|
+
snapshot: BaseSnapshotRecord;
|
|
206
|
+
} | {
|
|
207
|
+
ok: false;
|
|
208
|
+
error: unknown;
|
|
209
|
+
stoppedAt: BaseTable;
|
|
210
|
+
}>;
|
|
211
|
+
/** Restore a snapshot as a NEW base: each put-away copy is brought back, copied under its own name, and put away again. */
|
|
212
|
+
declare function restoreSnapshot(port: BasePort, args: {
|
|
213
|
+
organizationId: Uuid;
|
|
214
|
+
snapshot: BaseSnapshotRecord;
|
|
215
|
+
onProgress?: (p: BaseCopyProgress) => void;
|
|
216
|
+
}): Promise<BaseCopyResult>;
|
|
217
|
+
|
|
118
218
|
/** One file waiting to go up, with its bytes until they have. */
|
|
119
219
|
interface QueuedCaptureFile {
|
|
120
220
|
field: string;
|
|
@@ -424,4 +524,4 @@ declare function alternatePatch(document: RecordDocument, field_key: string, alt
|
|
|
424
524
|
};
|
|
425
525
|
declare function chooseAlternate(client: Pick<RecordsClient, "recordRead" | "recordAsOf" | "recordUpdate">, { record_id, field_key, alternate_index, rank }: ChooseAlternateArgs): Promise<RecordsResult<number>>;
|
|
426
526
|
|
|
427
|
-
export { 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, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, alternatePatch, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, chooseAlternate, filterWithAutonumber, indexedDbStore, isAutonumberField, isDecided, localeDateOrder, memoryStore, mintClientKey, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
527
|
+
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, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, restoreSnapshot, snapshotBase, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.js
CHANGED
|
@@ -1690,6 +1690,80 @@ function moveConsequence(home, to) {
|
|
|
1690
1690
|
return `${home.table.name} moves to ${to.name} with its ${parts.join(", ")}` + (c.tablesInside > 0 ? `, the ${plural(c.tablesInside, "table", "tables")} that live${c.tablesInside === 1 ? "s" : ""} inside it or its rows (with their own rows)` : "") + (extra > 0 ? `, and ${plural(extra, "thing", "things")} built only on it (choice lists, rules, dashboards, templates)` : "") + `, its comments, forms, saved views and history. ` + (c.linksAcross > 0 ? `${plural(c.linksAcross, "link", "links")} to rows that stay in ${home.organization.name} keep${c.linksAcross === 1 ? "s" : ""} pointing there, across the two organizations. ` : "") + `People who see it only because they are in ${home.organization.name} stop seeing it; people it was shared with by name keep it. You can move it back from the same place.`;
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
|
+
// src/base.ts
|
|
1694
|
+
function baseCopyName(name) {
|
|
1695
|
+
return `${name.trim() || "Base"} (copy)`;
|
|
1696
|
+
}
|
|
1697
|
+
async function duplicateBase(port, args) {
|
|
1698
|
+
const made = [];
|
|
1699
|
+
const pairs = {};
|
|
1700
|
+
const notCopied = /* @__PURE__ */ new Set();
|
|
1701
|
+
for (const [i, table] of args.tables.entries()) {
|
|
1702
|
+
const res = await port.tableDuplicate({
|
|
1703
|
+
tableId: table.id,
|
|
1704
|
+
withRecords: args.withRecords,
|
|
1705
|
+
organizationId: args.organizationId,
|
|
1706
|
+
name: args.nameFor ? args.nameFor(table) : table.name,
|
|
1707
|
+
onProgress: (pass) => args.onProgress?.({ at: i + 1, of: args.tables.length, tableName: table.name, pass })
|
|
1708
|
+
});
|
|
1709
|
+
if (!res.ok) return { ok: false, error: res.error, stoppedAt: table, made };
|
|
1710
|
+
pairs[table.id] = res.data.table.id;
|
|
1711
|
+
made.push({ from: table, copy: res.data.table, records: res.data.copied.records });
|
|
1712
|
+
for (const n of res.data.notCopied) notCopied.add(n);
|
|
1713
|
+
}
|
|
1714
|
+
const fin = args.tables.length > 1 ? await port.finish({ organizationId: args.organizationId, pairs }) : null;
|
|
1715
|
+
if (fin && !fin.ok) return { ok: false, error: fin.error, stoppedAt: args.tables[args.tables.length - 1], made };
|
|
1716
|
+
return {
|
|
1717
|
+
ok: true,
|
|
1718
|
+
data: {
|
|
1719
|
+
pairs,
|
|
1720
|
+
tables: made,
|
|
1721
|
+
relinkedColumns: fin?.ok ? fin.data.relinked_columns : 0,
|
|
1722
|
+
relinkedCells: fin?.ok ? fin.data.relinked_cells : 0,
|
|
1723
|
+
notCopied: [...notCopied]
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1727
|
+
async function snapshotBase(port, args) {
|
|
1728
|
+
const copied = await duplicateBase(port, {
|
|
1729
|
+
organizationId: args.organizationId,
|
|
1730
|
+
tables: args.tables,
|
|
1731
|
+
withRecords: true,
|
|
1732
|
+
nameFor: (t) => `Snapshot ${args.label} \xB7 ${t.name}`,
|
|
1733
|
+
...args.onProgress ? { onProgress: args.onProgress } : {}
|
|
1734
|
+
});
|
|
1735
|
+
if (!copied.ok) {
|
|
1736
|
+
for (const m of copied.made) await port.archive?.(m.copy.id);
|
|
1737
|
+
return { ok: false, error: copied.error, stoppedAt: copied.stoppedAt };
|
|
1738
|
+
}
|
|
1739
|
+
for (const t of copied.data.tables) {
|
|
1740
|
+
const away = await port.archive?.(t.copy.id);
|
|
1741
|
+
if (away && !away.ok) return { ok: false, error: away.error, stoppedAt: t.from };
|
|
1742
|
+
}
|
|
1743
|
+
return {
|
|
1744
|
+
ok: true,
|
|
1745
|
+
snapshot: {
|
|
1746
|
+
label: args.label,
|
|
1747
|
+
origin: args.origin ?? "manual",
|
|
1748
|
+
tables: copied.data.tables.map((t) => ({ table_id: t.from.id, snapshot_table_id: t.copy.id, name: t.from.name, records: t.records }))
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
}
|
|
1752
|
+
async function restoreSnapshot(port, args) {
|
|
1753
|
+
const sources = args.snapshot.tables.map((t) => ({ id: t.snapshot_table_id, name: t.name }));
|
|
1754
|
+
const byCopy = new Map(args.snapshot.tables.map((t) => [t.snapshot_table_id, t.name]));
|
|
1755
|
+
for (const s of sources) await port.unarchive?.(s.id);
|
|
1756
|
+
const out = await duplicateBase(port, {
|
|
1757
|
+
organizationId: args.organizationId,
|
|
1758
|
+
tables: sources,
|
|
1759
|
+
withRecords: true,
|
|
1760
|
+
nameFor: (t) => `${byCopy.get(t.id) ?? t.name} (restored)`,
|
|
1761
|
+
...args.onProgress ? { onProgress: args.onProgress } : {}
|
|
1762
|
+
});
|
|
1763
|
+
for (const s of sources) await port.archive?.(s.id);
|
|
1764
|
+
return out;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1693
1767
|
// src/capture-queue.ts
|
|
1694
1768
|
var DB_NAME = "matrx-capture";
|
|
1695
1769
|
var DB_VERSION = 1;
|
|
@@ -5484,6 +5558,7 @@ export {
|
|
|
5484
5558
|
autonumberPrefixOf,
|
|
5485
5559
|
autonumberSearchOf,
|
|
5486
5560
|
autonumberWords,
|
|
5561
|
+
baseCopyName,
|
|
5487
5562
|
bookingPath,
|
|
5488
5563
|
buttonNeeds,
|
|
5489
5564
|
buttonOf,
|
|
@@ -5503,6 +5578,7 @@ export {
|
|
|
5503
5578
|
defaultOpLedger,
|
|
5504
5579
|
drillAnswerOf,
|
|
5505
5580
|
drillFindingKnob,
|
|
5581
|
+
duplicateBase,
|
|
5506
5582
|
durationText,
|
|
5507
5583
|
emptyArchiveLine,
|
|
5508
5584
|
emptyPortalArchiveLine,
|
|
@@ -5594,6 +5670,7 @@ export {
|
|
|
5594
5670
|
rememberedOpCount,
|
|
5595
5671
|
removedChoicesInUse,
|
|
5596
5672
|
resolveObjectOrganization,
|
|
5673
|
+
restoreSnapshot,
|
|
5597
5674
|
richTextPlain,
|
|
5598
5675
|
ruleThatRefuses,
|
|
5599
5676
|
rulesWithTopStar,
|
|
@@ -5601,6 +5678,7 @@ export {
|
|
|
5601
5678
|
sameDocument,
|
|
5602
5679
|
scopeChip,
|
|
5603
5680
|
sheetSyncSpec,
|
|
5681
|
+
snapshotBase,
|
|
5604
5682
|
sourceArchivedOf,
|
|
5605
5683
|
splitListCell,
|
|
5606
5684
|
splitLockedRows,
|