@ai-matrx/records 0.57.2 → 0.57.3

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.
@@ -5284,6 +5284,10 @@ function createRecordsClient(config) {
5284
5284
  })
5285
5285
  );
5286
5286
  },
5287
+ async tableFacts() {
5288
+ if (!doorExists(DOORS.tableFacts)) return ok(null);
5289
+ return callDoor(DOORS.tableFacts, { p_organization_id: org }, "tableFacts");
5290
+ },
5287
5291
  async tableArchived({ table_id }) {
5288
5292
  const kernel = await callDoor(DOORS.tableKernelId, {}, "tableArchived.kernel");
5289
5293
  if (!kernel.ok) return err(kernel.error);
@@ -5467,23 +5471,6 @@ function createRecordsClient(config) {
5467
5471
  const { document } = unfold(row.document);
5468
5472
  return { ...document, id: row.id, organization_id: org };
5469
5473
  });
5470
- if (doorExists(DOORS.tableFacts)) {
5471
- const facts = await callDoor(
5472
- DOORS.tableFacts,
5473
- { p_organization_id: org },
5474
- "tableList.facts"
5475
- );
5476
- if (facts.ok) {
5477
- const byId = new Map((facts.data ?? []).map((f) => [f.table_id, f]));
5478
- const me = config.actor.user_id ?? null;
5479
- for (const table of tables) {
5480
- const fact = byId.get(table.id);
5481
- if (!fact) continue;
5482
- table.visibility = fact.visibility;
5483
- if (fact.mine && me) table.created_by = me;
5484
- }
5485
- }
5486
- }
5487
5474
  tables.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
5488
5475
  return ok(tables);
5489
5476
  },