@ai-matrx/records 0.58.0 → 0.58.2
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 +24 -0
- package/dist/core/index.cjs +108 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +26 -3
- package/dist/core/index.d.ts +26 -3
- package/dist/core/index.js +108 -3
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +66 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +66 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +158 -53
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +82 -1
- package/dist/react/index.d.ts +82 -1
- package/dist/react/index.js +158 -53
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-NKSc_jZq.cjs';
|
|
2
2
|
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-NKSc_jZq.cjs';
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.cjs';
|
|
4
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.cjs';
|
|
3
|
+
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.cjs';
|
|
4
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -330,6 +330,27 @@ interface RecordsClient {
|
|
|
330
330
|
* answer is `null` — nothing asked, nothing invented.
|
|
331
331
|
*/
|
|
332
332
|
tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
|
|
333
|
+
/**
|
|
334
|
+
* WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
|
|
335
|
+
* (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
|
|
336
|
+
* to, so it answers for a table shared from outside too. `null` = not given to this person,
|
|
337
|
+
* or not there (the store says the same for both, on purpose). A store without the door
|
|
338
|
+
* refuses `door_absent` — never a guessed organization.
|
|
339
|
+
*/
|
|
340
|
+
tableHome(args: {
|
|
341
|
+
table_id: Uuid;
|
|
342
|
+
}): Promise<RecordsResult<TableHome | null>>;
|
|
343
|
+
/**
|
|
344
|
+
* MOVE A TABLE into another organization the caller belongs to — `custom.table_move`. It
|
|
345
|
+
* carries every Table inside it or its rows and writes the change events; refused, NOTHING
|
|
346
|
+
* moved and the refusal carries the store's one sentence. `expected_version` is the Table's
|
|
347
|
+
* version the caller decided on (a concurrent change refuses with "look again").
|
|
348
|
+
*/
|
|
349
|
+
tableMove(args: {
|
|
350
|
+
table_id: Uuid;
|
|
351
|
+
to_organization_id: Uuid;
|
|
352
|
+
expected_version?: number | null;
|
|
353
|
+
}): Promise<RecordsResult<TableMoved>>;
|
|
333
354
|
fields(args: {
|
|
334
355
|
table_id: Uuid;
|
|
335
356
|
recordType?: string;
|
|
@@ -1929,6 +1950,8 @@ declare const DOORS: {
|
|
|
1929
1950
|
readonly portals: "portals";
|
|
1930
1951
|
readonly portalTables: "portal_tables";
|
|
1931
1952
|
readonly tableFacts: "table_facts";
|
|
1953
|
+
readonly tableHome: "table_home";
|
|
1954
|
+
readonly tableMove: "table_move";
|
|
1932
1955
|
readonly portalCard: "portal_card";
|
|
1933
1956
|
readonly portalDeclare: "portal_declare";
|
|
1934
1957
|
readonly portalInvite: "portal_invite";
|
|
@@ -2287,4 +2310,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
2287
2310
|
declare function importCsv(text: string): ParsedImport;
|
|
2288
2311
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2289
2312
|
|
|
2290
|
-
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableListEntry, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, withTableFacts };
|
|
2313
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, withTableFacts };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as Timestamp, p as Uuid, R as RecordsErrorCode, q as RecordDocument, r as RecordsResult, s as RecordGraphWritten, t as RecordRead, u as ReadRow, v as Field, S as StoredRecord, w as NewFieldDeclaration, x as FieldPatch, y as RecordRevision, z as ReadValue, A as FieldProposal, C as TableProposal, D as RecordsError, W as WriteConflict, E as FieldTypeWord, G as PgError, H as StaleWriteDetail, I as PredictedRefusal } from '../types-NKSc_jZq.js';
|
|
2
2
|
export { J as ABSENCE_REASONS, K as ACTOR_VOCABULARY, L as AbsenceReason, M as Actor, O as COMPUTE_ON, Q as CONTEXT_POLICIES, V as ComputeOn, X as ContextPolicy, Y as DECLARABLE_FIELD_KINDS, Z as DELIVERIES, _ as DeclarableFieldKind, $ as Delivery, a0 as ENTITY_TOKENS, a1 as EntityToken, a2 as FIELD_SENSITIVITIES, a3 as FIELD_SOURCES, a4 as FRESHNESS, a5 as FieldBehavior, a6 as FieldRule, a7 as FieldSensitivity, a8 as FieldSource, a9 as ForbiddenEnvelopeWord, aa as Freshness, ab as HiddenFieldNotice, ac as KERNEL_TABLES, ad as KernelTableName, ae as MERGE_FIELD_MODIFIERS, af as MERGE_FIELD_SEMANTIC_TYPES, ag as MERGE_FIELD_SOURCES, ah as MergeFieldModifier, ai as MergeFieldSemanticType, aj as MergeFieldSource, ak as ON_DELETE, al as OVERRIDE_POLICIES, am as OnDelete, an as OverridePolicy, ao as PARITY_FIELD_TYPES, ap as PER_VALUE_ACCESS_WORDS, aq as ParityFieldType, ar as ParityFieldTypeDescriptor, as as PerValueAccessWord, at as ProvenancePointer, au as RELATION_BINDINGS, av as RELATION_CARDINALITIES, aw as RELATION_FLAVORS, ax as RETIRED_ACTOR_WORDS, ay as RULE_NODE_KINDS, az as RULE_USES, aA as RelationBinding, aB as RelationCardinality, aC as RelationDisplay, aD as RelationFlavor, aE as RetiredActorWord, aF as RuleNodeKind, aG as RuleUse, aH as STORAGE_MODES, aI as STORE_DOORS, aJ as STORE_KNOBS, aK as STORE_REFUSAL_CODES, aL as StorageMode, aM as StoreDoorName, aN as StoreRefusalCode, aO as TABLE_DISPLAYS, aP as TABLE_ORIGINS, aQ as TABLE_TYPES, aR as TableDisplay, aS as TableOrigin, aT as TableType, aU as VALUE_ALTERNATE_KEYS, aV as VALUE_ENVELOPE_KEYS, aW as ValueAlternate, aX as ValueAlternateKey, aY as ValueEnvelope, aZ as ValueEnvelopeKey, a_ as ValueSource, a$ as allowsOtherValues, b0 as err, b1 as isRecordsErr, b2 as ok } from '../types-NKSc_jZq.js';
|
|
3
|
-
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.js';
|
|
4
|
-
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.js';
|
|
3
|
+
import { RelationCoordinate, RecordsConfig, TableArchiveProgress, StoreFilter, ArchiveLane, ArchivedRow, Table, TableHome, TableMoved, TableCapacity, RelationWordsManyArgs, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineMoveManyItem, PipelineMoveMany, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportColumnsDeclared, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalArchiveFilter, PortalArchiveAnswer, PortalTableRef, PortalCard, PortalConfigInput, PortalFormSpec, PortalFormAnswer, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, RecordFilter, AggregateCompare, AggregateBucket, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateRow, Subscription, MySubscription, SubscriptionSpec, DigestPreview, SavedViewRow, SavedViewSpecIn, DocToken, DocUnresolvedToken, DocTemplateRow, DocRenderRow, DocSignatureRow, RecordHistoryEntry, RecordScopeContext, ConversationScope, ConversationScopeContext, FieldHistoryEntry, RestorePreview, RestoreResult, CommentThreadRead, CommentWritten, AnonTokenBinding, ChecklistSpec, ChecklistDeclared, ChecklistTemplateSummary, ChecklistTemplateShape, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistStepCompleted, WorkState, WorkGraph, WorkInstantiation, WorkTurn, WorkAssignmentField, WorkSlotHold, WorkInboxItem, WorkListFlavour, WorkListItem, WorkAssignment, WorkRecordState, WorkApprover, WorkChange, WorkApprovalFiled, WorkApprovalDecision, WorkDecideManyItem, WorkDecideMany, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, DecorationPath, TableDecorations, GridLayout, FormulaParse, RowAction, ActionRunResult, RecordEvent, TableWebhookDeclared, TableWebhook, ExampleBuilt, IoExportPage, TableListEntry, TableSyncSpec, TableSyncResult, TableRowCount, RecordHeader, OutsideShareAnswer, ViewOrderSet, RecordsDataSource } from '../index.js';
|
|
4
|
+
export { ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, ActionRefusal, AggregateCompareKind, AggregateCompareWindows, AggregateDelta, AggregateFilter, AggregateOperation, AggregateWindow, ArchivedDoorRow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, ChoiceOptions, CoerceOptions, Coerced, CoercedAnswers, CoercibleField, CustomFieldTableType, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DashboardBlockKind, DashboardBlockResult, DashboardTarget, DashboardTargetBase, DashboardTargetOp, DashboardTargetResult, DashboardTotals, DecorationColor, DecorationRule, DecorationRuleOp, DecorationTarget, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, EntityRef, EntityRefWithWords, EntityReferenceKind, ExampleSpec, FIELD_KINDS, FieldKind, GridLayoutMode, GridRowHeight, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, KernelTargets, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, PermissionLevel, PipelineMissingField, PipelineMoveManyResult, PipelineMoveVerdict, PipelineRule, PipelineRuleKind, PipelineStage, PortalAccent, PortalConfig, PortalFooterLink, PortalFormInput, PortalFormRef, PortalPrincipal, PortalStage, PortalStyle, PortalStyleInput, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordChangeAction, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationDisplaySpec, RelationProperties, RelationStore, RelationTarget, ResolutionTriple, RowActionStep, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, TableHomeDestination, TablePlacement, TablePlacementFact, TableSyncSource, ViewLayout, WorkDecideManyResult, WorkDecideVerdict, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, actionRefusals, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, withRowCounts, withTablePlacement } from '../index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -330,6 +330,27 @@ interface RecordsClient {
|
|
|
330
330
|
* answer is `null` — nothing asked, nothing invented.
|
|
331
331
|
*/
|
|
332
332
|
tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
|
|
333
|
+
/**
|
|
334
|
+
* WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
|
|
335
|
+
* (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
|
|
336
|
+
* to, so it answers for a table shared from outside too. `null` = not given to this person,
|
|
337
|
+
* or not there (the store says the same for both, on purpose). A store without the door
|
|
338
|
+
* refuses `door_absent` — never a guessed organization.
|
|
339
|
+
*/
|
|
340
|
+
tableHome(args: {
|
|
341
|
+
table_id: Uuid;
|
|
342
|
+
}): Promise<RecordsResult<TableHome | null>>;
|
|
343
|
+
/**
|
|
344
|
+
* MOVE A TABLE into another organization the caller belongs to — `custom.table_move`. It
|
|
345
|
+
* carries every Table inside it or its rows and writes the change events; refused, NOTHING
|
|
346
|
+
* moved and the refusal carries the store's one sentence. `expected_version` is the Table's
|
|
347
|
+
* version the caller decided on (a concurrent change refuses with "look again").
|
|
348
|
+
*/
|
|
349
|
+
tableMove(args: {
|
|
350
|
+
table_id: Uuid;
|
|
351
|
+
to_organization_id: Uuid;
|
|
352
|
+
expected_version?: number | null;
|
|
353
|
+
}): Promise<RecordsResult<TableMoved>>;
|
|
333
354
|
fields(args: {
|
|
334
355
|
table_id: Uuid;
|
|
335
356
|
recordType?: string;
|
|
@@ -1929,6 +1950,8 @@ declare const DOORS: {
|
|
|
1929
1950
|
readonly portals: "portals";
|
|
1930
1951
|
readonly portalTables: "portal_tables";
|
|
1931
1952
|
readonly tableFacts: "table_facts";
|
|
1953
|
+
readonly tableHome: "table_home";
|
|
1954
|
+
readonly tableMove: "table_move";
|
|
1932
1955
|
readonly portalCard: "portal_card";
|
|
1933
1956
|
readonly portalDeclare: "portal_declare";
|
|
1934
1957
|
readonly portalInvite: "portal_invite";
|
|
@@ -2287,4 +2310,4 @@ declare function parseCsv(text: string): string[][];
|
|
|
2287
2310
|
declare function importCsv(text: string): ParsedImport;
|
|
2288
2311
|
declare function importXlsx(bytes: ArrayBuffer | Uint8Array): Promise<ParsedImport>;
|
|
2289
2312
|
|
|
2290
|
-
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableListEntry, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, withTableFacts };
|
|
2313
|
+
export { A_PERSONS_REFUSAL, ActionRunResult, AggregateBucket, AggregateCompare, AggregateMeasure, AggregateRow, AnonTokenBinding, ArchiveLane, ArchivedRow, type AsOf, BookingAvailability, BookingDeclared, BookingSummary, CaptureFileRef, CaptureOutcome, CaptureSheetFace, CaptureSheetSummary, ChecklistDeclared, ChecklistRunStarted, ChecklistRunStep, ChecklistRunSummary, ChecklistSpec, ChecklistStepCompleted, ChecklistTemplateShape, ChecklistTemplateSummary, CommentThreadRead, CommentWritten, ConversationScope, ConversationScopeContext, DEFAULT_DOCUMENT_MAX_BYTES, DEFAULT_FIELDS, DEFAULT_PAGE_SIZE, DEFAULT_VALUE_MAX_BYTES, DOORS, DashboardBlock, DashboardRunResult, DashboardSummary, type DeclareResult, DecorationPath, DigestPreview, DocRenderRow, DocSignatureRow, DocTemplateRow, DocToken, DocUnresolvedToken, type DoorKey, EnrichCell, EnrichDeclared, EnrichDueRow, EnrichRun, EnrichmentSummary, EntityFieldRights, EntityRecordRead, EntityRecordsFound, EntityTableFacts, ExampleBuilt, type ExportRow, ExternalPrincipalCard, Field, FieldHistoryEntry, FieldPatch, FieldProposal, FieldTypeWord, FormSummary, FormulaParse, GridLayout, ImportBatchResult, ImportColumnsDeclared, ImportFinished, ImportOpened, ImportPlan, ImportPolicy, ImportReport, ImportRun, InboundAddress, InboundDeclared, IoExportPage, MAPPED_SQLSTATES, type MirrorLimits, MyLevel, MySubscription, NewEntityFieldDeclaration, NewFieldDeclaration, type NewFieldSpec, type NewTableSpec, OutsideShareAnswer, type ParsedImport, PgError, Pipeline, PipelineColumn, PipelineDeclared, PipelineGate, PipelineGatePreview, PipelineMoveMany, PipelineMoveManyItem, PipelineMoveResult, PipelineSpec, PipelineVerdict, PortalArchiveAnswer, PortalArchiveFilter, PortalCard, PortalConfigInput, PortalFormAnswer, PortalFormSpec, PortalInvitation, PortalPreviewRow, PortalRevocation, PortalSummary, PortalTableRef, PredictedRefusal, type PromotedPredicate, PublishBinding, type QueryPlan, ReadRow, ReadValue, RecordDocument, RecordEvent, RecordFilter, RecordGraphWritten, RecordHeader, RecordHistoryEntry, type RecordQuery, RecordRead, RecordRevision, RecordScopeContext, type RecordsClient, RecordsConfig, RecordsDataSource, RecordsError, RecordsErrorCode, RecordsResult, RelationCoordinate, RelationWordsManyArgs, ResolvedPublishBinding, RestorePreview, RestoreResult, RowAction, SavedViewRow, SavedViewSpecIn, StagePending, StagePendingOnBoard, StageRuleEnforcement, StageRuleOnFail, StaleWriteDetail, StoreFilter, StoredRecord, StuckRow, Subscription, SubscriptionSpec, type SupabaseLike, Table, TableArchiveProgress, TableCapacity, TableDecorations, type TableFact, TableHome, TableListEntry, TableMoved, TableProposal, TableRowCount, TableSyncResult, TableSyncSpec, TableWebhook, TableWebhookDeclared, Timestamp, Uuid, ViewOrderSet, WorkApprovalDecision, WorkApprovalFiled, WorkApprover, WorkAssignment, WorkAssignmentField, WorkChange, WorkDecideMany, WorkDecideManyItem, WorkGraph, WorkInboxItem, WorkInstantiation, WorkListFlavour, WorkListItem, WorkRecordState, WorkSlotHold, WorkState, WorkTurn, WriteConflict, addFields, announceRecordChanged, asWriteConflict, cellText, createRecordsClient, declareTable, doorAbsent, doorCensus, doorExists, exportCsv, exportXlsx, fieldDeclarationFor, importCsv, importXlsx, intersectIds, isAPersonsRefusal, mapPgError, onRecordChanged, parseCsv, planQuery, predictEnvelopeRefusal, predictSizeRefusal, predictValueRefusals, predictWriteRefusals, staleWriteDetail, supabaseDataSource, toAoa, tokenFor, withTableFacts };
|
package/dist/core/index.js
CHANGED
|
@@ -2828,6 +2828,66 @@ function keptTableHref(fact, hrefs) {
|
|
|
2828
2828
|
}
|
|
2829
2829
|
return hrefs.table(fact.table_id);
|
|
2830
2830
|
}
|
|
2831
|
+
function countOf(value) {
|
|
2832
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
2833
|
+
}
|
|
2834
|
+
function wordsOf(value) {
|
|
2835
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
2836
|
+
}
|
|
2837
|
+
function parseTableHome(raw) {
|
|
2838
|
+
if (!raw || typeof raw !== "object") return null;
|
|
2839
|
+
const row = raw;
|
|
2840
|
+
const table = row.table;
|
|
2841
|
+
const org = row.organization;
|
|
2842
|
+
if (!table || !org || !wordsOf(table.id) || !wordsOf(org.id) || !wordsOf(org.name)) return null;
|
|
2843
|
+
const carries = row.carries ?? {};
|
|
2844
|
+
const destinations = Array.isArray(row.destinations) ? row.destinations : [];
|
|
2845
|
+
return {
|
|
2846
|
+
table: { id: String(table.id), name: wordsOf(table.name) ?? "This table", version: countOf(table.version) },
|
|
2847
|
+
organization: { id: String(org.id), name: String(org.name) },
|
|
2848
|
+
mayMove: row.may_move === true,
|
|
2849
|
+
whyNot: wordsOf(row.why_not),
|
|
2850
|
+
heldBy: Array.isArray(row.held_by) ? row.held_by.filter((s) => typeof s === "string") : [],
|
|
2851
|
+
destinations: destinations.filter((d) => !!d && typeof d === "object" && !!wordsOf(d.id)).map((d) => ({
|
|
2852
|
+
id: String(d.id),
|
|
2853
|
+
name: wordsOf(d.name) ?? "An organization",
|
|
2854
|
+
role: wordsOf(d.role) ?? "member",
|
|
2855
|
+
ok: d.ok === true,
|
|
2856
|
+
why: wordsOf(d.why)
|
|
2857
|
+
})),
|
|
2858
|
+
carries: {
|
|
2859
|
+
fields: countOf(carries.fields),
|
|
2860
|
+
records: countOf(carries.records),
|
|
2861
|
+
inTrash: countOf(carries.in_trash),
|
|
2862
|
+
choiceLists: countOf(carries.choice_lists),
|
|
2863
|
+
withIt: countOf(carries.with_it),
|
|
2864
|
+
tablesInside: countOf(carries.tables_inside),
|
|
2865
|
+
linksAcross: countOf(carries.links_across)
|
|
2866
|
+
}
|
|
2867
|
+
};
|
|
2868
|
+
}
|
|
2869
|
+
function parseTableMoved(raw) {
|
|
2870
|
+
const row = raw ?? {};
|
|
2871
|
+
const to = row.to ?? {};
|
|
2872
|
+
const from = row.from ?? {};
|
|
2873
|
+
const table = row.table ?? {};
|
|
2874
|
+
if (row.moved !== true || !wordsOf(to.id)) return null;
|
|
2875
|
+
return {
|
|
2876
|
+
to: { id: String(to.id), name: wordsOf(to.name) ?? "the new organization" },
|
|
2877
|
+
from: { id: wordsOf(from.id) ?? "", name: wordsOf(from.name) ?? "its old organization" },
|
|
2878
|
+
tableName: wordsOf(table.name) ?? "The table"
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
function plural(n, one, many) {
|
|
2882
|
+
return `${n} ${n === 1 ? one : many}`;
|
|
2883
|
+
}
|
|
2884
|
+
function moveConsequence(home, to) {
|
|
2885
|
+
const c = home.carries;
|
|
2886
|
+
const parts = [plural(c.fields, "column", "columns"), plural(c.records, "row", "rows")];
|
|
2887
|
+
if (c.inTrash > 0) parts.push(`${c.inTrash} in the trash`);
|
|
2888
|
+
const extra = c.choiceLists + c.withIt;
|
|
2889
|
+
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.`;
|
|
2890
|
+
}
|
|
2831
2891
|
|
|
2832
2892
|
// src/capture-queue.ts
|
|
2833
2893
|
var DB_NAME = "matrx-capture";
|
|
@@ -2897,7 +2957,7 @@ function memoryStore() {
|
|
|
2897
2957
|
setMeta: async (key, value) => void meta.set(key, value)
|
|
2898
2958
|
};
|
|
2899
2959
|
}
|
|
2900
|
-
function
|
|
2960
|
+
function countOf2(items) {
|
|
2901
2961
|
const c = { waiting: 0, sending: 0, refused: 0, landed: 0 };
|
|
2902
2962
|
for (const i of items) c[i.state] += 1;
|
|
2903
2963
|
return c;
|
|
@@ -2914,7 +2974,7 @@ function openCaptureQueue(opts) {
|
|
|
2914
2974
|
const announce = async () => {
|
|
2915
2975
|
if (!opts.onChange) return;
|
|
2916
2976
|
const items = await store.all();
|
|
2917
|
-
opts.onChange(
|
|
2977
|
+
opts.onChange(countOf2(items), items);
|
|
2918
2978
|
};
|
|
2919
2979
|
const oldestFirst = (items) => items.slice().sort((a, b) => a.captured_at.localeCompare(b.captured_at));
|
|
2920
2980
|
const queue = {
|
|
@@ -2943,7 +3003,7 @@ function openCaptureQueue(opts) {
|
|
|
2943
3003
|
return key;
|
|
2944
3004
|
},
|
|
2945
3005
|
list: () => store.all().then(oldestFirst),
|
|
2946
|
-
counts: () => store.all().then(
|
|
3006
|
+
counts: () => store.all().then(countOf2),
|
|
2947
3007
|
async sync() {
|
|
2948
3008
|
if (syncing) return syncing;
|
|
2949
3009
|
syncing = (async () => {
|
|
@@ -5193,6 +5253,8 @@ function scopeChip(scope) {
|
|
|
5193
5253
|
|
|
5194
5254
|
// src/core/doors.ts
|
|
5195
5255
|
var OWED_BY = {
|
|
5256
|
+
table_home: "SC-1' \u2014 matrx-frontend migrations/campaign/sc1p_a_table_says_where_it_lives_and_its_owner_can_move_it.sql (and its grant file), applied by the chair",
|
|
5257
|
+
table_move: "SC-1' / SC-1-TAILS \u2014 sc1p_a_table_says_where_it_lives_and_its_owner_can_move_it.sql, then sc1t_a_table_moves_with_the_tables_inside_it.sql, applied by the chair",
|
|
5196
5258
|
metadata_search: "W5-SRV / W5-AGENT \u2014 the agent surface's eight verbs",
|
|
5197
5259
|
record_aggregate: "W5-SRV / W5-AGENT \u2014 `record_aggregate` is one of the eight verbs",
|
|
5198
5260
|
field_propose: "W5-AGENT \u2014 AGT-4/AGT-8, the proposal and its approvers",
|
|
@@ -5518,6 +5580,12 @@ var DOORS = {
|
|
|
5518
5580
|
// ask, under the same wall and visibility gate as `portals` itself.
|
|
5519
5581
|
portalTables: "portal_tables",
|
|
5520
5582
|
tableFacts: "table_facts",
|
|
5583
|
+
// WHERE A TABLE LIVES, AND MOVING IT (SC-1' / SC-1-TAILS). `table_home` answers only when the
|
|
5584
|
+
// caller may open the Table (custom.where_id_opens) and names its organization FROM THE TABLE;
|
|
5585
|
+
// `table_move` moves it into another organization the caller belongs to, with every Table
|
|
5586
|
+
// inside it, or refuses with one sentence.
|
|
5587
|
+
tableHome: "table_home",
|
|
5588
|
+
tableMove: "table_move",
|
|
5521
5589
|
portalCard: "portal_card",
|
|
5522
5590
|
portalDeclare: "portal_declare",
|
|
5523
5591
|
portalInvite: "portal_invite",
|
|
@@ -6040,6 +6108,40 @@ function createRecordsClient(config) {
|
|
|
6040
6108
|
if (!doorExists(DOORS.tableFacts)) return ok(null);
|
|
6041
6109
|
return callDoor(DOORS.tableFacts, { p_organization_id: org }, "tableFacts");
|
|
6042
6110
|
},
|
|
6111
|
+
async tableHome({ table_id }) {
|
|
6112
|
+
const answered = await callDoor(DOORS.tableHome, { p_table_id: table_id }, "tableHome");
|
|
6113
|
+
if (!answered.ok) return answered;
|
|
6114
|
+
if (answered.data === null || answered.data === void 0) return ok(null);
|
|
6115
|
+
const home = parseTableHome(answered.data);
|
|
6116
|
+
if (!home) {
|
|
6117
|
+
const refusal = {
|
|
6118
|
+
code: "not_supported",
|
|
6119
|
+
message: "The record store answered where this table lives in a shape this client cannot read, so nothing is claimed about it.",
|
|
6120
|
+
hint: "Regenerate @ai-matrx/records against the store (pnpm records:generate) \u2014 the door and this client disagree."
|
|
6121
|
+
};
|
|
6122
|
+
scream({ code: refusal.code, message: refusal.message, ...refusal.hint ? { hint: refusal.hint } : {}, where: "tableHome" });
|
|
6123
|
+
return err(refusal);
|
|
6124
|
+
}
|
|
6125
|
+
return ok(home);
|
|
6126
|
+
},
|
|
6127
|
+
async tableMove({ table_id, to_organization_id, expected_version }) {
|
|
6128
|
+
const answered = await callDoor(
|
|
6129
|
+
DOORS.tableMove,
|
|
6130
|
+
{ p_table_id: table_id, p_to_organization_id: to_organization_id, p_expected_version: expected_version ?? null },
|
|
6131
|
+
"tableMove"
|
|
6132
|
+
);
|
|
6133
|
+
if (!answered.ok) return answered;
|
|
6134
|
+
const moved = parseTableMoved(answered.data);
|
|
6135
|
+
if (!moved) {
|
|
6136
|
+
const refusal = {
|
|
6137
|
+
code: "not_supported",
|
|
6138
|
+
message: "The record store answered the move in a shape this client cannot read. Look where the table lives before trying again."
|
|
6139
|
+
};
|
|
6140
|
+
scream({ code: refusal.code, message: refusal.message, where: "tableMove" });
|
|
6141
|
+
return err(refusal);
|
|
6142
|
+
}
|
|
6143
|
+
return ok(moved);
|
|
6144
|
+
},
|
|
6043
6145
|
async tableArchived({ table_id }) {
|
|
6044
6146
|
const kernel = await callDoor(DOORS.tableKernelId, {}, "tableArchived.kernel");
|
|
6045
6147
|
if (!kernel.ok) return err(kernel.error);
|
|
@@ -8780,6 +8882,7 @@ export {
|
|
|
8780
8882
|
memoryStore,
|
|
8781
8883
|
mintClientKey,
|
|
8782
8884
|
mintOpId,
|
|
8885
|
+
moveConsequence,
|
|
8783
8886
|
moveInOrder,
|
|
8784
8887
|
offeredAsContext,
|
|
8785
8888
|
ok,
|
|
@@ -8788,6 +8891,8 @@ export {
|
|
|
8788
8891
|
optionKey,
|
|
8789
8892
|
optionLabel,
|
|
8790
8893
|
parseCsv,
|
|
8894
|
+
parseTableHome,
|
|
8895
|
+
parseTableMoved,
|
|
8791
8896
|
planQuery,
|
|
8792
8897
|
portalArchiveConsequence,
|
|
8793
8898
|
portalConfirmLine,
|