@ai-matrx/records 0.97.5 → 0.97.6
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 +6 -0
- package/dist/{client-C6_v0Jnq.d.ts → client-B1PjSTav.d.ts} +1 -1
- package/dist/{client-BSe721CI.d.cts → client-ijtYioVl.d.cts} +1 -1
- package/dist/core/index.cjs +53 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +53 -1
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +53 -1
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +2 -2
- package/dist/data/index.d.ts +2 -2
- package/dist/data/index.js +53 -1
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-B6ps9KX8.d.cts → declareTable-BE423RBb.d.cts} +1 -1
- package/dist/{declareTable-C_ZguQb4.d.ts → declareTable-W3aD-9fQ.d.ts} +1 -1
- package/dist/{doors-DEvCdeYB.d.cts → doors-Bopr9YVf.d.cts} +52 -5
- package/dist/{doors-DnHM_tkC.d.ts → doors-DfHUqP7j.d.ts} +52 -5
- package/dist/questions/index.d.cts +2 -2
- package/dist/questions/index.d.ts +2 -2
- package/dist/react/index.cjs +53 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +32 -4
- package/dist/react/index.d.ts +32 -4
- package/dist/react/index.js +53 -1
- package/dist/react/index.js.map +1 -1
- package/dist/scopes/index.cjs +53 -1
- package/dist/scopes/index.cjs.map +1 -1
- package/dist/scopes/index.d.cts +2 -2
- package/dist/scopes/index.d.ts +2 -2
- package/dist/scopes/index.js +53 -1
- package/dist/scopes/index.js.map +1 -1
- package/dist/setup/index.cjs +53 -1
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +2 -2
- package/dist/setup/index.d.ts +2 -2
- package/dist/setup/index.js +53 -1
- package/dist/setup/index.js.map +1 -1
- package/dist/typed-table/index.cjs +53 -1
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +3 -3
- package/dist/typed-table/index.d.ts +3 -3
- package/dist/typed-table/index.js +53 -1
- package/dist/typed-table/index.js.map +1 -1
- package/dist/views/index.d.cts +2 -2
- package/dist/views/index.d.ts +2 -2
- package/package.json +2 -2
package/dist/setup/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RealtimeManager } from '@ai-matrx/realtime';
|
|
2
|
-
import { R as RecordsClient } from '../client-
|
|
2
|
+
import { R as RecordsClient } from '../client-ijtYioVl.cjs';
|
|
3
3
|
import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-DrDY9rfs.cjs';
|
|
4
4
|
import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-DBwPkUBC.cjs';
|
|
5
5
|
import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-DBxW-a61.cjs';
|
|
@@ -10,7 +10,7 @@ import '../field-CSNfZsJ3.cjs';
|
|
|
10
10
|
import '../subscription-D5IcSqMw.cjs';
|
|
11
11
|
import '../rule-DE3biaSw.cjs';
|
|
12
12
|
import '../relation-C5H3GUUP.cjs';
|
|
13
|
-
import '../doors-
|
|
13
|
+
import '../doors-Bopr9YVf.cjs';
|
|
14
14
|
import '../portal-ByiRZGqc.cjs';
|
|
15
15
|
import '../types-SOXLHL0A.cjs';
|
|
16
16
|
|
package/dist/setup/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RealtimeManager } from '@ai-matrx/realtime';
|
|
2
|
-
import { R as RecordsClient } from '../client-
|
|
2
|
+
import { R as RecordsClient } from '../client-B1PjSTav.js';
|
|
3
3
|
import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-Dm99a1bL.js';
|
|
4
4
|
import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-e1VgfCsX.js';
|
|
5
5
|
import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-DCX-WDVh.js';
|
|
@@ -10,7 +10,7 @@ import '../field-Do135FdJ.js';
|
|
|
10
10
|
import '../subscription-Cu6aMX6f.js';
|
|
11
11
|
import '../rule-Bn3E-ZLl.js';
|
|
12
12
|
import '../relation-yYaW32bf.js';
|
|
13
|
-
import '../doors-
|
|
13
|
+
import '../doors-DfHUqP7j.js';
|
|
14
14
|
import '../portal-B_H6TEj2.js';
|
|
15
15
|
import '../types-CX2kXEX_.js';
|
|
16
16
|
|
package/dist/setup/index.js
CHANGED
|
@@ -418,6 +418,9 @@ function createOpLedger() {
|
|
|
418
418
|
}
|
|
419
419
|
var defaultOpLedger = ledgerOver(globalSlot2("ai-matrx.records.op-ledger", () => /* @__PURE__ */ new Map()));
|
|
420
420
|
|
|
421
|
+
// src/scopes/types.ts
|
|
422
|
+
var SYSTEM_CONTEXT_TYPE_ID = "__system__";
|
|
423
|
+
|
|
421
424
|
// src/scopes/codec.ts
|
|
422
425
|
var str = (v, fallback = "") => typeof v === "string" ? v : fallback;
|
|
423
426
|
var strOrNull = (v) => typeof v === "string" ? v : null;
|
|
@@ -589,6 +592,51 @@ var SENSITIVITY_TO_DOOR = {
|
|
|
589
592
|
confidential: "restricted",
|
|
590
593
|
restricted: "privileged"
|
|
591
594
|
};
|
|
595
|
+
var SENSITIVITY_FROM_DOOR = {
|
|
596
|
+
public: "public",
|
|
597
|
+
internal: "internal",
|
|
598
|
+
restricted: "confidential",
|
|
599
|
+
privileged: "restricted"
|
|
600
|
+
};
|
|
601
|
+
function systemContextFieldFromStore(row, index) {
|
|
602
|
+
const key = str(row.key);
|
|
603
|
+
const kind = str(row.value_type, "string");
|
|
604
|
+
return {
|
|
605
|
+
id: str(row.id),
|
|
606
|
+
scope_type_id: SYSTEM_CONTEXT_TYPE_ID,
|
|
607
|
+
organization_id: "",
|
|
608
|
+
key,
|
|
609
|
+
label: str(row.display_name, key),
|
|
610
|
+
description: str(row.description),
|
|
611
|
+
kind: KINDS.has(kind) ? kind : "string",
|
|
612
|
+
type: "system",
|
|
613
|
+
multi: kind === "array",
|
|
614
|
+
format: null,
|
|
615
|
+
config: {},
|
|
616
|
+
relation_target: null,
|
|
617
|
+
sort: typeof row.sort_order === "number" ? row.sort_order : index,
|
|
618
|
+
context_policy: "include",
|
|
619
|
+
// The system table keeps the old sensitivity words (`restricted`/`privileged`), like the write doors.
|
|
620
|
+
sensitivity: SENSITIVITY_FROM_DOOR[str(row.sensitivity)] ?? "public",
|
|
621
|
+
source: "system",
|
|
622
|
+
status: "active",
|
|
623
|
+
status_note: null,
|
|
624
|
+
category: null,
|
|
625
|
+
tags: [],
|
|
626
|
+
max_items: 0,
|
|
627
|
+
custom_component: null,
|
|
628
|
+
reference_source: null,
|
|
629
|
+
allowed_scope_type_ids: null,
|
|
630
|
+
allowed_reference_types: null,
|
|
631
|
+
review_interval_days: null,
|
|
632
|
+
depends_on: [],
|
|
633
|
+
version: 0,
|
|
634
|
+
created_by: null,
|
|
635
|
+
created_at: "",
|
|
636
|
+
updated_at: "",
|
|
637
|
+
item_class: strOrNull(row.item_class)
|
|
638
|
+
};
|
|
639
|
+
}
|
|
592
640
|
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
593
641
|
function referencesOf(row) {
|
|
594
642
|
const v = row.value;
|
|
@@ -923,7 +971,11 @@ function createScopeDoors(call) {
|
|
|
923
971
|
},
|
|
924
972
|
async systemItems() {
|
|
925
973
|
const res = await call("context_system_items", {}, "scopes.systemItems");
|
|
926
|
-
return res.ok ? { ok: true, data: res.data ?? [] } : res;
|
|
974
|
+
return res.ok ? { ok: true, data: (res.data ?? []).map(systemContextFieldFromStore) } : res;
|
|
975
|
+
},
|
|
976
|
+
async tableTemplates(organizationId) {
|
|
977
|
+
const res = await call("table_templates", { p_org_id: organizationId }, "scopes.tableTemplates");
|
|
978
|
+
return res.ok ? { ok: true, data: Array.isArray(res.data) ? res.data : [] } : res;
|
|
927
979
|
},
|
|
928
980
|
async templates() {
|
|
929
981
|
const res = await call("context_templates", {}, "scopes.templates");
|