@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/dist/react/index.d.cts
CHANGED
|
@@ -3022,6 +3022,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
3022
3022
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
3023
3023
|
readonly returns: "jsonb";
|
|
3024
3024
|
readonly security: "definer";
|
|
3025
|
+
}, {
|
|
3026
|
+
readonly name: "table_facts";
|
|
3027
|
+
readonly args: "p_organization_id uuid";
|
|
3028
|
+
readonly returns: "TABLE(table_id uuid, visibility text, mine boolean)";
|
|
3029
|
+
readonly security: "definer";
|
|
3025
3030
|
}, {
|
|
3026
3031
|
readonly name: "table_from_example";
|
|
3027
3032
|
readonly args: "p_organization_id uuid, p_home_id uuid, p_example jsonb";
|
package/dist/react/index.d.ts
CHANGED
|
@@ -3022,6 +3022,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
3022
3022
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
3023
3023
|
readonly returns: "jsonb";
|
|
3024
3024
|
readonly security: "definer";
|
|
3025
|
+
}, {
|
|
3026
|
+
readonly name: "table_facts";
|
|
3027
|
+
readonly args: "p_organization_id uuid";
|
|
3028
|
+
readonly returns: "TABLE(table_id uuid, visibility text, mine boolean)";
|
|
3029
|
+
readonly security: "definer";
|
|
3025
3030
|
}, {
|
|
3026
3031
|
readonly name: "table_from_example";
|
|
3027
3032
|
readonly args: "p_organization_id uuid, p_home_id uuid, p_example jsonb";
|
package/dist/react/index.js
CHANGED
|
@@ -3024,6 +3024,7 @@ var STORE_DOORS = [
|
|
|
3024
3024
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
3025
3025
|
{ 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" },
|
|
3026
3026
|
{ name: "table_decorations", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
3027
|
+
{ name: "table_facts", args: "p_organization_id uuid", returns: "TABLE(table_id uuid, visibility text, mine boolean)", security: "definer" },
|
|
3027
3028
|
{ name: "table_from_example", args: "p_organization_id uuid, p_home_id uuid, p_example jsonb", returns: "jsonb", security: "definer" },
|
|
3028
3029
|
{ name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
3029
3030
|
{ name: "table_is_live", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
@@ -4519,6 +4520,7 @@ var DOORS = {
|
|
|
4519
4520
|
// everywhere in that organization. This is the one question the rail has to
|
|
4520
4521
|
// ask, under the same wall and visibility gate as `portals` itself.
|
|
4521
4522
|
portalTables: "portal_tables",
|
|
4523
|
+
tableFacts: "table_facts",
|
|
4522
4524
|
portalCard: "portal_card",
|
|
4523
4525
|
portalDeclare: "portal_declare",
|
|
4524
4526
|
portalInvite: "portal_invite",
|
|
@@ -5326,6 +5328,23 @@ function createRecordsClient(config) {
|
|
|
5326
5328
|
const { document } = unfold(row.document);
|
|
5327
5329
|
return { ...document, id: row.id, organization_id: org };
|
|
5328
5330
|
});
|
|
5331
|
+
if (doorExists(DOORS.tableFacts)) {
|
|
5332
|
+
const facts = await callDoor(
|
|
5333
|
+
DOORS.tableFacts,
|
|
5334
|
+
{ p_organization_id: org },
|
|
5335
|
+
"tableList.facts"
|
|
5336
|
+
);
|
|
5337
|
+
if (facts.ok) {
|
|
5338
|
+
const byId = new Map((facts.data ?? []).map((f) => [f.table_id, f]));
|
|
5339
|
+
const me = config.actor.user_id ?? null;
|
|
5340
|
+
for (const table of tables) {
|
|
5341
|
+
const fact = byId.get(table.id);
|
|
5342
|
+
if (!fact) continue;
|
|
5343
|
+
table.visibility = fact.visibility;
|
|
5344
|
+
if (fact.mine && me) table.created_by = me;
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
}
|
|
5329
5348
|
tables.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
|
|
5330
5349
|
return ok(tables);
|
|
5331
5350
|
},
|