@ai-matrx/records 0.99.28 → 0.99.29

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{client-B7LYr-aE.d.cts → client-B7KEs9hi.d.cts} +10 -0
  3. package/dist/{client-m4soDpHA.d.ts → client-Dthx26hr.d.ts} +10 -0
  4. package/dist/core/index.cjs +76 -10
  5. package/dist/core/index.cjs.map +1 -1
  6. package/dist/core/index.d.cts +3 -3
  7. package/dist/core/index.d.ts +3 -3
  8. package/dist/core/index.js +76 -10
  9. package/dist/core/index.js.map +1 -1
  10. package/dist/data/index.cjs +12 -1
  11. package/dist/data/index.cjs.map +1 -1
  12. package/dist/data/index.d.cts +1 -1
  13. package/dist/data/index.d.ts +1 -1
  14. package/dist/data/index.js +12 -1
  15. package/dist/data/index.js.map +1 -1
  16. package/dist/{declareTable-D5Zs-SjU.d.ts → declareTable-CvBu5dTJ.d.ts} +1 -1
  17. package/dist/{declareTable-Bnrzv-Bg.d.cts → declareTable-enQs2N0E.d.cts} +1 -1
  18. package/dist/first-page/index.d.cts +2 -0
  19. package/dist/first-page/index.d.ts +2 -0
  20. package/dist/index.cjs +64 -9
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +29 -3
  23. package/dist/index.d.ts +29 -3
  24. package/dist/index.js +64 -9
  25. package/dist/index.js.map +1 -1
  26. package/dist/questions/index.d.cts +1 -1
  27. package/dist/questions/index.d.ts +1 -1
  28. package/dist/react/index.cjs +78 -12
  29. package/dist/react/index.cjs.map +1 -1
  30. package/dist/react/index.d.cts +37 -1
  31. package/dist/react/index.d.ts +37 -1
  32. package/dist/react/index.js +78 -12
  33. package/dist/react/index.js.map +1 -1
  34. package/dist/setup/index.cjs +12 -1
  35. package/dist/setup/index.cjs.map +1 -1
  36. package/dist/setup/index.d.cts +1 -1
  37. package/dist/setup/index.d.ts +1 -1
  38. package/dist/setup/index.js +12 -1
  39. package/dist/setup/index.js.map +1 -1
  40. package/dist/typed-table/index.cjs +12 -1
  41. package/dist/typed-table/index.cjs.map +1 -1
  42. package/dist/typed-table/index.d.cts +2 -2
  43. package/dist/typed-table/index.d.ts +2 -2
  44. package/dist/typed-table/index.js +12 -1
  45. package/dist/typed-table/index.js.map +1 -1
  46. package/dist/views/index.d.cts +1 -1
  47. package/dist/views/index.d.ts +1 -1
  48. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { C as Column, Q as Query, A as AliasBinding, H as HostDataPort } from '../types-C4XCuv8O.cjs';
2
2
  export { a as AnyAlias, b as CUSTOM_ROW_TOKEN, D as DataEvents, c as DataPort, d as DataPortEventName, e as DataSource, E as EntityAlias, f as EntityRef, L as Lane, P as Page, R as Row, g as RowsEvent, T as TableAlias, V as Values, W as WhereClause, h as WhereOp } from '../types-C4XCuv8O.cjs';
3
- import { R as RecordsClient } from '../client-B7LYr-aE.cjs';
3
+ import { R as RecordsClient } from '../client-B7KEs9hi.cjs';
4
4
  import { F as Field } from '../field-ppX29ddi.cjs';
5
5
  import { U as Uuid, R as RecordsResult, k as RecordPageSort, l as ReadRow } from '../record-C8q21jjB.cjs';
6
6
  import { R as RuleExpression } from '../rule-BQwUtKk5.cjs';
@@ -1,6 +1,6 @@
1
1
  import { C as Column, Q as Query, A as AliasBinding, H as HostDataPort } from '../types-CrkzINrb.js';
2
2
  export { a as AnyAlias, b as CUSTOM_ROW_TOKEN, D as DataEvents, c as DataPort, d as DataPortEventName, e as DataSource, E as EntityAlias, f as EntityRef, L as Lane, P as Page, R as Row, g as RowsEvent, T as TableAlias, V as Values, W as WhereClause, h as WhereOp } from '../types-CrkzINrb.js';
3
- import { R as RecordsClient } from '../client-m4soDpHA.js';
3
+ import { R as RecordsClient } from '../client-Dthx26hr.js';
4
4
  import { F as Field } from '../field-BHlhq24W.js';
5
5
  import { U as Uuid, R as RecordsResult, k as RecordPageSort, l as ReadRow } from '../record-C8q21jjB.js';
6
6
  import { R as RuleExpression } from '../rule-cGqclk_0.js';
@@ -3986,6 +3986,15 @@ function createRecordsClient(given) {
3986
3986
  }
3987
3987
  return result;
3988
3988
  },
3989
+ async recordReparent({ record_id, parent_id }) {
3990
+ const result = await callDoor(
3991
+ DOORS.recordReparent,
3992
+ { p_organization_id: org, p_record_id: record_id, p_parent_id: parent_id },
3993
+ "recordReparent"
3994
+ );
3995
+ if (result.ok) announceRecordChanged(record_id);
3996
+ return result;
3997
+ },
3989
3998
  async recordRestore({ record_id }) {
3990
3999
  const result = await callDoor(
3991
4000
  DOORS.recordRestore,
@@ -4533,7 +4542,9 @@ function createRecordsClient(given) {
4533
4542
  }
4534
4543
  const tables = read.map((row) => {
4535
4544
  const { document } = unfold(row.document);
4536
- return { ...document, id: row.id, organization_id: org };
4545
+ const doc = document;
4546
+ const home = typeof doc.home_id === "string" ? doc.home_id : typeof doc.parent_id === "string" ? doc.parent_id : null;
4547
+ return { ...doc, home_id: home, id: row.id, organization_id: org };
4537
4548
  });
4538
4549
  tables.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
4539
4550
  return ok(tables);