@ai-matrx/records 0.92.0 → 0.92.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 +17 -3
- package/README.md +4 -4
- package/dist/{client-DE9Mq6YX.d.cts → client-Cn3odIIB.d.cts} +10 -8
- package/dist/{client-vJAb7g9r.d.ts → client-Dzd8gtAo.d.ts} +10 -8
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +14 -14
- package/dist/core/index.d.ts +14 -14
- package/dist/core/index.js +6 -6
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +6 -6
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +11 -11
- package/dist/data/index.d.ts +11 -11
- package/dist/data/index.js +6 -6
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-Btg5bql1.d.cts → declareTable-CrL6AZKB.d.cts} +4 -4
- package/dist/{declareTable-JKt2q34d.d.ts → declareTable-ZRW5EsTQ.d.ts} +4 -4
- package/dist/entity/index.d.cts +6 -6
- package/dist/entity/index.d.ts +6 -6
- package/dist/{field-BJBnTyJ0.d.cts → field-CCY1rG9l.d.cts} +1 -1
- package/dist/{field-Ti5iAxFr.d.ts → field-enufS5ry.d.ts} +1 -1
- package/dist/forms/index.d.cts +3 -3
- package/dist/forms/index.d.ts +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js.map +1 -1
- package/dist/memory/index.d.cts +7 -7
- package/dist/memory/index.d.ts +7 -7
- package/dist/{port-D2i2o7Lg.d.ts → port-C54ykAOv.d.ts} +2 -2
- package/dist/{port-CPVBfDxS.d.cts → port-Drioh9al.d.cts} +2 -2
- package/dist/{portal-DfeY2Boy.d.cts → portal-DRdmZ-xv.d.cts} +1 -1
- package/dist/{portal-Db4CYyHe.d.ts → portal-or_f7BkT.d.ts} +1 -1
- package/dist/{ports-BWtxAnXh.d.ts → ports-BeOgjwYl.d.ts} +1 -1
- package/dist/{ports-DSU2RsR6.d.cts → ports-s0D2jvqn.d.cts} +1 -1
- package/dist/react/index.cjs +6 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +3 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +6 -6
- package/dist/react/index.js.map +1 -1
- package/dist/realtime/index.d.cts +2 -2
- package/dist/realtime/index.d.ts +2 -2
- package/dist/{record-BQi92d4-.d.cts → record-BwCf9wKW.d.cts} +1 -1
- package/dist/{record-BQi92d4-.d.ts → record-BwCf9wKW.d.ts} +1 -1
- package/dist/{relation-DMwkmzgN.d.cts → relation-8vAWCa67.d.cts} +2 -2
- package/dist/{relation-DlcqV_W5.d.ts → relation-eLMgv_dV.d.ts} +2 -2
- package/dist/{rule-B8kR0l01.d.ts → rule-D9yNiorf.d.ts} +1 -1
- package/dist/{rule-BMViCLmW.d.cts → rule-wHI5B0Ka.d.cts} +1 -1
- package/dist/search/index.d.cts +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/setup/index.cjs +6 -6
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +11 -11
- package/dist/setup/index.d.ts +11 -11
- package/dist/setup/index.js +6 -6
- package/dist/setup/index.js.map +1 -1
- package/dist/{subscription-5CLN3Jug.d.ts → subscription-BynsG1K6.d.ts} +2 -2
- package/dist/{subscription-D-VEzvyy.d.cts → subscription-CdoI-UaB.d.cts} +2 -2
- package/dist/{table-kind-Cm6PXkWx.d.cts → table-kind-DzctQ7dO.d.cts} +2 -2
- package/dist/{table-kind-CVp43g6h.d.ts → table-kind-i3lZJa3f.d.ts} +2 -2
- package/dist/templates/index.d.cts +10 -10
- package/dist/templates/index.d.ts +10 -10
- package/dist/typed-table/index.cjs +6 -6
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +10 -10
- package/dist/typed-table/index.d.ts +10 -10
- package/dist/typed-table/index.js +6 -6
- package/dist/typed-table/index.js.map +1 -1
- package/dist/{types-DTEGaxso.d.cts → types-BKYEeFt4.d.cts} +2 -2
- package/dist/{types-DF-dxB_l.d.ts → types-BvL_oKFl.d.ts} +2 -2
- package/dist/{types-9Q5SHRDJ.d.cts → types-D8qdG3Lg.d.cts} +2 -2
- package/dist/{types-Cs2MyE3u.d.cts → types-DAFP6XFe.d.cts} +2 -2
- package/dist/{types-CfYy-vdV.d.ts → types-DYzXhD7j.d.ts} +2 -2
- package/dist/{types-Dji5SpFS.d.ts → types-cpKY7Pjb.d.ts} +2 -2
- package/dist/use-cases/index.d.cts +5 -5
- package/dist/use-cases/index.d.ts +5 -5
- package/dist/{validate-BydKd-Le.d.ts → validate-DbvAParj.d.ts} +1 -1
- package/dist/{validate-CqJakTKk.d.cts → validate-DfNMxjmU.d.cts} +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.92.2
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records/v0.92.1..npm/records/v0.92.2 -- apps/shared/records`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.92.1
|
|
10
|
+
|
|
11
|
+
**`recordRead`'s version is opt-in: `recordRead({ record_id, withVersion: true })`.** 0.92.0 read the header on
|
|
12
|
+
every call, so a screen that draws first and versions later (the record form) waited for the slower of the two.
|
|
13
|
+
|
|
14
|
+
**Consumer action:** none for screens; a host that wants the version with the read passes `withVersion: true`.
|
|
15
|
+
|
|
3
16
|
## 0.92.0
|
|
4
17
|
|
|
5
18
|
**A member of an archived organization is told so.** Every store door used to refuse an archived organization with
|
|
@@ -24,9 +37,10 @@ the person saw (`updateRecordAt`, `changeRecordsAt`, `movePipelineCardAt(s)`, `r
|
|
|
24
37
|
`updateOnTheWinningVersion`), `askOnce` (one question in flight per client) and `refusal` (a refusal shaped
|
|
25
38
|
like the store's own). React is the only peer it needs.
|
|
26
39
|
|
|
27
|
-
**`recordRead` answers `version`.** The read asks the record's header in the
|
|
28
|
-
safe edit (`recordUpdate` with `expected_version`) needs no second call. `null`
|
|
29
|
-
be read (the record still comes back).
|
|
40
|
+
**`recordRead({ record_id, withVersion: true })` answers `version`.** The read asks the record's header in the
|
|
41
|
+
same round of requests, so a safe edit (`recordUpdate` with `expected_version`) needs no second call. `null`
|
|
42
|
+
when the version could not be read (the record still comes back). Off by default, so a screen that draws
|
|
43
|
+
before its version lands is never held back.
|
|
30
44
|
|
|
31
45
|
**Consumer action:** none. Hosts that read a record and then asked `recordHeaders` for its version can use
|
|
32
46
|
`read.data.version` instead.
|
package/README.md
CHANGED
|
@@ -55,9 +55,8 @@ const tableId = table.data; // the table id
|
|
|
55
55
|
const created = await matrx.records.recordWrite({ table_id: tableId, data: { caller: "Marcus Delgado", phone: "+14155550178" } });
|
|
56
56
|
const page = await matrx.records.list({ table_id: tableId, limit: 50 }); // { rows, total }
|
|
57
57
|
const record_id = created.ok ? created.data : "";
|
|
58
|
-
const read = await matrx.records.recordRead({ record_id });
|
|
59
|
-
const
|
|
60
|
-
const expectedVersion = heads.ok ? heads.data[0]?.version : undefined;
|
|
58
|
+
const read = await matrx.records.recordRead({ record_id, withVersion: true }); // .data.document, .data.version
|
|
59
|
+
const expectedVersion = read.ok ? (read.data.version ?? undefined) : undefined;
|
|
61
60
|
const edited = await matrx.records.recordUpdate({ record_id, patch: { phone: "+14155550199" }, expectedVersion }); // answers the new version
|
|
62
61
|
// Always send expectedVersion: a colleague's newer edit is then refused (`stale_write`, field by field), never overwritten.
|
|
63
62
|
const archived = await matrx.records.recordDelete({ record_id }); // soft: recordRestore brings it back
|
|
@@ -82,7 +81,8 @@ as a second mode (planned); today `auth` is a signed-in session.
|
|
|
82
81
|
| `records/core` | the typed client over every door (tables, records, versions, views, forms, totals) |
|
|
83
82
|
| `records/realtime` | the live-changes port setup uses |
|
|
84
83
|
| `records/search` | `searchRecords`, `listStoreRecordCandidates` |
|
|
85
|
-
| `records/forms` | the form document, embeds
|
|
84
|
+
| `records/forms` | the form document, embeds, which read a public address does, `typedAnswersFor` |
|
|
85
|
+
| `records/versions` | the version rule: `useRecordVersions`, version-carrying write doors, `askOnce`, `refusal` |
|
|
86
86
|
| `records/entity`, `records/entity/react` | platform records (contacts, projects, tasks) |
|
|
87
87
|
| `records/data`, `records/data/react` | one data port and TanStack hooks over custom tables and entities |
|
|
88
88
|
| `records/react` | provider + hooks over the client |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as ChoiceNudge, T as TableArchiveProgress, a as TableRestoreProgress, b as TableDuplicateProgress, c as TableDuplicated, d as TableCopyInProgress, A as ArchiveLane, e as ArchivedRow, f as Table, g as TableHome, h as TableMoved, i as ChoiceUsage, j as ChoiceRehome, k as ChoiceCellBack, l as ChoicesRehomed, m as TableCapacity, F as FieldDrift, n as FieldRetyped, R as RecordsMerged, M as MigrationUndone, o as TableKindFacts, p as TableLevelFacts, q as TableReaderRule, r as TableLevelSet, E as EntityTableFacts, s as EntityFieldsAcross, N as NewEntityFieldDeclaration, t as EntityFieldRights, u as EntityRecordRead, v as EntityBackLinks, w as EntityRowWritten, x as EntityRecordsFound, P as Pipeline, y as PipelineColumn, z as PipelineVerdict, B as PipelineMoveResult, D as PipelineMoveManyItem, G as PipelineMoveMany, H as PipelineSpec, I as PipelineDeclared, S as StageRuleOnFail, J as StageRuleEnforcement, K as StagePending, L as StagePendingOnBoard, O as PipelineGate, Q as PipelineGatePreview, U as ImportPlan, V as ImportPolicy, W as ImportOpened, X as ImportColumnsDeclared, Y as ImportBatchResult, Z as ImportFinished, _ as ImportReport, $ as ImportRun, a0 as InboundDeclared, a1 as InboundAddress, a2 as FormArchiveAnswer, a3 as ArchivedForm, a4 as ArchivedChecklistTemplate, a5 as TableRowDefaults, a6 as TableRowDefaultsPatch, a7 as RowDefaultsApplied, a8 as RecordRowControls, a9 as CaptureSheetSummary, aa as CaptureSheetFace, ab as CaptureFileRef, ac as CaptureOutcome, ad as EnrichmentSummary, ae as EnrichDeclared, af as EnrichDueRow, ag as EnrichCell, ah as EnrichRun, ai as DrillSource, aj as DrillDefinition, ak as DrillQuestion, al as DrillAnswer, am as DrillRowsPage, an as DocToken, ao as DocUnresolvedToken, ap as DocTemplateRow, aq as DocRenderRow, ar as DocSignatureRow, as as RecordHistoryEntry, at as RecordScopeContext, au as ConversationScope, av as ConversationScopeContext, aw as FieldHistoryEntry, ax as RestorePreview, ay as RestoreResult, az as CommentThreadRead, aA as CommentWritten, aB as AnonTokenBinding, aC as ChecklistSpec, aD as ChecklistDeclared, aE as ChecklistTemplateSummary, aF as ChecklistTemplateShape, aG as ChecklistRunStarted, aH as ChecklistRunStep, aI as ChecklistRunSummary, aJ as ChecklistStepCompleted, aK as WorkState, aL as WorkGraph, aM as WorkInstantiation, aN as WorkTurn, aO as WorkAssignmentField, aP as WorkSlotHold, aQ as WorkInboxView, aR as WorkInboxItem, aS as InboxStateChange, aT as InboxCounts, aU as WorkListFlavour, aV as WorkListItem, aW as WorkAssignment, aX as WorkRecordState, aY as WorkApprover, aZ as WorkChange, a_ as WorkApprovalFiled, a$ as WorkApprovalDecision, b0 as WorkDecideManyItem, b1 as WorkDecideMany, b2 as ExternalPrincipalCard, b3 as PublishBinding, b4 as ResolvedPublishBinding, b5 as ResolvedPublishBindingKind, b6 as MyLevel, b7 as DecorationPath, b8 as TableDecorations, b9 as GridLayout, ba as FormulaParse, bb as FormulaPreview, bc as RowAction, bd as ActionRunResult, be as AutomationSpec, bf as AutomationDeclared, bg as AutomationList, bh as AutomationFlipped, bi as AutomationRuns, bj as RecordEvent, bk as TableWebhookDeclared, bl as TableWebhook, bm as IoExportPage, bn as TableListEntry, bo as DataHomeTable, bp as TableSyncSpec, bq as TableSyncResult, br as TableRowCount, bs as RecordHeader, bt as OutsideShareAnswer, bu as ViewOrderSet } from './table-kind-
|
|
2
|
-
import { d as StoreFilter, e as DashboardSummary, f as DashboardBlock, R as RecordFilter, g as AggregateCompare, c as AggregateBucket, h as DashboardRunResult, i as StuckRow, b as AggregateMeasure, j as AggregateRow, k as Subscription, M as MySubscription, l as SubscriptionSpec, m as DigestPreview, n as SavedViewRow, o as SavedViewSpecIn, p as RowTemplateRow } from './subscription-
|
|
3
|
-
import { R as RelationCoordinate, a as RelationWordsManyArgs, b as RelationIcons, c as ReverseColumn, d as ReverseLinksManyArgs, e as ReverseLinks, f as ReverseLinksFieldsArgs, S as SourceArchived } from './relation-
|
|
4
|
-
import { b as Field, c as FieldPatch, N as NewFieldDeclaration, R as RelationNamesAnswer, d as FieldDuplicated, e as FieldProposal, T as TableProposal, B as ButtonPressed } from './field-
|
|
5
|
-
import { F as FormSummary, B as BookingSummary, a as BookingAvailability, b as BookingDeclared, c as FormRoute, d as FormResults } from './rule-
|
|
6
|
-
import { F as FormLookOptions, P as PortalSummary, a as PortalArchiveFilter, b as PortalArchiveAnswer, c as PortalTableRef, d as PortalCard, e as PortalConfigInput, f as PortalFormSpec, g as PortalFormAnswer, h as PortalInvitation, i as PortalRevocation, j as PortalPreviewRow } from './portal-
|
|
7
|
-
import { T as Timestamp, U as Uuid, k as RecordsErrorCode, l as RecordDocument, R as RecordsResult, m as RecordChange, n as RecordChangeResult, o as RecordGraphWritten, p as RecordRead, q as ReadRow, r as RecordPageSort, s as RecordPage, t as RecordKeysetPage, u as StoredRecord, v as RecordRevision, w as ReadValue, a as RecordsError, W as WriteConflict } from './record-
|
|
8
|
-
import { a as RecordsConfig } from './ports-
|
|
1
|
+
import { C as ChoiceNudge, T as TableArchiveProgress, a as TableRestoreProgress, b as TableDuplicateProgress, c as TableDuplicated, d as TableCopyInProgress, A as ArchiveLane, e as ArchivedRow, f as Table, g as TableHome, h as TableMoved, i as ChoiceUsage, j as ChoiceRehome, k as ChoiceCellBack, l as ChoicesRehomed, m as TableCapacity, F as FieldDrift, n as FieldRetyped, R as RecordsMerged, M as MigrationUndone, o as TableKindFacts, p as TableLevelFacts, q as TableReaderRule, r as TableLevelSet, E as EntityTableFacts, s as EntityFieldsAcross, N as NewEntityFieldDeclaration, t as EntityFieldRights, u as EntityRecordRead, v as EntityBackLinks, w as EntityRowWritten, x as EntityRecordsFound, P as Pipeline, y as PipelineColumn, z as PipelineVerdict, B as PipelineMoveResult, D as PipelineMoveManyItem, G as PipelineMoveMany, H as PipelineSpec, I as PipelineDeclared, S as StageRuleOnFail, J as StageRuleEnforcement, K as StagePending, L as StagePendingOnBoard, O as PipelineGate, Q as PipelineGatePreview, U as ImportPlan, V as ImportPolicy, W as ImportOpened, X as ImportColumnsDeclared, Y as ImportBatchResult, Z as ImportFinished, _ as ImportReport, $ as ImportRun, a0 as InboundDeclared, a1 as InboundAddress, a2 as FormArchiveAnswer, a3 as ArchivedForm, a4 as ArchivedChecklistTemplate, a5 as TableRowDefaults, a6 as TableRowDefaultsPatch, a7 as RowDefaultsApplied, a8 as RecordRowControls, a9 as CaptureSheetSummary, aa as CaptureSheetFace, ab as CaptureFileRef, ac as CaptureOutcome, ad as EnrichmentSummary, ae as EnrichDeclared, af as EnrichDueRow, ag as EnrichCell, ah as EnrichRun, ai as DrillSource, aj as DrillDefinition, ak as DrillQuestion, al as DrillAnswer, am as DrillRowsPage, an as DocToken, ao as DocUnresolvedToken, ap as DocTemplateRow, aq as DocRenderRow, ar as DocSignatureRow, as as RecordHistoryEntry, at as RecordScopeContext, au as ConversationScope, av as ConversationScopeContext, aw as FieldHistoryEntry, ax as RestorePreview, ay as RestoreResult, az as CommentThreadRead, aA as CommentWritten, aB as AnonTokenBinding, aC as ChecklistSpec, aD as ChecklistDeclared, aE as ChecklistTemplateSummary, aF as ChecklistTemplateShape, aG as ChecklistRunStarted, aH as ChecklistRunStep, aI as ChecklistRunSummary, aJ as ChecklistStepCompleted, aK as WorkState, aL as WorkGraph, aM as WorkInstantiation, aN as WorkTurn, aO as WorkAssignmentField, aP as WorkSlotHold, aQ as WorkInboxView, aR as WorkInboxItem, aS as InboxStateChange, aT as InboxCounts, aU as WorkListFlavour, aV as WorkListItem, aW as WorkAssignment, aX as WorkRecordState, aY as WorkApprover, aZ as WorkChange, a_ as WorkApprovalFiled, a$ as WorkApprovalDecision, b0 as WorkDecideManyItem, b1 as WorkDecideMany, b2 as ExternalPrincipalCard, b3 as PublishBinding, b4 as ResolvedPublishBinding, b5 as ResolvedPublishBindingKind, b6 as MyLevel, b7 as DecorationPath, b8 as TableDecorations, b9 as GridLayout, ba as FormulaParse, bb as FormulaPreview, bc as RowAction, bd as ActionRunResult, be as AutomationSpec, bf as AutomationDeclared, bg as AutomationList, bh as AutomationFlipped, bi as AutomationRuns, bj as RecordEvent, bk as TableWebhookDeclared, bl as TableWebhook, bm as IoExportPage, bn as TableListEntry, bo as DataHomeTable, bp as TableSyncSpec, bq as TableSyncResult, br as TableRowCount, bs as RecordHeader, bt as OutsideShareAnswer, bu as ViewOrderSet } from './table-kind-DzctQ7dO.cjs';
|
|
2
|
+
import { d as StoreFilter, e as DashboardSummary, f as DashboardBlock, R as RecordFilter, g as AggregateCompare, c as AggregateBucket, h as DashboardRunResult, i as StuckRow, b as AggregateMeasure, j as AggregateRow, k as Subscription, M as MySubscription, l as SubscriptionSpec, m as DigestPreview, n as SavedViewRow, o as SavedViewSpecIn, p as RowTemplateRow } from './subscription-CdoI-UaB.cjs';
|
|
3
|
+
import { R as RelationCoordinate, a as RelationWordsManyArgs, b as RelationIcons, c as ReverseColumn, d as ReverseLinksManyArgs, e as ReverseLinks, f as ReverseLinksFieldsArgs, S as SourceArchived } from './relation-8vAWCa67.cjs';
|
|
4
|
+
import { b as Field, c as FieldPatch, N as NewFieldDeclaration, R as RelationNamesAnswer, d as FieldDuplicated, e as FieldProposal, T as TableProposal, B as ButtonPressed } from './field-CCY1rG9l.cjs';
|
|
5
|
+
import { F as FormSummary, B as BookingSummary, a as BookingAvailability, b as BookingDeclared, c as FormRoute, d as FormResults } from './rule-wHI5B0Ka.cjs';
|
|
6
|
+
import { F as FormLookOptions, P as PortalSummary, a as PortalArchiveFilter, b as PortalArchiveAnswer, c as PortalTableRef, d as PortalCard, e as PortalConfigInput, f as PortalFormSpec, g as PortalFormAnswer, h as PortalInvitation, i as PortalRevocation, j as PortalPreviewRow } from './portal-DRdmZ-xv.cjs';
|
|
7
|
+
import { T as Timestamp, U as Uuid, k as RecordsErrorCode, l as RecordDocument, R as RecordsResult, m as RecordChange, n as RecordChangeResult, o as RecordGraphWritten, p as RecordRead, q as ReadRow, r as RecordPageSort, s as RecordPage, t as RecordKeysetPage, u as StoredRecord, v as RecordRevision, w as ReadValue, a as RecordsError, W as WriteConflict } from './record-BwCf9wKW.cjs';
|
|
8
|
+
import { a as RecordsConfig } from './ports-s0D2jvqn.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -375,6 +375,8 @@ interface RecordsClient {
|
|
|
375
375
|
recordRead(args: {
|
|
376
376
|
record_id: Uuid;
|
|
377
377
|
withComputed?: boolean;
|
|
378
|
+
/** Also answer `version` (read in the same round, so the read takes as long as the slower of the two). */
|
|
379
|
+
withVersion?: boolean;
|
|
378
380
|
organization_id?: Uuid | null;
|
|
379
381
|
}): Promise<RecordsResult<RecordRead>>;
|
|
380
382
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as ChoiceNudge, T as TableArchiveProgress, a as TableRestoreProgress, b as TableDuplicateProgress, c as TableDuplicated, d as TableCopyInProgress, A as ArchiveLane, e as ArchivedRow, f as Table, g as TableHome, h as TableMoved, i as ChoiceUsage, j as ChoiceRehome, k as ChoiceCellBack, l as ChoicesRehomed, m as TableCapacity, F as FieldDrift, n as FieldRetyped, R as RecordsMerged, M as MigrationUndone, o as TableKindFacts, p as TableLevelFacts, q as TableReaderRule, r as TableLevelSet, E as EntityTableFacts, s as EntityFieldsAcross, N as NewEntityFieldDeclaration, t as EntityFieldRights, u as EntityRecordRead, v as EntityBackLinks, w as EntityRowWritten, x as EntityRecordsFound, P as Pipeline, y as PipelineColumn, z as PipelineVerdict, B as PipelineMoveResult, D as PipelineMoveManyItem, G as PipelineMoveMany, H as PipelineSpec, I as PipelineDeclared, S as StageRuleOnFail, J as StageRuleEnforcement, K as StagePending, L as StagePendingOnBoard, O as PipelineGate, Q as PipelineGatePreview, U as ImportPlan, V as ImportPolicy, W as ImportOpened, X as ImportColumnsDeclared, Y as ImportBatchResult, Z as ImportFinished, _ as ImportReport, $ as ImportRun, a0 as InboundDeclared, a1 as InboundAddress, a2 as FormArchiveAnswer, a3 as ArchivedForm, a4 as ArchivedChecklistTemplate, a5 as TableRowDefaults, a6 as TableRowDefaultsPatch, a7 as RowDefaultsApplied, a8 as RecordRowControls, a9 as CaptureSheetSummary, aa as CaptureSheetFace, ab as CaptureFileRef, ac as CaptureOutcome, ad as EnrichmentSummary, ae as EnrichDeclared, af as EnrichDueRow, ag as EnrichCell, ah as EnrichRun, ai as DrillSource, aj as DrillDefinition, ak as DrillQuestion, al as DrillAnswer, am as DrillRowsPage, an as DocToken, ao as DocUnresolvedToken, ap as DocTemplateRow, aq as DocRenderRow, ar as DocSignatureRow, as as RecordHistoryEntry, at as RecordScopeContext, au as ConversationScope, av as ConversationScopeContext, aw as FieldHistoryEntry, ax as RestorePreview, ay as RestoreResult, az as CommentThreadRead, aA as CommentWritten, aB as AnonTokenBinding, aC as ChecklistSpec, aD as ChecklistDeclared, aE as ChecklistTemplateSummary, aF as ChecklistTemplateShape, aG as ChecklistRunStarted, aH as ChecklistRunStep, aI as ChecklistRunSummary, aJ as ChecklistStepCompleted, aK as WorkState, aL as WorkGraph, aM as WorkInstantiation, aN as WorkTurn, aO as WorkAssignmentField, aP as WorkSlotHold, aQ as WorkInboxView, aR as WorkInboxItem, aS as InboxStateChange, aT as InboxCounts, aU as WorkListFlavour, aV as WorkListItem, aW as WorkAssignment, aX as WorkRecordState, aY as WorkApprover, aZ as WorkChange, a_ as WorkApprovalFiled, a$ as WorkApprovalDecision, b0 as WorkDecideManyItem, b1 as WorkDecideMany, b2 as ExternalPrincipalCard, b3 as PublishBinding, b4 as ResolvedPublishBinding, b5 as ResolvedPublishBindingKind, b6 as MyLevel, b7 as DecorationPath, b8 as TableDecorations, b9 as GridLayout, ba as FormulaParse, bb as FormulaPreview, bc as RowAction, bd as ActionRunResult, be as AutomationSpec, bf as AutomationDeclared, bg as AutomationList, bh as AutomationFlipped, bi as AutomationRuns, bj as RecordEvent, bk as TableWebhookDeclared, bl as TableWebhook, bm as IoExportPage, bn as TableListEntry, bo as DataHomeTable, bp as TableSyncSpec, bq as TableSyncResult, br as TableRowCount, bs as RecordHeader, bt as OutsideShareAnswer, bu as ViewOrderSet } from './table-kind-
|
|
2
|
-
import { d as StoreFilter, e as DashboardSummary, f as DashboardBlock, R as RecordFilter, g as AggregateCompare, c as AggregateBucket, h as DashboardRunResult, i as StuckRow, b as AggregateMeasure, j as AggregateRow, k as Subscription, M as MySubscription, l as SubscriptionSpec, m as DigestPreview, n as SavedViewRow, o as SavedViewSpecIn, p as RowTemplateRow } from './subscription-
|
|
3
|
-
import { R as RelationCoordinate, a as RelationWordsManyArgs, b as RelationIcons, c as ReverseColumn, d as ReverseLinksManyArgs, e as ReverseLinks, f as ReverseLinksFieldsArgs, S as SourceArchived } from './relation-
|
|
4
|
-
import { b as Field, c as FieldPatch, N as NewFieldDeclaration, R as RelationNamesAnswer, d as FieldDuplicated, e as FieldProposal, T as TableProposal, B as ButtonPressed } from './field-
|
|
5
|
-
import { F as FormSummary, B as BookingSummary, a as BookingAvailability, b as BookingDeclared, c as FormRoute, d as FormResults } from './rule-
|
|
6
|
-
import { F as FormLookOptions, P as PortalSummary, a as PortalArchiveFilter, b as PortalArchiveAnswer, c as PortalTableRef, d as PortalCard, e as PortalConfigInput, f as PortalFormSpec, g as PortalFormAnswer, h as PortalInvitation, i as PortalRevocation, j as PortalPreviewRow } from './portal-
|
|
7
|
-
import { T as Timestamp, U as Uuid, k as RecordsErrorCode, l as RecordDocument, R as RecordsResult, m as RecordChange, n as RecordChangeResult, o as RecordGraphWritten, p as RecordRead, q as ReadRow, r as RecordPageSort, s as RecordPage, t as RecordKeysetPage, u as StoredRecord, v as RecordRevision, w as ReadValue, a as RecordsError, W as WriteConflict } from './record-
|
|
8
|
-
import { a as RecordsConfig } from './ports-
|
|
1
|
+
import { C as ChoiceNudge, T as TableArchiveProgress, a as TableRestoreProgress, b as TableDuplicateProgress, c as TableDuplicated, d as TableCopyInProgress, A as ArchiveLane, e as ArchivedRow, f as Table, g as TableHome, h as TableMoved, i as ChoiceUsage, j as ChoiceRehome, k as ChoiceCellBack, l as ChoicesRehomed, m as TableCapacity, F as FieldDrift, n as FieldRetyped, R as RecordsMerged, M as MigrationUndone, o as TableKindFacts, p as TableLevelFacts, q as TableReaderRule, r as TableLevelSet, E as EntityTableFacts, s as EntityFieldsAcross, N as NewEntityFieldDeclaration, t as EntityFieldRights, u as EntityRecordRead, v as EntityBackLinks, w as EntityRowWritten, x as EntityRecordsFound, P as Pipeline, y as PipelineColumn, z as PipelineVerdict, B as PipelineMoveResult, D as PipelineMoveManyItem, G as PipelineMoveMany, H as PipelineSpec, I as PipelineDeclared, S as StageRuleOnFail, J as StageRuleEnforcement, K as StagePending, L as StagePendingOnBoard, O as PipelineGate, Q as PipelineGatePreview, U as ImportPlan, V as ImportPolicy, W as ImportOpened, X as ImportColumnsDeclared, Y as ImportBatchResult, Z as ImportFinished, _ as ImportReport, $ as ImportRun, a0 as InboundDeclared, a1 as InboundAddress, a2 as FormArchiveAnswer, a3 as ArchivedForm, a4 as ArchivedChecklistTemplate, a5 as TableRowDefaults, a6 as TableRowDefaultsPatch, a7 as RowDefaultsApplied, a8 as RecordRowControls, a9 as CaptureSheetSummary, aa as CaptureSheetFace, ab as CaptureFileRef, ac as CaptureOutcome, ad as EnrichmentSummary, ae as EnrichDeclared, af as EnrichDueRow, ag as EnrichCell, ah as EnrichRun, ai as DrillSource, aj as DrillDefinition, ak as DrillQuestion, al as DrillAnswer, am as DrillRowsPage, an as DocToken, ao as DocUnresolvedToken, ap as DocTemplateRow, aq as DocRenderRow, ar as DocSignatureRow, as as RecordHistoryEntry, at as RecordScopeContext, au as ConversationScope, av as ConversationScopeContext, aw as FieldHistoryEntry, ax as RestorePreview, ay as RestoreResult, az as CommentThreadRead, aA as CommentWritten, aB as AnonTokenBinding, aC as ChecklistSpec, aD as ChecklistDeclared, aE as ChecklistTemplateSummary, aF as ChecklistTemplateShape, aG as ChecklistRunStarted, aH as ChecklistRunStep, aI as ChecklistRunSummary, aJ as ChecklistStepCompleted, aK as WorkState, aL as WorkGraph, aM as WorkInstantiation, aN as WorkTurn, aO as WorkAssignmentField, aP as WorkSlotHold, aQ as WorkInboxView, aR as WorkInboxItem, aS as InboxStateChange, aT as InboxCounts, aU as WorkListFlavour, aV as WorkListItem, aW as WorkAssignment, aX as WorkRecordState, aY as WorkApprover, aZ as WorkChange, a_ as WorkApprovalFiled, a$ as WorkApprovalDecision, b0 as WorkDecideManyItem, b1 as WorkDecideMany, b2 as ExternalPrincipalCard, b3 as PublishBinding, b4 as ResolvedPublishBinding, b5 as ResolvedPublishBindingKind, b6 as MyLevel, b7 as DecorationPath, b8 as TableDecorations, b9 as GridLayout, ba as FormulaParse, bb as FormulaPreview, bc as RowAction, bd as ActionRunResult, be as AutomationSpec, bf as AutomationDeclared, bg as AutomationList, bh as AutomationFlipped, bi as AutomationRuns, bj as RecordEvent, bk as TableWebhookDeclared, bl as TableWebhook, bm as IoExportPage, bn as TableListEntry, bo as DataHomeTable, bp as TableSyncSpec, bq as TableSyncResult, br as TableRowCount, bs as RecordHeader, bt as OutsideShareAnswer, bu as ViewOrderSet } from './table-kind-i3lZJa3f.js';
|
|
2
|
+
import { d as StoreFilter, e as DashboardSummary, f as DashboardBlock, R as RecordFilter, g as AggregateCompare, c as AggregateBucket, h as DashboardRunResult, i as StuckRow, b as AggregateMeasure, j as AggregateRow, k as Subscription, M as MySubscription, l as SubscriptionSpec, m as DigestPreview, n as SavedViewRow, o as SavedViewSpecIn, p as RowTemplateRow } from './subscription-BynsG1K6.js';
|
|
3
|
+
import { R as RelationCoordinate, a as RelationWordsManyArgs, b as RelationIcons, c as ReverseColumn, d as ReverseLinksManyArgs, e as ReverseLinks, f as ReverseLinksFieldsArgs, S as SourceArchived } from './relation-eLMgv_dV.js';
|
|
4
|
+
import { b as Field, c as FieldPatch, N as NewFieldDeclaration, R as RelationNamesAnswer, d as FieldDuplicated, e as FieldProposal, T as TableProposal, B as ButtonPressed } from './field-enufS5ry.js';
|
|
5
|
+
import { F as FormSummary, B as BookingSummary, a as BookingAvailability, b as BookingDeclared, c as FormRoute, d as FormResults } from './rule-D9yNiorf.js';
|
|
6
|
+
import { F as FormLookOptions, P as PortalSummary, a as PortalArchiveFilter, b as PortalArchiveAnswer, c as PortalTableRef, d as PortalCard, e as PortalConfigInput, f as PortalFormSpec, g as PortalFormAnswer, h as PortalInvitation, i as PortalRevocation, j as PortalPreviewRow } from './portal-or_f7BkT.js';
|
|
7
|
+
import { T as Timestamp, U as Uuid, k as RecordsErrorCode, l as RecordDocument, R as RecordsResult, m as RecordChange, n as RecordChangeResult, o as RecordGraphWritten, p as RecordRead, q as ReadRow, r as RecordPageSort, s as RecordPage, t as RecordKeysetPage, u as StoredRecord, v as RecordRevision, w as ReadValue, a as RecordsError, W as WriteConflict } from './record-BwCf9wKW.js';
|
|
8
|
+
import { a as RecordsConfig } from './ports-BeOgjwYl.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
@@ -375,6 +375,8 @@ interface RecordsClient {
|
|
|
375
375
|
recordRead(args: {
|
|
376
376
|
record_id: Uuid;
|
|
377
377
|
withComputed?: boolean;
|
|
378
|
+
/** Also answer `version` (read in the same round, so the read takes as long as the slower of the two). */
|
|
379
|
+
withVersion?: boolean;
|
|
378
380
|
organization_id?: Uuid | null;
|
|
379
381
|
}): Promise<RecordsResult<RecordRead>>;
|
|
380
382
|
/**
|
package/dist/core/index.cjs
CHANGED
|
@@ -6898,24 +6898,24 @@ function createRecordsClient(given) {
|
|
|
6898
6898
|
if (!pass.ok) return pass;
|
|
6899
6899
|
return carryOnCopy(pass.data, onProgress);
|
|
6900
6900
|
},
|
|
6901
|
-
async recordRead({ record_id, withComputed = false, organization_id }) {
|
|
6901
|
+
async recordRead({ record_id, withComputed = false, withVersion = false, organization_id }) {
|
|
6902
6902
|
if (organization_id && organization_id !== org) {
|
|
6903
|
-
return clientFor(organization_id).recordRead({ record_id, withComputed, organization_id });
|
|
6903
|
+
return clientFor(organization_id).recordRead({ record_id, withComputed, withVersion, organization_id });
|
|
6904
6904
|
}
|
|
6905
6905
|
if (readOrgs(organization_id).length > 1) {
|
|
6906
6906
|
return openInOwnOrg(
|
|
6907
6907
|
record_id,
|
|
6908
6908
|
organization_id,
|
|
6909
|
-
(sub) => sub.recordRead({ record_id, withComputed, organization_id: sub.config.organizationId }),
|
|
6909
|
+
(sub) => sub.recordRead({ record_id, withComputed, withVersion, organization_id: sub.config.organizationId }),
|
|
6910
6910
|
() => true
|
|
6911
6911
|
);
|
|
6912
6912
|
}
|
|
6913
6913
|
const [door, header] = await Promise.all([
|
|
6914
6914
|
callDoor(DOORS.readRecord, { p_organization_id: org, p_record_id: record_id }, "recordRead"),
|
|
6915
6915
|
// A version that cannot be read never takes the record away: it comes back as null.
|
|
6916
|
-
callDoor(DOORS.recordHeaders, { p_organization_id: org, p_ids: [record_id] }, "recordRead.version").catch(
|
|
6916
|
+
withVersion ? callDoor(DOORS.recordHeaders, { p_organization_id: org, p_ids: [record_id] }, "recordRead.version").catch(
|
|
6917
6917
|
() => null
|
|
6918
|
-
)
|
|
6918
|
+
) : Promise.resolve(null)
|
|
6919
6919
|
]);
|
|
6920
6920
|
if (!door.ok) return err(door.error);
|
|
6921
6921
|
const version = header && header.ok ? header.data?.find((h) => h.id === record_id)?.version ?? null : null;
|
|
@@ -6931,7 +6931,7 @@ function createRecordsClient(given) {
|
|
|
6931
6931
|
if (provenance.ok) computed = provenance.data ?? [];
|
|
6932
6932
|
else computedUnavailable = provenance.error;
|
|
6933
6933
|
}
|
|
6934
|
-
return ok({ record_id, document, hidden, computed, computedUnavailable, version });
|
|
6934
|
+
return ok({ record_id, document, hidden, computed, computedUnavailable, ...withVersion ? { version } : {} });
|
|
6935
6935
|
},
|
|
6936
6936
|
async listByIds({ table_id, ids }) {
|
|
6937
6937
|
if (ids.length === 0) return ok([]);
|