@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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NewFieldSpec } from '../declareTable-
|
|
1
|
+
import { N as NewFieldSpec } from '../declareTable-BE423RBb.cjs';
|
|
2
2
|
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-fC6s1Xc8.cjs';
|
|
3
|
-
import { R as RecordsClient } from '../client-
|
|
3
|
+
import { R as RecordsClient } from '../client-ijtYioVl.cjs';
|
|
4
4
|
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-CzaNpjv1.cjs';
|
|
5
5
|
import '../field-CSNfZsJ3.cjs';
|
|
6
6
|
import '../subscription-D5IcSqMw.cjs';
|
|
7
7
|
import '../rule-DE3biaSw.cjs';
|
|
8
8
|
import '../relation-C5H3GUUP.cjs';
|
|
9
9
|
import '../ports-DBxW-a61.cjs';
|
|
10
|
-
import '../doors-
|
|
10
|
+
import '../doors-Bopr9YVf.cjs';
|
|
11
11
|
import '../portal-ByiRZGqc.cjs';
|
|
12
12
|
|
|
13
13
|
/** Where a declared field's value goes in the graduated table. */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NewFieldSpec } from '../declareTable-
|
|
1
|
+
import { N as NewFieldSpec } from '../declareTable-W3aD-9fQ.js';
|
|
2
2
|
import { U as Uuid, R as RecordsResult, r as RecordPageSort } from '../record-fC6s1Xc8.js';
|
|
3
|
-
import { R as RecordsClient } from '../client-
|
|
3
|
+
import { R as RecordsClient } from '../client-B1PjSTav.js';
|
|
4
4
|
import { F as FieldDrift, T as TableArchiveProgress } from '../table-kind-DT5EYraJ.js';
|
|
5
5
|
import '../field-Do135FdJ.js';
|
|
6
6
|
import '../subscription-Cu6aMX6f.js';
|
|
7
7
|
import '../rule-Bn3E-ZLl.js';
|
|
8
8
|
import '../relation-yYaW32bf.js';
|
|
9
9
|
import '../ports-DCX-WDVh.js';
|
|
10
|
-
import '../doors-
|
|
10
|
+
import '../doors-DfHUqP7j.js';
|
|
11
11
|
import '../portal-B_H6TEj2.js';
|
|
12
12
|
|
|
13
13
|
/** Where a declared field's value goes in the graduated table. */
|
|
@@ -801,6 +801,9 @@ function ledgerOver(ours) {
|
|
|
801
801
|
}
|
|
802
802
|
var defaultOpLedger = ledgerOver(globalSlot2("ai-matrx.records.op-ledger", () => /* @__PURE__ */ new Map()));
|
|
803
803
|
|
|
804
|
+
// src/scopes/types.ts
|
|
805
|
+
var SYSTEM_CONTEXT_TYPE_ID = "__system__";
|
|
806
|
+
|
|
804
807
|
// src/scopes/codec.ts
|
|
805
808
|
var str = (v, fallback = "") => typeof v === "string" ? v : fallback;
|
|
806
809
|
var strOrNull = (v) => typeof v === "string" ? v : null;
|
|
@@ -972,6 +975,51 @@ var SENSITIVITY_TO_DOOR = {
|
|
|
972
975
|
confidential: "restricted",
|
|
973
976
|
restricted: "privileged"
|
|
974
977
|
};
|
|
978
|
+
var SENSITIVITY_FROM_DOOR = {
|
|
979
|
+
public: "public",
|
|
980
|
+
internal: "internal",
|
|
981
|
+
restricted: "confidential",
|
|
982
|
+
privileged: "restricted"
|
|
983
|
+
};
|
|
984
|
+
function systemContextFieldFromStore(row, index) {
|
|
985
|
+
const key = str(row.key);
|
|
986
|
+
const kind = str(row.value_type, "string");
|
|
987
|
+
return {
|
|
988
|
+
id: str(row.id),
|
|
989
|
+
scope_type_id: SYSTEM_CONTEXT_TYPE_ID,
|
|
990
|
+
organization_id: "",
|
|
991
|
+
key,
|
|
992
|
+
label: str(row.display_name, key),
|
|
993
|
+
description: str(row.description),
|
|
994
|
+
kind: KINDS.has(kind) ? kind : "string",
|
|
995
|
+
type: "system",
|
|
996
|
+
multi: kind === "array",
|
|
997
|
+
format: null,
|
|
998
|
+
config: {},
|
|
999
|
+
relation_target: null,
|
|
1000
|
+
sort: typeof row.sort_order === "number" ? row.sort_order : index,
|
|
1001
|
+
context_policy: "include",
|
|
1002
|
+
// The system table keeps the old sensitivity words (`restricted`/`privileged`), like the write doors.
|
|
1003
|
+
sensitivity: SENSITIVITY_FROM_DOOR[str(row.sensitivity)] ?? "public",
|
|
1004
|
+
source: "system",
|
|
1005
|
+
status: "active",
|
|
1006
|
+
status_note: null,
|
|
1007
|
+
category: null,
|
|
1008
|
+
tags: [],
|
|
1009
|
+
max_items: 0,
|
|
1010
|
+
custom_component: null,
|
|
1011
|
+
reference_source: null,
|
|
1012
|
+
allowed_scope_type_ids: null,
|
|
1013
|
+
allowed_reference_types: null,
|
|
1014
|
+
review_interval_days: null,
|
|
1015
|
+
depends_on: [],
|
|
1016
|
+
version: 0,
|
|
1017
|
+
created_by: null,
|
|
1018
|
+
created_at: "",
|
|
1019
|
+
updated_at: "",
|
|
1020
|
+
item_class: strOrNull(row.item_class)
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
975
1023
|
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
976
1024
|
function referencesOf(row) {
|
|
977
1025
|
const v = row.value;
|
|
@@ -1306,7 +1354,11 @@ function createScopeDoors(call) {
|
|
|
1306
1354
|
},
|
|
1307
1355
|
async systemItems() {
|
|
1308
1356
|
const res = await call("context_system_items", {}, "scopes.systemItems");
|
|
1309
|
-
return res.ok ? { ok: true, data: res.data ?? [] } : res;
|
|
1357
|
+
return res.ok ? { ok: true, data: (res.data ?? []).map(systemContextFieldFromStore) } : res;
|
|
1358
|
+
},
|
|
1359
|
+
async tableTemplates(organizationId) {
|
|
1360
|
+
const res = await call("table_templates", { p_org_id: organizationId }, "scopes.tableTemplates");
|
|
1361
|
+
return res.ok ? { ok: true, data: Array.isArray(res.data) ? res.data : [] } : res;
|
|
1310
1362
|
},
|
|
1311
1363
|
async templates() {
|
|
1312
1364
|
const res = await call("context_templates", {}, "scopes.templates");
|