@ai-matrx/records 0.42.0 → 0.43.0
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 +41 -0
- package/dist/core/index.cjs +75 -7
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +19 -3
- package/dist/core/index.d.ts +19 -3
- package/dist/core/index.js +75 -7
- package/dist/core/index.js.map +1 -1
- package/dist/{field-IOFl9Kvu.d.cts → field-CdHqvIIy.d.cts} +14 -4
- package/dist/{field-IOFl9Kvu.d.ts → field-CdHqvIIy.d.ts} +14 -4
- package/dist/index.cjs +49 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -7
- package/dist/index.d.ts +85 -7
- package/dist/index.js +49 -4
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +118 -11
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +119 -9
- package/dist/react/index.d.ts +119 -9
- package/dist/react/index.js +118 -11
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, R as RelationFlavor, aj as RetiredActorWord, ak as RuleNodeKind, al as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, a as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as err, aE as isRecordsErr, aF as ok } from '../field-
|
|
1
|
+
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-CdHqvIIy.cjs';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, R as RelationFlavor, aj as RetiredActorWord, ak as RuleNodeKind, al as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, a as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as err, aE as isRecordsErr, aF as ok } from '../field-CdHqvIIy.cjs';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, 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, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.cjs';
|
|
4
|
-
export { AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, CustomFieldTableType, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.cjs';
|
|
4
|
+
export { AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, CustomFieldTableType, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip } from '../index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -143,6 +143,21 @@ interface RecordsClient {
|
|
|
143
143
|
rows: ReadRow[];
|
|
144
144
|
total: number | null;
|
|
145
145
|
}>>;
|
|
146
|
+
/**
|
|
147
|
+
* DOOR-1 FOR AN ID SET. Exactly these records of this Table, through
|
|
148
|
+
* `custom.read_records_by_ids` — the same ladder, the same level, the same
|
|
149
|
+
* field masking and the same page ceiling as `list`, addressed by id instead
|
|
150
|
+
* of by page. An id the reader may not see simply does not come back, which
|
|
151
|
+
* is the same answer `list` gives by omission.
|
|
152
|
+
*
|
|
153
|
+
* It exists because a realtime notice has always named the exact ids that
|
|
154
|
+
* moved and no door could take them: three cells changing re-read a fifty-row
|
|
155
|
+
* page in every watching browser.
|
|
156
|
+
*/
|
|
157
|
+
listByIds(args: {
|
|
158
|
+
table_id: Uuid;
|
|
159
|
+
ids: readonly Uuid[];
|
|
160
|
+
}): Promise<RecordsResult<ReadRow[]>>;
|
|
146
161
|
query(query: RecordQuery): Promise<RecordsResult<{
|
|
147
162
|
rows: ReadRow[];
|
|
148
163
|
total: number | null;
|
|
@@ -1322,6 +1337,7 @@ declare function doorAbsent(name: string): RecordsError;
|
|
|
1322
1337
|
declare const DOORS: {
|
|
1323
1338
|
readonly readRecord: "read_record";
|
|
1324
1339
|
readonly readRecords: "read_records";
|
|
1340
|
+
readonly readRecordsByIds: "read_records_by_ids";
|
|
1325
1341
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1326
1342
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1327
1343
|
readonly recordWrite: "record_write";
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-
|
|
2
|
-
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, R as RelationFlavor, aj as RetiredActorWord, ak as RuleNodeKind, al as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, a as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as err, aE as isRecordsErr, aF as ok } from '../field-
|
|
1
|
+
import { g as Timestamp, U as Uuid, h as RecordDocument, i as RecordsResult, j as RecordRead, k as ReadRow, l as Field, m as StoredRecord, N as NewFieldDeclaration, n as FieldPatch, o as RecordRevision, p as ReadValue, q as FieldProposal, r as TableProposal, s as RecordsError, W as WriteConflict, P as PgError, t as StaleWriteDetail, u as PredictedRefusal } from '../field-CdHqvIIy.js';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, x as Actor, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, B as Delivery, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, M as Freshness, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, $ as MergeFieldModifier, a0 as MergeFieldSemanticType, a1 as MergeFieldSource, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, O as OnDelete, a4 as OverridePolicy, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a7 as ParityFieldType, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, ah as RecordsErrorCode, ai as RelationBinding, f as RelationCardinality, R as RelationFlavor, aj as RetiredActorWord, ak as RuleNodeKind, al as RuleUse, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, S as StorageMode, aq as StoreDoorName, ar as StoreRefusalCode, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, a as TableDisplay, av as TableOrigin, T as TableType, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, aD as err, aE as isRecordsErr, aF as ok } from '../field-CdHqvIIy.js';
|
|
3
3
|
import { RelationCoordinate, RecordsConfig, Table, TableCapacity, EntityTableFacts, NewEntityFieldDeclaration, EntityFieldRights, EntityRecordRead, EntityRecordsFound, Pipeline, PipelineColumn, PipelineVerdict, PipelineMoveResult, PipelineSpec, PipelineDeclared, StageRuleOnFail, StageRuleEnforcement, StagePending, StagePendingOnBoard, PipelineGate, PipelineGatePreview, FormSummary, BookingSummary, BookingAvailability, BookingDeclared, ImportPlan, ImportPolicy, ImportOpened, ImportBatchResult, ImportFinished, ImportReport, ImportRun, InboundDeclared, InboundAddress, PortalSummary, PortalCard, PortalInvitation, PortalRevocation, PortalPreviewRow, DashboardSummary, DashboardBlock, AggregateFilter, DashboardRunResult, StuckRow, CaptureSheetSummary, CaptureSheetFace, CaptureFileRef, CaptureOutcome, EnrichmentSummary, EnrichDeclared, EnrichDueRow, EnrichCell, EnrichRun, AggregateMeasure, AggregateBucket, 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, ExternalPrincipalCard, PublishBinding, ResolvedPublishBinding, MyLevel, RecordsDataSource } from '../index.js';
|
|
4
|
-
export { AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, CustomFieldTableType, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip } from '../index.js';
|
|
4
|
+
export { AggregateOperation, AggregateWindow, BookingWindow, CaptureField, CaptureQuestion, CaptureQueue, CaptureQueueCounts, CaptureQueueOptions, CaptureQueuePorts, CaptureQueueStore, CaptureSyncReport, ChecklistRequirement, ChecklistRequirementKind, ChecklistRoleSpec, ChecklistStepSpec, ChecklistTrigger, ChecklistTriggerKind, ChoiceOption, CustomFieldTableType, DashboardBlockKind, DashboardBlockResult, DocSignatureCheck, EnrichAlternate, EnrichSource, Enrichment, EntityFieldValue, EntityRecordMatch, HistoryActor, HistoryActorKind, HistoryChange, Home, ImportColumnPlan, ImportOutcome, ImportProposal, MergeField, MergeFieldProvenance, MergeFieldResolution, MergeFieldTransform, MissingBehavior, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, PermissionLevel, PipelineMissingField, PipelineRule, PipelineRuleKind, PipelineStage, PortalPrincipal, PortalTableExposure, QueuedCapture, QueuedCaptureFile, QueuedCaptureState, QuietHours, REFUSALS_WORTH_REPEATING, RecordComment, RecordScopeComment, RecordScopeField, RecordScopeHistoryEntry, RecordScopeRelation, RecordScopeWithheld, RecordsActor, RecordsChangeSink, RecordsErrorSink, RecordsFilter, RecordsRealtimePort, RecordsResolverPort, RecordsResponse, RecordsTableQuery, RegisteredTable, Relation, RelationCarries, RelationProperties, RelationTarget, ResolutionTriple, Rule, RuleAnswer, RuleExpression, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, StageRuleWarning, SubscriptionBlock, SubscriptionCadence, WorkDueState, WorkInboxKind, WorkOrigin, WorkTemplateNode, WorkTemplateRelation, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isOwnOp, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, rememberedOpCount, scopeChip } from '../index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -143,6 +143,21 @@ interface RecordsClient {
|
|
|
143
143
|
rows: ReadRow[];
|
|
144
144
|
total: number | null;
|
|
145
145
|
}>>;
|
|
146
|
+
/**
|
|
147
|
+
* DOOR-1 FOR AN ID SET. Exactly these records of this Table, through
|
|
148
|
+
* `custom.read_records_by_ids` — the same ladder, the same level, the same
|
|
149
|
+
* field masking and the same page ceiling as `list`, addressed by id instead
|
|
150
|
+
* of by page. An id the reader may not see simply does not come back, which
|
|
151
|
+
* is the same answer `list` gives by omission.
|
|
152
|
+
*
|
|
153
|
+
* It exists because a realtime notice has always named the exact ids that
|
|
154
|
+
* moved and no door could take them: three cells changing re-read a fifty-row
|
|
155
|
+
* page in every watching browser.
|
|
156
|
+
*/
|
|
157
|
+
listByIds(args: {
|
|
158
|
+
table_id: Uuid;
|
|
159
|
+
ids: readonly Uuid[];
|
|
160
|
+
}): Promise<RecordsResult<ReadRow[]>>;
|
|
146
161
|
query(query: RecordQuery): Promise<RecordsResult<{
|
|
147
162
|
rows: ReadRow[];
|
|
148
163
|
total: number | null;
|
|
@@ -1322,6 +1337,7 @@ declare function doorAbsent(name: string): RecordsError;
|
|
|
1322
1337
|
declare const DOORS: {
|
|
1323
1338
|
readonly readRecord: "read_record";
|
|
1324
1339
|
readonly readRecords: "read_records";
|
|
1340
|
+
readonly readRecordsByIds: "read_records_by_ids";
|
|
1325
1341
|
readonly queryRecordAsOf: "query_record_as_of";
|
|
1326
1342
|
readonly queryTableAsOf: "query_table_as_of";
|
|
1327
1343
|
readonly recordWrite: "record_write";
|
package/dist/core/index.js
CHANGED
|
@@ -436,6 +436,45 @@ function isRecordsErr(result) {
|
|
|
436
436
|
var ok = (data) => ({ ok: true, data });
|
|
437
437
|
var err = (error) => ({ ok: false, error });
|
|
438
438
|
|
|
439
|
+
// src/ops.ts
|
|
440
|
+
var REMEMBER_MS = 3e4;
|
|
441
|
+
var REMEMBER_MAX = 500;
|
|
442
|
+
var ours = /* @__PURE__ */ new Map();
|
|
443
|
+
function trim(now) {
|
|
444
|
+
for (const [id, at] of ours) {
|
|
445
|
+
if (now - at <= REMEMBER_MS) break;
|
|
446
|
+
ours.delete(id);
|
|
447
|
+
}
|
|
448
|
+
while (ours.size > REMEMBER_MAX) {
|
|
449
|
+
const oldest = ours.keys().next();
|
|
450
|
+
if (oldest.done === true) break;
|
|
451
|
+
ours.delete(oldest.value);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
function mintOpId() {
|
|
455
|
+
const id = crypto.randomUUID();
|
|
456
|
+
const now = Date.now();
|
|
457
|
+
ours.set(id, now);
|
|
458
|
+
trim(now);
|
|
459
|
+
return id;
|
|
460
|
+
}
|
|
461
|
+
function isOwnOp(opId) {
|
|
462
|
+
if (!opId) return false;
|
|
463
|
+
const at = ours.get(opId);
|
|
464
|
+
if (at === void 0) return false;
|
|
465
|
+
if (Date.now() - at > REMEMBER_MS) {
|
|
466
|
+
ours.delete(opId);
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
return true;
|
|
470
|
+
}
|
|
471
|
+
function forgetAllOps() {
|
|
472
|
+
ours.clear();
|
|
473
|
+
}
|
|
474
|
+
function rememberedOpCount() {
|
|
475
|
+
return ours.size;
|
|
476
|
+
}
|
|
477
|
+
|
|
439
478
|
// src/store.generated.ts
|
|
440
479
|
var ACTOR_VOCABULARY = ["user", "agent", "system"];
|
|
441
480
|
var RETIRED_ACTOR_WORDS = { "ai": "agent", "code": "system", "human": "user" };
|
|
@@ -879,6 +918,7 @@ var STORE_DOORS = [
|
|
|
879
918
|
{ name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
|
|
880
919
|
{ name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
881
920
|
{ name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
921
|
+
{ name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
882
922
|
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
883
923
|
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "definer" },
|
|
884
924
|
{ name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
|
|
@@ -903,6 +943,7 @@ var STORE_DOORS = [
|
|
|
903
943
|
{ name: "record_values", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
904
944
|
{ name: "record_values_of", args: "p_row custom.record", returns: "jsonb", security: "invoker" },
|
|
905
945
|
{ name: "record_values_versioned", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "definer" },
|
|
946
|
+
{ name: "record_words", args: "p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text", returns: "text", security: "definer" },
|
|
906
947
|
{ name: "record_write", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "uuid", security: "definer" },
|
|
907
948
|
{ name: "record_write_many", args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]", returns: "uuid[]", security: "definer" },
|
|
908
949
|
{ name: "refusals_claiming_a_level_never_asked", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
@@ -1103,18 +1144,18 @@ var STORE_KNOBS = [
|
|
|
1103
1144
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
1104
1145
|
];
|
|
1105
1146
|
var STORE_REFUSAL_CODES = [
|
|
1106
|
-
{ code: "02000", raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
1147
|
+
{ code: "02000", raised_by: "_checklist_instantiate,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
1107
1148
|
{ code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign" },
|
|
1108
1149
|
{ code: "22003", raised_by: "context_resolve" },
|
|
1109
1150
|
{ code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
|
|
1110
1151
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
1111
1152
|
{ code: "22012", raised_by: "rule_eval" },
|
|
1112
|
-
{ code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
1153
|
+
{ code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
1113
1154
|
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
1114
1155
|
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
1115
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
1156
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
1116
1157
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
1117
|
-
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
1158
|
+
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_by_ids,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
1118
1159
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
1119
1160
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
1120
1161
|
{ code: "54001", raised_by: "record_delete" },
|
|
@@ -2202,6 +2243,13 @@ var DOORS = {
|
|
|
2202
2243
|
// this person could see.
|
|
2203
2244
|
readRecord: "read_record",
|
|
2204
2245
|
readRecords: "read_records",
|
|
2246
|
+
// THE SAME READ DOOR, ADDRESSED BY AN ID SET. A realtime notice names the exact ids that
|
|
2247
|
+
// moved; before this existed the only door that took them was the PAGE door, so a
|
|
2248
|
+
// three-cell change re-read fifty rows in every watching browser. It is a separate NAME
|
|
2249
|
+
// rather than a sixth argument to `read_records` because adding a defaulted argument to a
|
|
2250
|
+
// live Postgres function makes every existing call ambiguous — `is not unique`. Same
|
|
2251
|
+
// ladder, same level, same masking, same page ceiling.
|
|
2252
|
+
readRecordsByIds: "read_records_by_ids",
|
|
2205
2253
|
// DOOR-8, the two clocks. `p_recorded_at` is what the store SAID then;
|
|
2206
2254
|
// `p_world_on` is what was TRUE of the world on that date, read out of dated
|
|
2207
2255
|
// values. A client that answered either one itself would be guessing.
|
|
@@ -2786,17 +2834,18 @@ function createRecordsClient(config) {
|
|
|
2786
2834
|
async recordWrite({ table_id, data }) {
|
|
2787
2835
|
return callDoor(
|
|
2788
2836
|
DOORS.recordWrite,
|
|
2789
|
-
{ p_organization_id: org, p_table_id: table_id, p_data: data },
|
|
2837
|
+
{ p_organization_id: org, p_table_id: table_id, p_data: { ...data, _op_id: mintOpId() } },
|
|
2790
2838
|
"recordWrite"
|
|
2791
2839
|
);
|
|
2792
2840
|
},
|
|
2793
2841
|
async recordWriteMany({ table_id, rows, ids }) {
|
|
2842
|
+
const opId = mintOpId();
|
|
2794
2843
|
return callDoor(
|
|
2795
2844
|
DOORS.recordWriteMany,
|
|
2796
2845
|
{
|
|
2797
2846
|
p_organization_id: org,
|
|
2798
2847
|
p_table_id: table_id,
|
|
2799
|
-
p_rows: rows,
|
|
2848
|
+
p_rows: rows.map((row) => ({ ...row, _op_id: opId })),
|
|
2800
2849
|
...ids === void 0 ? {} : { p_ids: ids }
|
|
2801
2850
|
},
|
|
2802
2851
|
"recordWriteMany"
|
|
@@ -2808,7 +2857,7 @@ function createRecordsClient(config) {
|
|
|
2808
2857
|
{
|
|
2809
2858
|
p_organization_id: org,
|
|
2810
2859
|
p_record_id: record_id,
|
|
2811
|
-
p_patch: patch,
|
|
2860
|
+
p_patch: { ...patch, _op_id: mintOpId() },
|
|
2812
2861
|
...expectedVersion === void 0 ? {} : { p_expected_version: expectedVersion }
|
|
2813
2862
|
},
|
|
2814
2863
|
"recordUpdate"
|
|
@@ -2850,6 +2899,21 @@ function createRecordsClient(config) {
|
|
|
2850
2899
|
}
|
|
2851
2900
|
return ok({ record_id, document, hidden, computed, computedUnavailable });
|
|
2852
2901
|
},
|
|
2902
|
+
async listByIds({ table_id, ids }) {
|
|
2903
|
+
if (ids.length === 0) return ok([]);
|
|
2904
|
+
const door = await callDoor(
|
|
2905
|
+
DOORS.readRecordsByIds,
|
|
2906
|
+
{ p_organization_id: org, p_table_id: table_id, p_record_ids: ids },
|
|
2907
|
+
"listByIds"
|
|
2908
|
+
);
|
|
2909
|
+
if (!door.ok) return err(door.error);
|
|
2910
|
+
return ok(
|
|
2911
|
+
(door.data ?? []).map((row) => {
|
|
2912
|
+
const { document, hidden } = unfold(row.document);
|
|
2913
|
+
return { id: row.id, document, level: row.level, hidden };
|
|
2914
|
+
})
|
|
2915
|
+
);
|
|
2916
|
+
},
|
|
2853
2917
|
async list({ table_id, limit = 50, offset = 0 }) {
|
|
2854
2918
|
const door = await callDoor(
|
|
2855
2919
|
DOORS.readRecords,
|
|
@@ -5031,6 +5095,7 @@ export {
|
|
|
5031
5095
|
err,
|
|
5032
5096
|
exportCsv,
|
|
5033
5097
|
exportXlsx,
|
|
5098
|
+
forgetAllOps,
|
|
5034
5099
|
highestLevel,
|
|
5035
5100
|
holdsARetiredChoice,
|
|
5036
5101
|
importCsv,
|
|
@@ -5038,6 +5103,7 @@ export {
|
|
|
5038
5103
|
indexedDbStore,
|
|
5039
5104
|
intersectIds,
|
|
5040
5105
|
isDecided,
|
|
5106
|
+
isOwnOp,
|
|
5041
5107
|
isRecordsErr,
|
|
5042
5108
|
isTheChosen,
|
|
5043
5109
|
looksLikeAnId,
|
|
@@ -5046,6 +5112,7 @@ export {
|
|
|
5046
5112
|
measureKey,
|
|
5047
5113
|
memoryStore,
|
|
5048
5114
|
mintClientKey,
|
|
5115
|
+
mintOpId,
|
|
5049
5116
|
ok,
|
|
5050
5117
|
openCaptureQueue,
|
|
5051
5118
|
optionKey,
|
|
@@ -5058,6 +5125,7 @@ export {
|
|
|
5058
5125
|
predictValueRefusals,
|
|
5059
5126
|
predictWriteRefusals,
|
|
5060
5127
|
publicFormPath,
|
|
5128
|
+
rememberedOpCount,
|
|
5061
5129
|
scopeChip,
|
|
5062
5130
|
staleWriteDetail,
|
|
5063
5131
|
supabaseDataSource,
|