@ai-matrx/records 0.78.1 → 0.79.1

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 (70) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/app-table/index.cjs +12 -0
  3. package/dist/app-table/index.cjs.map +1 -1
  4. package/dist/app-table/index.d.cts +7 -7
  5. package/dist/app-table/index.d.ts +7 -7
  6. package/dist/app-table/index.js +12 -0
  7. package/dist/app-table/index.js.map +1 -1
  8. package/dist/{client-Byn_UthM.d.ts → client-BcVOYKL1.d.ts} +15 -5
  9. package/dist/{client-BExNR0TK.d.cts → client-DHoI0qvP.d.cts} +15 -5
  10. package/dist/core/index.cjs +17 -3
  11. package/dist/core/index.cjs.map +1 -1
  12. package/dist/core/index.d.cts +12 -11
  13. package/dist/core/index.d.ts +12 -11
  14. package/dist/core/index.js +17 -3
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/data/index.cjs +12 -0
  17. package/dist/data/index.cjs.map +1 -1
  18. package/dist/data/index.d.cts +6 -6
  19. package/dist/data/index.d.ts +6 -6
  20. package/dist/data/index.js +12 -0
  21. package/dist/data/index.js.map +1 -1
  22. package/dist/{declareTable-DWOh53eK.d.ts → declareTable-CDKHwyrF.d.ts} +4 -4
  23. package/dist/{declareTable-CgrEusy8.d.cts → declareTable-DM9mPkSc.d.cts} +4 -4
  24. package/dist/{field-t9aefszx.d.cts → field-DCXU6k9i.d.cts} +14 -2
  25. package/dist/{field-B2bvpqcE.d.ts → field-DJAvDExi.d.ts} +14 -2
  26. package/dist/index.cjs +8 -3
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +7 -7
  29. package/dist/index.d.ts +7 -7
  30. package/dist/index.js +8 -3
  31. package/dist/index.js.map +1 -1
  32. package/dist/memory/index.cjs +3 -0
  33. package/dist/memory/index.cjs.map +1 -1
  34. package/dist/memory/index.d.cts +6 -6
  35. package/dist/memory/index.d.ts +6 -6
  36. package/dist/memory/index.js +3 -0
  37. package/dist/memory/index.js.map +1 -1
  38. package/dist/{ports-Cjl-IjFa.d.cts → ports-DaHUjVg7.d.cts} +1 -1
  39. package/dist/{ports-Ch4Ym0tj.d.ts → ports-Kpc-RihV.d.ts} +1 -1
  40. package/dist/react/index.cjs +17 -3
  41. package/dist/react/index.cjs.map +1 -1
  42. package/dist/react/index.d.cts +62 -5
  43. package/dist/react/index.d.ts +62 -5
  44. package/dist/react/index.js +17 -3
  45. package/dist/react/index.js.map +1 -1
  46. package/dist/realtime/index.d.cts +2 -2
  47. package/dist/realtime/index.d.ts +2 -2
  48. package/dist/{record-Ba1F1CNS.d.cts → record-DCaOJbhA.d.cts} +19 -4
  49. package/dist/{record-Ba1F1CNS.d.ts → record-DCaOJbhA.d.ts} +19 -4
  50. package/dist/{subscription-CccP6N93.d.ts → subscription-B9znK2dw.d.ts} +1 -1
  51. package/dist/{subscription-DGCrwwSR.d.cts → subscription-C_hNjbaR.d.cts} +1 -1
  52. package/dist/{table-kind-BMWi8G37.d.ts → table-kind-Ct-nhoCZ.d.ts} +24 -4
  53. package/dist/{table-kind-BoelIMjr.d.cts → table-kind-wYO_qjK1.d.cts} +24 -4
  54. package/dist/templates/index.cjs +3 -0
  55. package/dist/templates/index.cjs.map +1 -1
  56. package/dist/templates/index.d.cts +9 -9
  57. package/dist/templates/index.d.ts +9 -9
  58. package/dist/templates/index.js +3 -0
  59. package/dist/templates/index.js.map +1 -1
  60. package/dist/{types-euaQwxnB.d.cts → types-CD2HoaZt.d.cts} +2 -2
  61. package/dist/{types-CtyMwJvy.d.ts → types-CHEFgCu1.d.ts} +2 -2
  62. package/dist/{types-D-Mhiodh.d.cts → types-DuyBN2im.d.cts} +2 -2
  63. package/dist/{types-CiHdoATO.d.ts → types-b-VGi15H.d.ts} +2 -2
  64. package/dist/use-cases/index.cjs.map +1 -1
  65. package/dist/use-cases/index.d.cts +5 -5
  66. package/dist/use-cases/index.d.ts +5 -5
  67. package/dist/use-cases/index.js.map +1 -1
  68. package/dist/{validate-B-p3YPgA.d.ts → validate-BEfYwBpA.d.ts} +1 -1
  69. package/dist/{validate-COvMcv8z.d.cts → validate-CubFFxpu.d.cts} +1 -1
  70. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
- import { bK as EntityRefWithWords } from '../table-kind-BoelIMjr.cjs';
2
- import { U as Uuid, h as RecordsResult, n as RecordPageSort, m as ReadRow } from '../record-Ba1F1CNS.cjs';
3
- import { R as RecordsClient } from '../client-BExNR0TK.cjs';
4
- import { b as Field } from '../field-t9aefszx.cjs';
5
- import { u as RuleExpression } from '../subscription-DGCrwwSR.cjs';
6
- import '../ports-Cjl-IjFa.cjs';
1
+ import { bK as EntityRefWithWords } from '../table-kind-wYO_qjK1.cjs';
2
+ import { U as Uuid, h as RecordsResult, n as RecordPageSort, m as ReadRow } from '../record-DCaOJbhA.cjs';
3
+ import { R as RecordsClient } from '../client-DHoI0qvP.cjs';
4
+ import { b as Field } from '../field-DCXU6k9i.cjs';
5
+ import { u as RuleExpression } from '../subscription-C_hNjbaR.cjs';
6
+ import '../ports-DaHUjVg7.cjs';
7
7
 
8
8
  /** §0. A link to any thing: `{token, id, label}`. A custom row's token is `record`. Every link reads as `EntityRef[]`. */
9
9
  type EntityRef = EntityRefWithWords;
@@ -1,9 +1,9 @@
1
- import { bK as EntityRefWithWords } from '../table-kind-BMWi8G37.js';
2
- import { U as Uuid, h as RecordsResult, n as RecordPageSort, m as ReadRow } from '../record-Ba1F1CNS.js';
3
- import { R as RecordsClient } from '../client-Byn_UthM.js';
4
- import { b as Field } from '../field-B2bvpqcE.js';
5
- import { u as RuleExpression } from '../subscription-CccP6N93.js';
6
- import '../ports-Ch4Ym0tj.js';
1
+ import { bK as EntityRefWithWords } from '../table-kind-Ct-nhoCZ.js';
2
+ import { U as Uuid, h as RecordsResult, n as RecordPageSort, m as ReadRow } from '../record-DCaOJbhA.js';
3
+ import { R as RecordsClient } from '../client-BcVOYKL1.js';
4
+ import { b as Field } from '../field-DJAvDExi.js';
5
+ import { u as RuleExpression } from '../subscription-B9znK2dw.js';
6
+ import '../ports-Kpc-RihV.js';
7
7
 
8
8
  /** §0. A link to any thing: `{token, id, label}`. A custom row's token is `record`. Every link reads as `EntityRef[]`. */
9
9
  type EntityRef = EntityRefWithWords;
@@ -963,6 +963,7 @@ var STORE_DOORS = [
963
963
  { name: "doors_refusing_in_another_doors_name", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
964
964
  { name: "drill_resolve", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb, p_measures jsonb, p_bucket jsonb", returns: "jsonb", security: "invoker" },
965
965
  { name: "effective_level", args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text", returns: "permission_level", security: "definer" },
966
+ { name: "effective_level_many", args: "p_user_id uuid, p_ids uuid[], p_type text DEFAULT 'record'::text", returns: "TABLE(id uuid, level permission_level)", security: "definer" },
966
967
  { name: "enrich_cells", args: "p_organization_id uuid, p_table_id uuid, p_field_keys text[] DEFAULT NULL::text[], p_record_ids uuid[] DEFAULT NULL::uuid[]", returns: "TABLE(record_id uuid, field_key text, agent_owned boolean, value jsonb, value_version integer, actor text, on_behalf_of text, written_at timestamp with time zone, source jsonb, absent_reason text, alternates jsonb, pinned boolean, stale boolean, due_at timestamp with time zone)", security: "definer" },
967
968
  { name: "enrich_declare", args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
968
969
  { name: "enrich_due", args: "p_organization_id uuid, p_field_id uuid, p_limit integer DEFAULT 50, p_include_fresh boolean DEFAULT false, p_record_ids uuid[] DEFAULT NULL::uuid[]", returns: "TABLE(record_id uuid, title text, inputs jsonb, current_value jsonb, written_at timestamp with time zone, reason text, trimmed_to integer)", security: "definer" },
@@ -1018,6 +1019,7 @@ var STORE_DOORS = [
1018
1019
  { name: "field_cycle", args: "p_organization_id uuid, p_field_data jsonb, p_self uuid", returns: "text[]", security: "definer" },
1019
1020
  { name: "field_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
1020
1021
  { name: "field_dependants", args: "p_organization_id uuid, p_field_id uuid", returns: "TABLE(kind text, dependant_id uuid, label text, how text)", security: "definer" },
1022
+ { name: "field_duplicate", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
1021
1023
  { name: "field_history", args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_record_id uuid DEFAULT NULL::uuid", returns: "TABLE(record_id uuid, record_title text, version integer, occurred_at timestamp with time zone, operation_label text, actor jsonb, before jsonb, after jsonb)", security: "definer" },
1022
1024
  { name: "field_input_closure", args: "p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid", returns: "TABLE(input_id uuid, input_key text, input_label text, input_table uuid, sensitivity text, retired boolean, depth integer)", security: "definer" },
1023
1025
  { name: "field_inputs_of", args: "p_organization_id uuid, p_field_data jsonb", returns: "TABLE(input_id uuid, input_key text, input_label text, input_table uuid, sensitivity text, retired boolean, how text)", security: "definer" },
@@ -1291,6 +1293,7 @@ var STORE_DOORS = [
1291
1293
  { name: "query_visible_ids", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text", returns: "SETOF uuid", security: "definer" },
1292
1294
  { name: "reachable_from", args: "p_organization_id uuid, p_roots uuid[]", returns: "TABLE(record_id uuid, depth integer, via text)", security: "invoker" },
1293
1295
  { name: "reaches_directly", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
1296
+ { name: "reaches_directly_many", args: "p_user_id uuid, p_targets uuid[], p_type text DEFAULT 'record'::text, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "TABLE(target uuid, reaches boolean)", security: "definer" },
1294
1297
  { name: "read_door_carried_ids", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level, OUT o_ids uuid[], OUT o_containers integer", returns: "record", security: "definer" },
1295
1298
  { name: "read_door_granted_ids", args: "p_organization_id uuid, p_table_id uuid", returns: "uuid[]", security: "definer" },
1296
1299
  { name: "read_door_ladder_ceiling", args: "", returns: "integer", security: "invoker" },
@@ -1862,6 +1865,8 @@ var DOORS = {
1862
1865
  // THE UNDO OF field_retire (lane STORE-RESTORE-DOORS): the set that went together comes back
1863
1866
  // whole, the Table declares the columns again, and the values never left the records.
1864
1867
  fieldRestore: "field_restore",
1868
+ // DUPLICATE PROPERTY (Notion N5): the copy declared and every record's value copied, in one door.
1869
+ fieldDuplicate: "field_duplicate",
1865
1870
  // CHAIR-ROLLUP-HONEST: is a column a lookup or roll-up reads archived, and which.
1866
1871
  fieldSourceArchived: "field_source_archived",
1867
1872
  // KINDS-GLUE wave 3 N1: a Table as a kind — its Fields, choices and stamp, as the reader.
@@ -3636,6 +3641,13 @@ function createRecordsClient(given) {
3636
3641
  "fieldRestore"
3637
3642
  ));
3638
3643
  },
3644
+ async fieldDuplicate({ field_id }) {
3645
+ return structureMoved(null, await callDoor(
3646
+ DOORS.fieldDuplicate,
3647
+ { p_organization_id: org, p_field_id: field_id },
3648
+ "fieldDuplicate"
3649
+ ));
3650
+ },
3639
3651
  async fieldSourceArchived({ field_id }) {
3640
3652
  const result = await callDoor(
3641
3653
  DOORS.fieldSourceArchived,