@ai-matrx/records 0.57.1 → 0.57.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 +11 -0
- package/dist/core/index.cjs +19 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +3 -2
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +19 -0
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +19 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +5 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +19 -0
- package/dist/react/index.js.map +1 -1
- package/dist/{types-Bsamaf-a.d.cts → types-BpBSMhYq.d.cts} +5 -0
- package/dist/{types-Bsamaf-a.d.ts → types-BpBSMhYq.d.ts} +5 -0
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.57.2 (unpublished — lane HUB-FIX, 2026-09-23; `custom.table_facts` is live on the main database, ledger 2026-09-23 11:51Z, and `STORE_DOORS` is regenerated to carry it)
|
|
4
|
+
|
|
5
|
+
* `tableList()` folds `custom.table_facts` onto every Table: `visibility` (a record column the
|
|
6
|
+
Table document never carried, so every lane decision fell through to its default) and
|
|
7
|
+
`created_by` — set ONLY to the caller's own id and only on Tables the caller made. The call is
|
|
8
|
+
made only when `STORE_DOORS` carries the door (the door-presence pattern): a build generated
|
|
9
|
+
without it asks nothing and returns the Tables exactly as before. (The code landed inside 0.57.1's commit `7f2a737913` by a sweep; this
|
|
10
|
+
entry is its record.) Test `__tests__/table-list-facts.test.ts`.
|
|
11
|
+
* New `tableArchived({ table_id })`: the archived row for one Table, or `null` — paged over the
|
|
12
|
+
Table kernel's archive, the same door a table's own archive uses.
|
|
13
|
+
|
|
3
14
|
## 0.57.1 (unpublished — lane RECORDS-UI-FIX, guide re-walk 2026-09-23)
|
|
4
15
|
|
|
5
16
|
* **A refusal is not an app error.** The default error sink printed every refusal through
|
package/dist/core/index.cjs
CHANGED
|
@@ -3823,6 +3823,7 @@ var STORE_DOORS = [
|
|
|
3823
3823
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
3824
3824
|
{ name: "table_decorate", args: "p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "definer" },
|
|
3825
3825
|
{ name: "table_decorations", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
3826
|
+
{ name: "table_facts", args: "p_organization_id uuid", returns: "TABLE(table_id uuid, visibility text, mine boolean)", security: "definer" },
|
|
3826
3827
|
{ name: "table_from_example", args: "p_organization_id uuid, p_home_id uuid, p_example jsonb", returns: "jsonb", security: "definer" },
|
|
3827
3828
|
{ name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
3828
3829
|
{ name: "table_is_live", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
@@ -5323,6 +5324,7 @@ var DOORS = {
|
|
|
5323
5324
|
// everywhere in that organization. This is the one question the rail has to
|
|
5324
5325
|
// ask, under the same wall and visibility gate as `portals` itself.
|
|
5325
5326
|
portalTables: "portal_tables",
|
|
5327
|
+
tableFacts: "table_facts",
|
|
5326
5328
|
portalCard: "portal_card",
|
|
5327
5329
|
portalDeclare: "portal_declare",
|
|
5328
5330
|
portalInvite: "portal_invite",
|
|
@@ -6138,6 +6140,23 @@ function createRecordsClient(config) {
|
|
|
6138
6140
|
const { document } = unfold(row.document);
|
|
6139
6141
|
return { ...document, id: row.id, organization_id: org };
|
|
6140
6142
|
});
|
|
6143
|
+
if (doorExists(DOORS.tableFacts)) {
|
|
6144
|
+
const facts = await callDoor(
|
|
6145
|
+
DOORS.tableFacts,
|
|
6146
|
+
{ p_organization_id: org },
|
|
6147
|
+
"tableList.facts"
|
|
6148
|
+
);
|
|
6149
|
+
if (facts.ok) {
|
|
6150
|
+
const byId = new Map((facts.data ?? []).map((f) => [f.table_id, f]));
|
|
6151
|
+
const me = config.actor.user_id ?? null;
|
|
6152
|
+
for (const table of tables) {
|
|
6153
|
+
const fact = byId.get(table.id);
|
|
6154
|
+
if (!fact) continue;
|
|
6155
|
+
table.visibility = fact.visibility;
|
|
6156
|
+
if (fact.mine && me) table.created_by = me;
|
|
6157
|
+
}
|
|
6158
|
+
}
|
|
6159
|
+
}
|
|
6141
6160
|
tables.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
|
|
6142
6161
|
return ok(tables);
|
|
6143
6162
|
},
|