@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog — @ai-matrx/records
2
2
 
3
+ ## 0.79.1
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records/v0.79.0..npm/records/v0.79.1 -- apps/shared/records`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.79.0
10
+
11
+ DUPLICATE PROPERTY (Notion N5): `client.fieldDuplicate({ field_id })` calls the new door `custom.field_duplicate` — the copy is declared right after the original ("<name> (1)", same kind, choices with their colours and keys, unit, link, formula, rules, sensitivity) and every record's value is copied into it in one statement. Answers `FieldDuplicated` (`field_id`, `key`, `label`, `values_copied`, `values`). A link column copies its definition only; formula / lookup / roll-up columns work themselves out. Needs the table's add-a-column rung, as `fieldDeclare`.
12
+
13
+ **Consumer action:** none (additive).
14
+
3
15
  ## 0.78.1
4
16
 
5
17
  `durationText` (the duration kind's h:mm words) is `formatDurationSeconds(n, { granularity: "minute", signed: true })` from `@ai-matrx/kit/format` 0.34.0. Same text; a negative under half a second now reads `0:00` (was `-0:00`).
@@ -1179,6 +1179,7 @@ var STORE_DOORS = [
1179
1179
  { name: "doors_refusing_in_another_doors_name", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
1180
1180
  { 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" },
1181
1181
  { 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" },
1182
+ { 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" },
1182
1183
  { 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" },
1183
1184
  { name: "enrich_declare", args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
1184
1185
  { 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" },
@@ -1234,6 +1235,7 @@ var STORE_DOORS = [
1234
1235
  { name: "field_cycle", args: "p_organization_id uuid, p_field_data jsonb, p_self uuid", returns: "text[]", security: "definer" },
1235
1236
  { name: "field_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
1236
1237
  { 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" },
1238
+ { name: "field_duplicate", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
1237
1239
  { 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" },
1238
1240
  { 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" },
1239
1241
  { 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" },
@@ -1507,6 +1509,7 @@ var STORE_DOORS = [
1507
1509
  { 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" },
1508
1510
  { name: "reachable_from", args: "p_organization_id uuid, p_roots uuid[]", returns: "TABLE(record_id uuid, depth integer, via text)", security: "invoker" },
1509
1511
  { 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" },
1512
+ { 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" },
1510
1513
  { 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" },
1511
1514
  { name: "read_door_granted_ids", args: "p_organization_id uuid, p_table_id uuid", returns: "uuid[]", security: "definer" },
1512
1515
  { name: "read_door_ladder_ceiling", args: "", returns: "integer", security: "invoker" },
@@ -2078,6 +2081,8 @@ var DOORS = {
2078
2081
  // THE UNDO OF field_retire (lane STORE-RESTORE-DOORS): the set that went together comes back
2079
2082
  // whole, the Table declares the columns again, and the values never left the records.
2080
2083
  fieldRestore: "field_restore",
2084
+ // DUPLICATE PROPERTY (Notion N5): the copy declared and every record's value copied, in one door.
2085
+ fieldDuplicate: "field_duplicate",
2081
2086
  // CHAIR-ROLLUP-HONEST: is a column a lookup or roll-up reads archived, and which.
2082
2087
  fieldSourceArchived: "field_source_archived",
2083
2088
  // KINDS-GLUE wave 3 N1: a Table as a kind — its Fields, choices and stamp, as the reader.
@@ -3852,6 +3857,13 @@ function createRecordsClient(given) {
3852
3857
  "fieldRestore"
3853
3858
  ));
3854
3859
  },
3860
+ async fieldDuplicate({ field_id }) {
3861
+ return structureMoved(null, await callDoor(
3862
+ DOORS.fieldDuplicate,
3863
+ { p_organization_id: org, p_field_id: field_id },
3864
+ "fieldDuplicate"
3865
+ ));
3866
+ },
3855
3867
  async fieldSourceArchived({ field_id }) {
3856
3868
  const result = await callDoor(
3857
3869
  DOORS.fieldSourceArchived,