@ai-matrx/records 0.76.17 → 0.77.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 +25 -0
  2. package/dist/app-table/index.cjs +81 -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 +81 -0
  7. package/dist/app-table/index.js.map +1 -1
  8. package/dist/{client-kVZ54twD.d.ts → client-BbzLb-sB.d.ts} +53 -5
  9. package/dist/{client-PaKP4Cnd.d.cts → client-BcGGEpNi.d.cts} +53 -5
  10. package/dist/core/index.cjs +93 -6
  11. package/dist/core/index.cjs.map +1 -1
  12. package/dist/core/index.d.cts +21 -11
  13. package/dist/core/index.d.ts +21 -11
  14. package/dist/core/index.js +93 -6
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/data/index.cjs +81 -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 +81 -0
  21. package/dist/data/index.js.map +1 -1
  22. package/dist/{declareTable-Bv4V8Bjm.d.cts → declareTable-COEPJpke.d.cts} +4 -4
  23. package/dist/{declareTable-4MK51nXs.d.ts → declareTable-Dxq0Aega.d.ts} +4 -4
  24. package/dist/{field-DkB6Nods.d.cts → field-BTW7h7Wh.d.cts} +1 -1
  25. package/dist/{field-cWRPTM3U.d.ts → field-D7I9yck6.d.ts} +1 -1
  26. package/dist/index.cjs +26 -6
  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 +26 -6
  31. package/dist/index.js.map +1 -1
  32. package/dist/memory/index.cjs +31 -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 +31 -0
  37. package/dist/memory/index.js.map +1 -1
  38. package/dist/{ports-C2_pOWrL.d.ts → ports-CaYEF1dG.d.ts} +1 -1
  39. package/dist/{ports-C83nhjoM.d.cts → ports-PpvsH1cQ.d.cts} +1 -1
  40. package/dist/react/index.cjs +93 -6
  41. package/dist/react/index.cjs.map +1 -1
  42. package/dist/react/index.d.cts +325 -15
  43. package/dist/react/index.d.ts +325 -15
  44. package/dist/react/index.js +93 -6
  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-DVtXK-6L.d.cts → record-B7iwye2k.d.cts} +75 -13
  49. package/dist/{record-DVtXK-6L.d.ts → record-B7iwye2k.d.ts} +75 -13
  50. package/dist/{subscription-BJgDMerQ.d.cts → subscription-BWaRPLyo.d.ts} +67 -3
  51. package/dist/{subscription-D8OHY3kw.d.ts → subscription-Br30ZwIt.d.cts} +67 -3
  52. package/dist/{table-kind-BtguhnRV.d.cts → table-kind-C5jsmotR.d.ts} +140 -4
  53. package/dist/{table-kind-DzyRtFNa.d.ts → table-kind-DrVhYZbX.d.cts} +140 -4
  54. package/dist/templates/index.cjs +27 -3
  55. package/dist/templates/index.cjs.map +1 -1
  56. package/dist/templates/index.d.cts +11 -11
  57. package/dist/templates/index.d.ts +11 -11
  58. package/dist/templates/index.js +27 -3
  59. package/dist/templates/index.js.map +1 -1
  60. package/dist/{types-C6gdqgsI.d.ts → types-DWZ5_3by.d.ts} +2 -2
  61. package/dist/{types-DWoJFBbr.d.cts → types-DYoWzHwJ.d.cts} +2 -2
  62. package/dist/{types-DqCWKOYh.d.ts → types-DrJLOqVi.d.ts} +2 -2
  63. package/dist/{types-Mx-Wzm_d.d.cts → types-LvxsZ6Zv.d.cts} +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-CEE0ts9g.d.cts → validate-CRdXE73G.d.cts} +1 -1
  69. package/dist/{validate-d9QMYjBm.d.ts → validate-j0WQoC3C.d.ts} +1 -1
  70. package/package.json +3 -3
@@ -836,6 +836,12 @@ var STORE_DOORS = [
836
836
  { name: "assert_public_reader_names_a_public_table", args: "p_organization_id uuid, p_table_id uuid, p_door text", returns: "void", security: "definer" },
837
837
  { name: "assert_scope_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "definer" },
838
838
  { name: "assert_store_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
839
+ { name: "automation_archive", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
840
+ { name: "automation_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb, p_automation_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
841
+ { name: "automation_restore", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
842
+ { name: "automation_runs", args: "p_automation_id uuid, p_limit integer DEFAULT 50, p_cursor timestamp with time zone DEFAULT NULL::timestamp with time zone, p_organization_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
843
+ { name: "automation_set_enabled", args: "p_organization_id uuid, p_automation_id uuid, p_enabled boolean", returns: "jsonb", security: "definer" },
844
+ { name: "automations", args: "p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false", returns: "jsonb", security: "definer" },
839
845
  { name: "autonumber_backfill", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
840
846
  { name: "barcode_symbologies", args: "", returns: "text[]", security: "invoker" },
841
847
  { name: "booking_cancel", args: "p_booking_ref text, p_origin text DEFAULT NULL::text", returns: "TABLE(booking_ref text, record_id uuid, slot_key text, state text, message text)", security: "definer" },
@@ -1082,13 +1088,18 @@ var STORE_DOORS = [
1082
1088
  { name: "form_look_options", args: "p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "definer" },
1083
1089
  { name: "form_notify", args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid", returns: "uuid", security: "invoker" },
1084
1090
  { name: "form_preview_asks", args: "p_organization_id uuid, p_table_id uuid, p_questions jsonb, p_values jsonb", returns: "TABLE(field_key text, asked boolean, decided boolean, said text)", security: "definer" },
1091
+ { name: "form_preview_route", args: "p_organization_id uuid, p_table_id uuid, p_questions jsonb, p_endings jsonb, p_values jsonb", returns: "jsonb", security: "definer" },
1085
1092
  { name: "form_public", args: "p_form_id uuid", returns: "TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, state text, message text)", security: "definer" },
1086
1093
  { name: "form_public_asks", args: "p_form_id uuid, p_values jsonb, p_secret text DEFAULT NULL::text, p_origin text DEFAULT NULL::text", returns: "TABLE(field_key text, asked boolean, decided boolean, said text)", security: "definer" },
1094
+ { name: "form_public_route", args: "p_form_id uuid, p_values jsonb", returns: "jsonb", security: "definer" },
1087
1095
  { name: "form_redirect_domains", args: "p_organization_id uuid", returns: "text[]", security: "invoker" },
1088
1096
  { name: "form_redirect_refusal", args: "p_organization_id uuid, p_url text", returns: "text", security: "invoker" },
1089
1097
  { name: "form_restore", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
1098
+ { name: "form_results", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
1090
1099
  { name: "form_slug", args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid", returns: "text", security: "invoker" },
1091
1100
  { name: "form_submit", args: "p_form_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text", returns: "TABLE(submission_id uuid, record_id uuid, state text, message text)", security: "definer" },
1101
+ { name: "form_theme_options", args: "", returns: "jsonb", security: "invoker" },
1102
+ { name: "form_visit", args: "p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text", returns: "text", security: "definer" },
1092
1103
  { name: "forms", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(form_id uuid, table_id uuid, title text, slug text, published_at timestamp with time zone, closed_at timestamp with time zone, submission_cap integer, responses bigint, in_table bigint, held bigint, rejected bigint, state text, quarantine_rule_id uuid, notify_rule_id uuid, presentation jsonb)", security: "definer" },
1093
1104
  { name: "forms_archived", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100", returns: "TABLE(form_id uuid, table_id uuid, table_name text, kind text, title text, slug text, archived_at timestamp with time zone, archived_by uuid, table_archived boolean, can_restore boolean)", security: "definer" },
1094
1105
  { name: "formula_compile_sql", args: "p_organization_id uuid, p_expr jsonb, p_values_sql text", returns: "text", security: "invoker" },
@@ -1419,6 +1430,7 @@ var STORE_DOORS = [
1419
1430
  { name: "rollup_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb", returns: "jsonb", security: "invoker" },
1420
1431
  { name: "row_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
1421
1432
  { name: "row_sits_in_a_personal_table", args: "p_type text, p_organization_id uuid, p_id uuid", returns: "boolean", security: "invoker" },
1433
+ { name: "row_template_bodies", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(template_id uuid, body jsonb)", security: "definer" },
1422
1434
  { name: "row_template_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
1423
1435
  { name: "row_templates", args: "p_organization_id uuid, p_table_id uuid", returns: 'TABLE(template_id uuid, name text, table_id uuid, "values" jsonb, created_at timestamp with time zone, updated_at timestamp with time zone)', security: "definer" },
1424
1436
  { name: "rule_applies", args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
@@ -1545,6 +1557,8 @@ var STORE_DOORS = [
1545
1557
  { name: "table_stage_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
1546
1558
  { name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
1547
1559
  { name: "table_sync", args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
1560
+ { name: "table_template_declare", args: "p_org_id uuid, p_name text, p_description text, p_fields jsonb", returns: "uuid", security: "invoker" },
1561
+ { name: "table_templates", args: "p_org_id uuid", returns: "jsonb", security: "definer" },
1548
1562
  { name: "table_transfer_owner", args: "p_table_id uuid, p_to_person uuid, p_reason text", returns: "jsonb", security: "definer" },
1549
1563
  { name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
1550
1564
  { name: "table_unique_rule_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
@@ -2010,6 +2024,10 @@ var DOORS = {
2010
2024
  * organization wall and the caller's own rung on the Table — never `rule_eval` from a browser.
2011
2025
  */
2012
2026
  formPreviewAsks: "form_preview_asks",
2027
+ /** TYPEFORM-DUP: the owner's preview of the whole route — jumps, ending, score (`custom._form_route`). */
2028
+ formPreviewRoute: "form_preview_route",
2029
+ /** TYPEFORM-DUP: views, starts, completions, drop-off and answers per question. */
2030
+ formResults: "form_results",
2013
2031
  formLookOptions: "form_look_options",
2014
2032
  // PRODUCTS row 14 — "let clients book a 30-minute consult". A booking page IS an
2015
2033
  // `anon_form`, so it is opened and closed by `anonPublish` like any other; this is
@@ -2327,6 +2345,13 @@ var DOORS = {
2327
2345
  actionDeclare: "action_declare",
2328
2346
  rowActions: "row_actions",
2329
2347
  actionRun: "action_run",
2348
+ // AUTOMATION-DOOR (2026-10-07) — automations on a table. See ../automation.ts.
2349
+ automationDeclare: "automation_declare",
2350
+ automations: "automations",
2351
+ automationArchive: "automation_archive",
2352
+ automationRestore: "automation_restore",
2353
+ automationSetEnabled: "automation_set_enabled",
2354
+ automationRuns: "automation_runs",
2330
2355
  tableWebhookDeclare: "table_webhook_declare",
2331
2356
  tableWebhooks: "table_webhooks",
2332
2357
  tableWebhookArchive: "table_webhook_archive",
@@ -3906,6 +3931,20 @@ function createRecordsClient(given) {
3906
3931
  "formPreviewAsks"
3907
3932
  );
3908
3933
  },
3934
+ async formPreviewRoute({ table_id, questions, endings, values }) {
3935
+ return callDoor(
3936
+ DOORS.formPreviewRoute,
3937
+ { p_organization_id: org, p_table_id: table_id, p_questions: questions, p_endings: endings ?? [], p_values: values },
3938
+ "formPreviewRoute"
3939
+ );
3940
+ },
3941
+ async formResults({ form_id }) {
3942
+ return callDoor(
3943
+ DOORS.formResults,
3944
+ { p_organization_id: org, p_form_id: form_id },
3945
+ "formResults"
3946
+ );
3947
+ },
3909
3948
  async formLookOptions(args) {
3910
3949
  return callDoor(
3911
3950
  DOORS.formLookOptions,
@@ -5582,6 +5621,48 @@ function createRecordsClient(given) {
5582
5621
  }
5583
5622
  return result;
5584
5623
  },
5624
+ async automationDeclare({ table_id, spec, automation_id }) {
5625
+ return callDoor(
5626
+ DOORS.automationDeclare,
5627
+ { p_organization_id: org, p_table_id: table_id, p_spec: spec, p_automation_id: automation_id ?? null },
5628
+ "automationDeclare"
5629
+ );
5630
+ },
5631
+ async automations({ table_id, include_archived }) {
5632
+ return callDoor(
5633
+ DOORS.automations,
5634
+ { p_table_id: table_id, p_organization_id: org, p_include_archived: include_archived ?? false },
5635
+ "automations"
5636
+ );
5637
+ },
5638
+ async automationArchive({ automation_id }) {
5639
+ return callDoor(
5640
+ DOORS.automationArchive,
5641
+ { p_organization_id: org, p_automation_id: automation_id },
5642
+ "automationArchive"
5643
+ );
5644
+ },
5645
+ async automationRestore({ automation_id }) {
5646
+ return callDoor(
5647
+ DOORS.automationRestore,
5648
+ { p_organization_id: org, p_automation_id: automation_id },
5649
+ "automationRestore"
5650
+ );
5651
+ },
5652
+ async automationSetEnabled({ automation_id, enabled }) {
5653
+ return callDoor(
5654
+ DOORS.automationSetEnabled,
5655
+ { p_organization_id: org, p_automation_id: automation_id, p_enabled: enabled },
5656
+ "automationSetEnabled"
5657
+ );
5658
+ },
5659
+ async automationRuns({ automation_id, limit, cursor }) {
5660
+ return callDoor(
5661
+ DOORS.automationRuns,
5662
+ { p_automation_id: automation_id, p_limit: limit ?? 50, p_cursor: cursor ?? null, p_organization_id: org },
5663
+ "automationRuns"
5664
+ );
5665
+ },
5585
5666
  async tableWebhookDeclare({ table_id, target_url, events, description }) {
5586
5667
  return callDoor(
5587
5668
  DOORS.tableWebhookDeclare,