@ai-matrx/records 0.92.0 → 0.92.1
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 +11 -3
- 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 +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NewFieldSpec } from '../declareTable-
|
|
2
|
-
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-
|
|
3
|
-
import { R as RecordsClient } from '../client-
|
|
4
|
-
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-
|
|
5
|
-
import '../field-
|
|
6
|
-
import '../subscription-
|
|
7
|
-
import '../rule-
|
|
8
|
-
import '../relation-
|
|
9
|
-
import '../ports-
|
|
10
|
-
import '../portal-
|
|
1
|
+
import { N as NewFieldSpec } from '../declareTable-CrL6AZKB.cjs';
|
|
2
|
+
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-BwCf9wKW.cjs';
|
|
3
|
+
import { R as RecordsClient } from '../client-Cn3odIIB.cjs';
|
|
4
|
+
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-DzctQ7dO.cjs';
|
|
5
|
+
import '../field-CCY1rG9l.cjs';
|
|
6
|
+
import '../subscription-CdoI-UaB.cjs';
|
|
7
|
+
import '../rule-wHI5B0Ka.cjs';
|
|
8
|
+
import '../relation-8vAWCa67.cjs';
|
|
9
|
+
import '../ports-s0D2jvqn.cjs';
|
|
10
|
+
import '../portal-DRdmZ-xv.cjs';
|
|
11
11
|
|
|
12
12
|
/** Where a declared field's value goes in the graduated table. */
|
|
13
13
|
declare const TO_CUSTOM_FIELDS: "custom_fields";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NewFieldSpec } from '../declareTable-
|
|
2
|
-
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-
|
|
3
|
-
import { R as RecordsClient } from '../client-
|
|
4
|
-
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-
|
|
5
|
-
import '../field-
|
|
6
|
-
import '../subscription-
|
|
7
|
-
import '../rule-
|
|
8
|
-
import '../relation-
|
|
9
|
-
import '../ports-
|
|
10
|
-
import '../portal-
|
|
1
|
+
import { N as NewFieldSpec } from '../declareTable-ZRW5EsTQ.js';
|
|
2
|
+
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-BwCf9wKW.js';
|
|
3
|
+
import { R as RecordsClient } from '../client-Dzd8gtAo.js';
|
|
4
|
+
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-i3lZJa3f.js';
|
|
5
|
+
import '../field-enufS5ry.js';
|
|
6
|
+
import '../subscription-BynsG1K6.js';
|
|
7
|
+
import '../rule-D9yNiorf.js';
|
|
8
|
+
import '../relation-eLMgv_dV.js';
|
|
9
|
+
import '../ports-BeOgjwYl.js';
|
|
10
|
+
import '../portal-or_f7BkT.js';
|
|
11
11
|
|
|
12
12
|
/** Where a declared field's value goes in the graduated table. */
|
|
13
13
|
declare const TO_CUSTOM_FIELDS: "custom_fields";
|
|
@@ -3412,24 +3412,24 @@ function createRecordsClient(given) {
|
|
|
3412
3412
|
if (!pass.ok) return pass;
|
|
3413
3413
|
return carryOnCopy(pass.data, onProgress);
|
|
3414
3414
|
},
|
|
3415
|
-
async recordRead({ record_id, withComputed = false, organization_id }) {
|
|
3415
|
+
async recordRead({ record_id, withComputed = false, withVersion = false, organization_id }) {
|
|
3416
3416
|
if (organization_id && organization_id !== org) {
|
|
3417
|
-
return clientFor(organization_id).recordRead({ record_id, withComputed, organization_id });
|
|
3417
|
+
return clientFor(organization_id).recordRead({ record_id, withComputed, withVersion, organization_id });
|
|
3418
3418
|
}
|
|
3419
3419
|
if (readOrgs(organization_id).length > 1) {
|
|
3420
3420
|
return openInOwnOrg(
|
|
3421
3421
|
record_id,
|
|
3422
3422
|
organization_id,
|
|
3423
|
-
(sub) => sub.recordRead({ record_id, withComputed, organization_id: sub.config.organizationId }),
|
|
3423
|
+
(sub) => sub.recordRead({ record_id, withComputed, withVersion, organization_id: sub.config.organizationId }),
|
|
3424
3424
|
() => true
|
|
3425
3425
|
);
|
|
3426
3426
|
}
|
|
3427
3427
|
const [door, header] = await Promise.all([
|
|
3428
3428
|
callDoor(DOORS.readRecord, { p_organization_id: org, p_record_id: record_id }, "recordRead"),
|
|
3429
3429
|
// A version that cannot be read never takes the record away: it comes back as null.
|
|
3430
|
-
callDoor(DOORS.recordHeaders, { p_organization_id: org, p_ids: [record_id] }, "recordRead.version").catch(
|
|
3430
|
+
withVersion ? callDoor(DOORS.recordHeaders, { p_organization_id: org, p_ids: [record_id] }, "recordRead.version").catch(
|
|
3431
3431
|
() => null
|
|
3432
|
-
)
|
|
3432
|
+
) : Promise.resolve(null)
|
|
3433
3433
|
]);
|
|
3434
3434
|
if (!door.ok) return err(door.error);
|
|
3435
3435
|
const version = header && header.ok ? header.data?.find((h) => h.id === record_id)?.version ?? null : null;
|
|
@@ -3445,7 +3445,7 @@ function createRecordsClient(given) {
|
|
|
3445
3445
|
if (provenance.ok) computed = provenance.data ?? [];
|
|
3446
3446
|
else computedUnavailable = provenance.error;
|
|
3447
3447
|
}
|
|
3448
|
-
return ok({ record_id, document, hidden, computed, computedUnavailable, version });
|
|
3448
|
+
return ok({ record_id, document, hidden, computed, computedUnavailable, ...withVersion ? { version } : {} });
|
|
3449
3449
|
},
|
|
3450
3450
|
async listByIds({ table_id, ids }) {
|
|
3451
3451
|
if (ids.length === 0) return ok([]);
|