@ai-matrx/records 0.77.3 → 0.78.0

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 +9 -0
  2. package/dist/app-table/index.cjs +90 -1
  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 +90 -1
  7. package/dist/app-table/index.js.map +1 -1
  8. package/dist/{client-DZ3UcU4_.d.cts → client-BExNR0TK.d.cts} +5 -5
  9. package/dist/{client-ZIxyAOdh.d.ts → client-Byn_UthM.d.ts} +5 -5
  10. package/dist/core/index.cjs +90 -1
  11. package/dist/core/index.cjs.map +1 -1
  12. package/dist/core/index.d.cts +11 -11
  13. package/dist/core/index.d.ts +11 -11
  14. package/dist/core/index.js +90 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/data/index.cjs +90 -1
  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 +90 -1
  21. package/dist/data/index.js.map +1 -1
  22. package/dist/{declareTable-BYZdFrt5.d.cts → declareTable-CgrEusy8.d.cts} +4 -4
  23. package/dist/{declareTable-DGSJMqGx.d.ts → declareTable-DWOh53eK.d.ts} +4 -4
  24. package/dist/{field-D7I9yck6.d.ts → field-B2bvpqcE.d.ts} +1 -1
  25. package/dist/{field-BTW7h7Wh.d.cts → field-t9aefszx.d.cts} +1 -1
  26. package/dist/index.cjs +2 -0
  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 +2 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/memory/index.cjs +2 -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 +2 -0
  37. package/dist/memory/index.js.map +1 -1
  38. package/dist/{ports-CaYEF1dG.d.ts → ports-Ch4Ym0tj.d.ts} +7 -1
  39. package/dist/{ports-PpvsH1cQ.d.cts → ports-Cjl-IjFa.d.cts} +7 -1
  40. package/dist/react/index.cjs +90 -1
  41. package/dist/react/index.cjs.map +1 -1
  42. package/dist/react/index.d.cts +16 -0
  43. package/dist/react/index.d.ts +16 -0
  44. package/dist/react/index.js +90 -1
  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-B7iwye2k.d.cts → record-Ba1F1CNS.d.cts} +10 -0
  49. package/dist/{record-B7iwye2k.d.ts → record-Ba1F1CNS.d.ts} +10 -0
  50. package/dist/{subscription-BWaRPLyo.d.ts → subscription-CccP6N93.d.ts} +1 -1
  51. package/dist/{subscription-Br30ZwIt.d.cts → subscription-DGCrwwSR.d.cts} +1 -1
  52. package/dist/{table-kind-Da21ZLdJ.d.ts → table-kind-BMWi8G37.d.ts} +3 -3
  53. package/dist/{table-kind-HAQ6WNxZ.d.cts → table-kind-BoelIMjr.d.cts} +3 -3
  54. package/dist/templates/index.cjs +2 -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 +2 -0
  59. package/dist/templates/index.js.map +1 -1
  60. package/dist/{types-DrJLOqVi.d.ts → types-CiHdoATO.d.ts} +2 -2
  61. package/dist/{types-DWZ5_3by.d.ts → types-CtyMwJvy.d.ts} +2 -2
  62. package/dist/{types-DYoWzHwJ.d.cts → types-D-Mhiodh.d.cts} +2 -2
  63. package/dist/{types-LvxsZ6Zv.d.cts → types-euaQwxnB.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-j0WQoC3C.d.ts → validate-B-p3YPgA.d.ts} +1 -1
  69. package/dist/{validate-CRdXE73G.d.cts → validate-COvMcv8z.d.cts} +1 -1
  70. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/use-cases/alvarado-chen-kitchen-weekly-cooking.ts","../../src/use-cases/birchwood-avenue-renovation-budget.ts","../../src/use-cases/harbor-dental-new-patient-intake.ts","../../src/use-cases/ridgeline-physical-therapy-plan-of-care.ts","../../src/use-cases/index.ts","../../src/use-cases/placeholders.ts","../../src/store.generated.ts","../../src/vocabulary.ts","../../src/use-cases/validate.ts","../../src/use-cases/registry.ts"],"sourcesContent":["// src/use-cases/alvarado-chen-kitchen-weekly-cooking.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Priya and Daniel Alvarado-Chen cook for a family of five, and\n// they use this to keep the recipes they actually make, what goes into each one,\n// and the week's shopping list that falls out of the meals they have planned —\n// instead of three notebooks, a photo of a card and a text message at the shop.\n//\n// The law welcomes personal life, and a household is the honest test of a\n// platform that claims anyone can model their own work: nobody here has a job\n// title, a CRM or a pipeline consultant.\n//\n// PROVENANCE. Tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/family-recipe-collection.json`.\n// Fixed on adoption: the household was \"The Alvarado-Chen Kitchen (test\n// fixture)\" — a test organization carries the use case's own name and is found\n// for cleanup by its tag, never by a junk suffix. Relations pointed at a\n// recipe's TITLE rather than at the row. The business identity, relationships,\n// form, pipeline, dashboard question, document and notification rule were\n// written for this file.\n//\n// Everyone here is invented.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"alvarado-chen-kitchen-weekly-cooking\",\n useCase:\n \"Priya and Daniel Alvarado-Chen cook for a family of five, and they use this to keep the recipes they actually make, the ingredients each one needs, and the weekly shopping list that falls out of the meals they have planned, instead of three notebooks and a text message at the shop.\",\n industry: \"Household cooking\",\n cleanupTag: \"use-case:alvarado-chen-kitchen-weekly-cooking\",\n\n business: {\n name: \"The Alvarado-Chen Kitchen\",\n describes: \"A household of five that cooks most nights and shops once a week across three shops.\",\n address: {\n line1: \"68 Winterbourne Road\",\n city: \"Oak Park\",\n region: \"IL\",\n postalCode: \"60302\",\n country: \"US\",\n },\n phone: \"+1 708 555 0126\",\n email: \"kitchen@alvaradochen.net\",\n timezone: \"America/Chicago\",\n },\n\n tables: [\n {\n token: \"recipes\",\n name: \"Recipes\",\n labelSingular: \"Recipe\",\n labelPlural: \"Recipes\",\n type: \"entity\",\n display: \"grid\",\n weight: \"heavy\",\n ordered: false,\n icon: \"chef-hat\",\n titleField: \"title\",\n describes: \"Every dish the household actually cooks, with who brought it in and how long it takes.\",\n fields: [\n { key: \"title\", label: \"Recipe\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"category\", label: \"Course\", parityType: \"select\", choices: [\"Breakfast\", \"Main Course\", \"Side Dish\", \"Soup\", \"Dessert\", \"Sauce/Condiment\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"cuisine\", label: \"Cuisine\", parityType: \"select\", choices: [\"Mexican\", \"Chinese\", \"Italian\", \"American\", \"Middle Eastern\", \"Indian\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"prep_minutes\", label: \"Prep time\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"cook_minutes\", label: \"Cook time\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"servings\", label: \"Serves\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"source\", label: \"Where it came from\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contributed_by\", label: \"Brought in by\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"date_added\", label: \"Added\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"recipe-chilaquiles-verdes\", values: {\"title\": \"Chilaquiles Verdes\", \"category\": \"Breakfast\", \"cuisine\": \"Mexican\", \"prep_minutes\": 15, \"cook_minutes\": 20, \"servings\": 4, \"source\": \"Grandma Alvarado's recipe box, card #12\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-01-08\"} },\n { key: \"recipe-kung-pao-chicken\", values: {\"title\": \"Kung Pao Chicken\", \"category\": \"Main Course\", \"cuisine\": \"Chinese\", \"prep_minutes\": 20, \"cook_minutes\": 15, \"servings\": 4, \"source\": \"Adapted from Fuchsia Dunlop's Land of Fish and Rice\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-01-15\"} },\n { key: \"recipe-slow-braised-short-rib-ragu\", values: {\"title\": \"Slow-Braised Short Rib Ragu\", \"category\": \"Main Course\", \"cuisine\": \"Italian\", \"prep_minutes\": 25, \"cook_minutes\": 210, \"servings\": 6, \"source\": \"Sunday dinner tradition, no written source\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-02-02\"} },\n { key: \"recipe-mapo-tofu\", values: {\"title\": \"Mapo Tofu\", \"category\": \"Main Course\", \"cuisine\": \"Chinese\", \"prep_minutes\": 10, \"cook_minutes\": 15, \"servings\": 3, \"source\": \"Wei's mother, dictated over the phone\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-02-10\"} },\n { key: \"recipe-elote-street-corn-salad\", values: {\"title\": \"Elote Street Corn Salad\", \"category\": \"Side Dish\", \"cuisine\": \"Mexican\", \"prep_minutes\": 15, \"cook_minutes\": 10, \"servings\": 6, \"source\": \"Farmers market recipe card\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-03-01\"} },\n { key: \"recipe-pozole-rojo\", values: {\"title\": \"Pozole Rojo\", \"category\": \"Soup\", \"cuisine\": \"Mexican\", \"prep_minutes\": 30, \"cook_minutes\": 180, \"servings\": 8, \"source\": \"Family recipe, three generations\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-03-14\"} },\n { key: \"recipe-hot-and-sour-soup\", values: {\"title\": \"Hot and Sour Soup\", \"category\": \"Soup\", \"cuisine\": \"Chinese\", \"prep_minutes\": 15, \"cook_minutes\": 20, \"servings\": 4, \"source\": \"Wei Chen's own recipe\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-03-22\"} },\n { key: \"recipe-tres-leches-cake\", values: {\"title\": \"Tres Leches Cake\", \"category\": \"Dessert\", \"cuisine\": \"Mexican\", \"prep_minutes\": 30, \"cook_minutes\": 35, \"servings\": 12, \"source\": \"Grandma Alvarado's recipe box, card #4\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-04-05\"} },\n { key: \"recipe-cacio-e-pepe\", values: {\"title\": \"Cacio e Pepe\", \"category\": \"Main Course\", \"cuisine\": \"Italian\", \"prep_minutes\": 5, \"cook_minutes\": 15, \"servings\": 2, \"source\": \"Weeknight standby, no written source\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-04-12\"} },\n { key: \"recipe-chana-masala\", values: {\"title\": \"Chana Masala\", \"category\": \"Main Course\", \"cuisine\": \"Indian\", \"prep_minutes\": 15, \"cook_minutes\": 30, \"servings\": 4, \"source\": \"Learned from neighbor Priya\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-05-01\"} },\n { key: \"recipe-salsa-verde-cruda\", values: {\"title\": \"Salsa Verde Cruda\", \"category\": \"Sauce/Condiment\", \"cuisine\": \"Mexican\", \"prep_minutes\": 10, \"cook_minutes\": 0, \"servings\": 8, \"source\": \"Grandma Alvarado's recipe box, card #1\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-05-10\"} },\n { key: \"recipe-shakshuka\", values: {\"title\": \"Shakshuka\", \"category\": \"Breakfast\", \"cuisine\": \"Middle Eastern\", \"prep_minutes\": 10, \"cook_minutes\": 25, \"servings\": 4, \"source\": \"Ottolenghi's Jerusalem, adapted\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-05-18\"} },\n ],\n },\n {\n token: \"ingredients\",\n name: \"Ingredients\",\n labelSingular: \"Ingredient\",\n labelPlural: \"Ingredients\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"carrot\",\n titleField: \"ingredient_name\",\n describes: \"What goes into each recipe, in the amounts the recipe is written for.\",\n fields: [\n { key: \"recipe\", label: \"Recipe\", parityType: \"relation\", required: true, relationTarget: \"recipes\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"ingredient_name\", label: \"Ingredient\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quantity\", label: \"Quantity\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"unit\", label: \"Unit\", parityType: \"select\", choices: [\"cup\", \"tbsp\", \"tsp\", \"oz\", \"lb\", \"clove\", \"whole\", \"can\", \"pinch\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"notes\", label: \"Notes\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"ingredient-corn-tortillas-cut-into-wedges-and-fried\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"corn tortillas, cut into wedges and fried\", \"quantity\": 12, \"unit\": \"whole\", \"notes\": \"day-old tortillas fry crisper\"} },\n { key: \"ingredient-tomatillos\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"tomatillos\", \"quantity\": 1, \"unit\": \"lb\", \"notes\": \"husked and rinsed\"} },\n { key: \"ingredient-serrano-peppers\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"serrano peppers\", \"quantity\": 2, \"unit\": \"whole\", \"notes\": \"seeds removed for less heat\"} },\n { key: \"ingredient-queso-fresco\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"queso fresco\", \"quantity\": 4, \"unit\": \"oz\", \"notes\": \"crumbled for topping\"} },\n { key: \"ingredient-chicken-thighs-diced\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"chicken thighs, diced\", \"quantity\": 1.5, \"unit\": \"lb\", \"notes\": \"boneless, skinless\"} },\n { key: \"ingredient-dried-red-chilies\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"dried red chilies\", \"quantity\": 8, \"unit\": \"whole\", \"notes\": \"adjust to taste\"} },\n { key: \"ingredient-roasted-peanuts\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"roasted peanuts\", \"quantity\": 0.5, \"unit\": \"cup\", \"notes\": \"\"} },\n { key: \"ingredient-sichuan-peppercorns\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"Sichuan peppercorns\", \"quantity\": 1, \"unit\": \"tsp\", \"notes\": \"toasted and cracked\"} },\n { key: \"ingredient-bone-in-short-ribs\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"bone-in short ribs\", \"quantity\": 3, \"unit\": \"lb\", \"notes\": \"trimmed of excess fat\"} },\n { key: \"ingredient-san-marzano-tomatoes\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"San Marzano tomatoes\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"28 oz can, crushed by hand\"} },\n { key: \"ingredient-red-wine\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"red wine\", \"quantity\": 1, \"unit\": \"cup\", \"notes\": \"something drinkable\"} },\n { key: \"ingredient-soft-tofu-cubed\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"soft tofu, cubed\", \"quantity\": 14, \"unit\": \"oz\", \"notes\": \"one package\"} },\n { key: \"ingredient-doubanjiang-fermented-chili-bean-paste\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"doubanjiang (fermented chili bean paste)\", \"quantity\": 2, \"unit\": \"tbsp\", \"notes\": \"Pixian brand preferred\"} },\n { key: \"ingredient-ground-pork\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"ground pork\", \"quantity\": 0.5, \"unit\": \"lb\", \"notes\": \"\"} },\n { key: \"ingredient-corn-kernels-charred\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"corn kernels, charred\", \"quantity\": 4, \"unit\": \"cup\", \"notes\": \"grilled or pan-charred\"} },\n { key: \"ingredient-cotija-cheese\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"cotija cheese\", \"quantity\": 0.5, \"unit\": \"cup\", \"notes\": \"crumbled\"} },\n { key: \"ingredient-lime\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"lime\", \"quantity\": 2, \"unit\": \"whole\", \"notes\": \"juiced\"} },\n { key: \"ingredient-pork-shoulder\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"pork shoulder\", \"quantity\": 3, \"unit\": \"lb\", \"notes\": \"cut into large chunks\"} },\n { key: \"ingredient-hominy\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"hominy\", \"quantity\": 2, \"unit\": \"can\", \"notes\": \"29 oz cans, drained\"} },\n { key: \"ingredient-guajillo-chilies\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"guajillo chilies\", \"quantity\": 6, \"unit\": \"whole\", \"notes\": \"stemmed and seeded\"} },\n { key: \"ingredient-wood-ear-mushrooms-dried\", values: {\"recipe\": \"recipe-hot-and-sour-soup\", \"ingredient_name\": \"wood ear mushrooms, dried\", \"quantity\": 0.25, \"unit\": \"cup\", \"notes\": \"rehydrated and sliced\"} },\n { key: \"ingredient-white-pepper\", values: {\"recipe\": \"recipe-hot-and-sour-soup\", \"ingredient_name\": \"white pepper\", \"quantity\": 1, \"unit\": \"tsp\", \"notes\": \"the 'hot' in hot and sour\"} },\n { key: \"ingredient-evaporated-milk\", values: {\"recipe\": \"recipe-tres-leches-cake\", \"ingredient_name\": \"evaporated milk\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"12 oz can\"} },\n { key: \"ingredient-sweetened-condensed-milk\", values: {\"recipe\": \"recipe-tres-leches-cake\", \"ingredient_name\": \"sweetened condensed milk\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"14 oz can\"} },\n { key: \"ingredient-pecorino-romano-grated\", values: {\"recipe\": \"recipe-cacio-e-pepe\", \"ingredient_name\": \"pecorino romano, grated\", \"quantity\": 1.5, \"unit\": \"cup\", \"notes\": \"finely grated, not shredded\"} },\n { key: \"ingredient-chickpeas\", values: {\"recipe\": \"recipe-chana-masala\", \"ingredient_name\": \"chickpeas\", \"quantity\": 2, \"unit\": \"can\", \"notes\": \"15 oz cans, drained\"} },\n { key: \"ingredient-garam-masala\", values: {\"recipe\": \"recipe-chana-masala\", \"ingredient_name\": \"garam masala\", \"quantity\": 1, \"unit\": \"tbsp\", \"notes\": \"\"} },\n { key: \"ingredient-tomatillos-raw\", values: {\"recipe\": \"recipe-salsa-verde-cruda\", \"ingredient_name\": \"tomatillos, raw\", \"quantity\": 1, \"unit\": \"lb\", \"notes\": \"quartered\"} },\n { key: \"ingredient-eggs\", values: {\"recipe\": \"recipe-shakshuka\", \"ingredient_name\": \"eggs\", \"quantity\": 6, \"unit\": \"whole\", \"notes\": \"cracked directly into sauce\"} },\n { key: \"ingredient-crushed-tomatoes\", values: {\"recipe\": \"recipe-shakshuka\", \"ingredient_name\": \"crushed tomatoes\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"28 oz can\"} },\n ],\n },\n {\n token: \"shopping_lists\",\n name: \"Shopping lists\",\n labelSingular: \"Shopping list\",\n labelPlural: \"Shopping lists\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: false,\n icon: \"shopping-cart\",\n titleField: \"list_name\",\n describes: \"One list per shop per week, built from the recipes planned for that week.\",\n fields: [\n { key: \"list_name\", label: \"List\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"week_of\", label: \"Week of\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"store\", label: \"Shop\", parityType: \"select\", choices: [\"Fresh Market Co-op\", \"Lucky Star Asian Grocery\", \"Mercado Alvarado\", \"Costco\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Planning\", \"Ready to Shop\", \"Shopping\", \"Done\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"list-week-of-jun-1-mexican-night-weekday-soup\", values: {\"list_name\": \"Week of Jun 1 — Mexican night + weekday soup\", \"week_of\": \"2026-06-01\", \"store\": \"Mercado Alvarado\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-8-chinese-takeout-at-home\", values: {\"list_name\": \"Week of Jun 8 — Chinese takeout-at-home\", \"week_of\": \"2026-06-08\", \"store\": \"Lucky Star Asian Grocery\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", values: {\"list_name\": \"Week of Jun 15 — Sunday ragu + easy weeknights\", \"week_of\": \"2026-06-15\", \"store\": \"Fresh Market Co-op\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-22-birthday-cake-week\", values: {\"list_name\": \"Week of Jun 22 — Birthday cake week\", \"week_of\": \"2026-06-22\", \"store\": \"Costco\", \"status\": \"Ready to Shop\"} },\n { key: \"list-week-of-jun-29-pozole-for-the-in-laws\", values: {\"list_name\": \"Week of Jun 29 — Pozole for the in-laws\", \"week_of\": \"2026-06-29\", \"store\": \"Mercado Alvarado\", \"status\": \"Planning\"} },\n ],\n },\n {\n token: \"shopping_list_items\",\n name: \"List items\",\n labelSingular: \"List item\",\n labelPlural: \"List items\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"list-checks\",\n titleField: \"ingredient_name\",\n describes: \"What is actually on a list, by aisle, and whether it is already in the trolley.\",\n fields: [\n { key: \"shopping_list\", label: \"Shopping list\", parityType: \"relation\", required: true, relationTarget: \"shopping_lists\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"ingredient_name\", label: \"Ingredient\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quantity\", label: \"Quantity\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"unit\", label: \"Unit\", parityType: \"select\", choices: [\"cup\", \"tbsp\", \"tsp\", \"oz\", \"lb\", \"clove\", \"whole\", \"can\", \"pinch\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"aisle\", label: \"Aisle\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"checked\", label: \"In the trolley\", parityType: \"select\", choices: [\"Yes\", \"No\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"item-tomatillos\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"tomatillos\", \"quantity\": 2, \"unit\": \"lb\", \"aisle\": \"Produce\", \"checked\": \"Yes\"} },\n { key: \"item-corn-tortillas\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"corn tortillas\", \"quantity\": 2, \"unit\": \"whole\", \"aisle\": \"Bakery\", \"checked\": \"Yes\"} },\n { key: \"item-queso-fresco\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"queso fresco\", \"quantity\": 8, \"unit\": \"oz\", \"aisle\": \"Dairy\", \"checked\": \"Yes\"} },\n { key: \"item-chicken-thighs\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"chicken thighs\", \"quantity\": 1.5, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"Yes\"} },\n { key: \"item-dried-red-chilies\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"dried red chilies\", \"quantity\": 1, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"Yes\"} },\n { key: \"item-sichuan-peppercorns\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"Sichuan peppercorns\", \"quantity\": 1, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"No\"} },\n { key: \"item-bone-in-short-ribs\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"bone-in short ribs\", \"quantity\": 3, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"Yes\"} },\n { key: \"item-san-marzano-tomatoes\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"San Marzano tomatoes\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Canned Goods\", \"checked\": \"Yes\"} },\n { key: \"item-pecorino-romano\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"pecorino romano\", \"quantity\": 1, \"unit\": \"lb\", \"aisle\": \"Dairy\", \"checked\": \"No\"} },\n { key: \"item-evaporated-milk\", values: {\"shopping_list\": \"list-week-of-jun-22-birthday-cake-week\", \"ingredient_name\": \"evaporated milk\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Baking\", \"checked\": \"No\"} },\n { key: \"item-sweetened-condensed-milk\", values: {\"shopping_list\": \"list-week-of-jun-22-birthday-cake-week\", \"ingredient_name\": \"sweetened condensed milk\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Baking\", \"checked\": \"No\"} },\n { key: \"item-pork-shoulder\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"pork shoulder\", \"quantity\": 3, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"No\"} },\n { key: \"item-hominy\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"hominy\", \"quantity\": 4, \"unit\": \"can\", \"aisle\": \"Canned Goods\", \"checked\": \"No\"} },\n { key: \"item-guajillo-chilies\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"guajillo chilies\", \"quantity\": 6, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"No\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"An ingredient belongs to the recipe it is part of and means nothing without it.\",\n fromTable: \"ingredients\",\n fromField: \"recipe\",\n toTable: \"recipes\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"ingredients\",\n },\n {\n describes: \"A line on the shopping list belongs to the list it is written on.\",\n fromTable: \"shopping_list_items\",\n fromField: \"shopping_list\",\n toTable: \"shopping_lists\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"items\",\n },\n ],\n\n form: {\n token: \"alvarado_chen_add_a_recipe\",\n name: \"Add a recipe to the family collection\",\n describes:\n \"What anyone in the family fills in when a dish is worth keeping — including the grandparents, which is why it asks who brought it in.\",\n audience: \"member\",\n table: \"recipes\",\n fields: [\n { fieldKey: \"title\", label: \"What is it called?\", required: true },\n { fieldKey: \"category\", label: \"Course\", required: true },\n { fieldKey: \"cuisine\", label: \"Cuisine\" },\n { fieldKey: \"prep_minutes\", label: \"Prep time in minutes\", help: \"Chopping and mixing — everything before it goes on the heat.\" },\n { fieldKey: \"cook_minutes\", label: \"Cook time in minutes\" },\n { fieldKey: \"servings\", label: \"How many does it serve?\", required: true },\n { fieldKey: \"source\", label: \"Where did it come from?\", help: \"A book, a website, or a person. We like knowing.\" },\n { fieldKey: \"contributed_by\", label: \"Who brought it in?\", required: true },\n ],\n submitLabel: \"Add it to the collection\",\n confirmation:\n \"Added. Put the ingredients in next, and it will start showing up on the shopping list when you plan it for a week.\",\n },\n\n pipeline: {\n token: \"alvarado_chen_weekly_shop\",\n name: \"The weekly shop\",\n describes:\n \"A list's life is four days long and everybody in the house touches it. The stages exist so nobody buys the same bag of rice twice.\",\n table: \"shopping_lists\",\n stageField: \"status\",\n stages: [\n { key: \"Planning\", label: \"Planning\", describes: \"Meals are still being chosen, so the list is still growing. Nobody shops from it yet.\", typicalDurationDays: 3 },\n { key: \"Ready to Shop\", label: \"Ready to shop\", describes: \"The meals are settled and the list is complete. This is the state it is in when somebody picks up their keys.\", typicalDurationDays: 1 },\n { key: \"Shopping\", label: \"Shopping\", describes: \"Somebody is in the shop ticking things off. Anything added now is a genuine omission, not a change of plan.\", typicalDurationDays: 1 },\n { key: \"Done\", label: \"Done\", describes: \"Everything is home. Unticked items roll onto next week rather than being lost.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"Which of our recipes can we actually cook on a Tuesday?\",\n whyItMatters:\n \"Weeknight cooking fails on time, not on ideas. Knowing the average cook time by course is what stops a two-hour braise being planned for a school night, and it is the number that decides what goes on the list.\",\n table: \"recipes\",\n aggregate: \"avg\",\n of: \"cook_minutes\",\n groupBy: \"category\",\n answerUnit: \"minutes\",\n },\n\n documentTemplate: {\n token: \"alvarado_chen_recipe_card\",\n name: \"Printable recipe card\",\n describes:\n \"What gets printed and stuck to the fridge door, or sent to someone who asked for the recipe after dinner. It keeps the attribution, because half the collection came from somebody's mother.\",\n table: \"recipes\",\n title: \"{{recipe_title}} — serves {{servings}}\",\n body: [\n \"{{recipe_title}}\",\n \"\",\n \"{{course}} · {{cuisine}} · serves {{servings}}\",\n \"Prep {{prep_time}} minutes, cook {{cook_time}} minutes.\",\n \"\",\n \"From {{source}}, brought into the family by {{contributed_by}}.\",\n \"\",\n \"Ingredients are on the back. If you halve it, do not halve the salt by the same amount — taste it instead.\",\n \"\",\n \"{{household}} · printed {{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"recipe_title\", from: \"title\", describes: \"The dish.\" },\n { key: \"course\", from: \"category\", describes: \"Which part of the meal it is.\" },\n { key: \"cuisine\", from: \"cuisine\", describes: \"Where it comes from.\" },\n { key: \"servings\", from: \"servings\", describes: \"How many it feeds, so it can be scaled.\" },\n { key: \"prep_time\", from: \"prep_minutes\", describes: \"Minutes before it goes on the heat.\" },\n { key: \"cook_time\", from: \"cook_minutes\", describes: \"Minutes on the heat.\" },\n { key: \"source\", from: \"source\", describes: \"The book, site or person it came from.\" },\n { key: \"contributed_by\", from: \"contributed_by\", describes: \"Who brought it into the family.\" },\n { key: \"household\", from: \"business\", describes: \"Whose kitchen this is.\" },\n { key: \"today\", from: \"today\", describes: \"When the card was printed.\" },\n ],\n },\n\n notificationRule: {\n token: \"alvarado_chen_list_is_ready\",\n name: \"The list is ready to shop\",\n describes:\n \"The one message this household would genuinely set up: whoever is going to the shop needs to know the list stopped changing, because the whole failure mode is leaving with a list somebody was still editing.\",\n when: {\n table: \"shopping_lists\",\n event: \"stage_entered\",\n stage: \"Ready to Shop\",\n },\n audience: \"whoever is doing the shop this week\",\n channel: \"in_app\",\n message:\n \"{{list_name}} for the week of {{week_of}} is finished and ready — {{store}}. Tick things off as you go so nobody buys them twice.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/birchwood-avenue-renovation-budget.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Marguerite Oyelowo is renovating a 1920s house one room at a\n// time, and she uses this to hold every contractor quote against the room it is\n// for and every receipt against the budget she set — so that \"are we over?\" has\n// an answer instead of an argument.\n//\n// A homeowner is not a company, and that is the point: the platform is only\n// true to its claim if somebody with no staff and no software budget can model\n// their own project in it.\n//\n// PROVENANCE. Tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/home-renovation.json`.\n// Fixed on adoption: the project was \"Birchwood Ave Renovation (test fixture)\";\n// relations pointed at a room's NAME and a contractor's COMPANY NAME rather than\n// at the row; and the crew's `insured` boolean became a two-way choice, because\n// THE STORE HAS NO BOOLEAN — its thirteen parity types are closed and none of\n// them is a checkbox, so a yes/no is a choice of two. The business identity,\n// relationships, form, pipeline, dashboard question, document and notification\n// rule were written for this file.\n//\n// Every contractor, licence number and mailbox here is invented.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"birchwood-avenue-renovation-budget\",\n useCase:\n \"Marguerite Oyelowo is renovating a 1920s house one room at a time, and she uses this to hold every contractor quote against the room it is for and every receipt against the budget she set, so that whether the job is over budget has an answer instead of an argument.\",\n industry: \"Home renovation\",\n cleanupTag: \"use-case:birchwood-avenue-renovation-budget\",\n\n business: {\n name: \"Birchwood Avenue Renovation\",\n describes: \"A owner-managed whole-house renovation of a 1920s four-bedroom, run room by room over about a year.\",\n address: {\n line1: \"417 Birchwood Avenue\",\n city: \"Providence\",\n region: \"RI\",\n postalCode: \"02906\",\n country: \"US\",\n },\n phone: \"+1 401 555 0188\",\n email: \"marguerite@birchwoodreno.net\",\n timezone: \"America/New_York\",\n },\n\n tables: [\n {\n token: \"rooms\",\n name: \"Rooms\",\n labelSingular: \"Room\",\n labelPlural: \"Rooms\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: true,\n icon: \"door-open\",\n titleField: \"room_name\",\n describes: \"The house, room by room: what is being done to each one, when, and for how much.\",\n fields: [\n { key: \"room_name\", label: \"Room\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"project_scope\", label: \"Scope of work\", parityType: \"long_text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_start\", label: \"Target start\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_end\", label: \"Target finish\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Planning\", \"Quoting\", \"In Progress\", \"Complete\", \"On Hold\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"budget\", label: \"Budget\", parityType: \"currency\", unit: \"USD\", format: \"currency\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n ],\n rows: [\n { key: \"room-kitchen\", values: {\"room_name\": \"Kitchen\", \"project_scope\": \"Full gut renovation: new cabinets, quartz counters, relocate island, new appliances.\", \"target_start\": \"2026-04-01\", \"target_end\": \"2026-06-15\", \"status\": \"Complete\", \"budget\": 48000.0} },\n { key: \"room-primary-bathroom\", values: {\"room_name\": \"Primary Bathroom\", \"project_scope\": \"Replace tub with walk-in shower, new vanity, heated tile floor.\", \"target_start\": \"2026-06-20\", \"target_end\": \"2026-08-01\", \"status\": \"In Progress\", \"budget\": 22500.0} },\n { key: \"room-basement\", values: {\"room_name\": \"Basement\", \"project_scope\": \"Finish unfinished basement into family room and home office, add egress window.\", \"target_start\": \"2026-08-10\", \"target_end\": \"2026-11-15\", \"status\": \"Quoting\", \"budget\": 61000.0} },\n { key: \"room-guest-bathroom\", values: {\"room_name\": \"Guest Bathroom\", \"project_scope\": \"Cosmetic refresh: new vanity, paint, light fixtures.\", \"target_start\": \"2026-09-01\", \"target_end\": \"2026-09-20\", \"status\": \"Planning\", \"budget\": 6500.0} },\n { key: \"room-backyard-deck\", values: {\"room_name\": \"Backyard Deck\", \"project_scope\": \"Tear off old wood deck, build composite deck with pergola.\", \"target_start\": \"2026-05-01\", \"target_end\": \"2026-06-01\", \"status\": \"Complete\", \"budget\": 18000.0} },\n { key: \"room-garage\", values: {\"room_name\": \"Garage\", \"project_scope\": \"Epoxy floor, built-in storage, new insulated door.\", \"target_start\": \"2026-10-01\", \"target_end\": \"2026-10-20\", \"status\": \"On Hold\", \"budget\": 9500.0} },\n ],\n },\n {\n token: \"contractors\",\n name: \"Contractors\",\n labelSingular: \"Contractor\",\n labelPlural: \"Contractors\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"hard-hat\",\n titleField: \"company_name\",\n describes: \"Everyone quoting or working on the job, with the licence and insurance details that matter if something goes wrong.\",\n fields: [\n { key: \"company_name\", label: \"Company\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"trade\", label: \"Trade\", parityType: \"select\", choices: [\"General Contractor\", \"Plumbing\", \"Electrical\", \"Flooring\", \"Painting\", \"HVAC\", \"Carpentry\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contact_name\", label: \"Contact\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"phone\", label: \"Phone\", parityType: \"phone\", format: \"phone\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"email\", label: \"Email\", parityType: \"email\", format: \"email\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"license_number\", label: \"Licence number\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"insured\", label: \"Insured\", parityType: \"select\", choices: [\"Yes\", \"No\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"contractor-ferro-sons-construction\", values: {\"company_name\": \"Ferro & Sons Construction\", \"trade\": \"General Contractor\", \"contact_name\": \"Dominic Ferro\", \"phone\": \"555-330-1001\", \"email\": \"dominic@northshoremail.com\", \"license_number\": \"GC-88213-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-redline-plumbing-co\", values: {\"company_name\": \"Redline Plumbing Co.\", \"trade\": \"Plumbing\", \"contact_name\": \"Tanya Iversen\", \"phone\": \"555-330-1002\", \"email\": \"tanya@northshoremail.com\", \"license_number\": \"PL-44029-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-voltway-electric\", values: {\"company_name\": \"Voltway Electric\", \"trade\": \"Electrical\", \"contact_name\": \"Emeka Osayande\", \"phone\": \"555-330-1003\", \"email\": \"emeka@northshoremail.com\", \"license_number\": \"EL-90117-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-hearthstone-flooring\", values: {\"company_name\": \"Hearthstone Flooring\", \"trade\": \"Flooring\", \"contact_name\": \"Bianca Moretti\", \"phone\": \"555-330-1004\", \"email\": \"bianca@northshoremail.com\", \"license_number\": \"FL-22850-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-clearcoat-painting\", values: {\"company_name\": \"Clearcoat Painting\", \"trade\": \"Painting\", \"contact_name\": \"Sam Delacroix\", \"phone\": \"555-330-1005\", \"email\": \"sam@northshoremail.com\", \"license_number\": \"PT-10442-OH\", \"insured\": \"No\"} },\n { key: \"contractor-northgate-hvac\", values: {\"company_name\": \"Northgate HVAC\", \"trade\": \"HVAC\", \"contact_name\": \"Renata Kowalczyk\", \"phone\": \"555-330-1006\", \"email\": \"renata@northshoremail.com\", \"license_number\": \"HV-77302-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-millbrook-carpentry\", values: {\"company_name\": \"Millbrook Carpentry\", \"trade\": \"Carpentry\", \"contact_name\": \"Julius Wexford\", \"phone\": \"555-330-1007\", \"email\": \"julius@northshoremail.com\", \"license_number\": \"CP-55671-OH\", \"insured\": \"Yes\"} },\n ],\n },\n {\n token: \"quotes\",\n name: \"Quotes\",\n labelSingular: \"Quote\",\n labelPlural: \"Quotes\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"file-text\",\n titleField: \"quote_amount\",\n describes: \"What each trade said each room would cost, and whether that price is still good.\",\n fields: [\n { key: \"room\", label: \"Room\", parityType: \"relation\", required: true, relationTarget: \"rooms\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contractor\", label: \"Contractor\", parityType: \"relation\", required: true, relationTarget: \"contractors\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quote_amount\", label: \"Quote\", parityType: \"currency\", unit: \"USD\", format: \"currency\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"quote_date\", label: \"Quoted on\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Pending\", \"Accepted\", \"Rejected\", \"Expired\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"valid_until\", label: \"Valid until\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"quote-46500-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 46500.0, \"quote_date\": \"2026-02-14\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-14\"} },\n { key: \"quote-3200-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-redline-plumbing-co\", \"quote_amount\": 3200.0, \"quote_date\": \"2026-02-20\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-20\"} },\n { key: \"quote-2800-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-voltway-electric\", \"quote_amount\": 2800.0, \"quote_date\": \"2026-02-20\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-20\"} },\n { key: \"quote-21000-0\", values: {\"room\": \"room-primary-bathroom\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 21000.0, \"quote_date\": \"2026-05-10\", \"status\": \"Accepted\", \"valid_until\": \"2026-06-10\"} },\n { key: \"quote-4100-0\", values: {\"room\": \"room-primary-bathroom\", \"contractor\": \"contractor-redline-plumbing-co\", \"quote_amount\": 4100.0, \"quote_date\": \"2026-05-11\", \"status\": \"Accepted\", \"valid_until\": \"2026-06-11\"} },\n { key: \"quote-58000-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 58000.0, \"quote_date\": \"2026-07-20\", \"status\": \"Pending\", \"valid_until\": \"2026-08-20\"} },\n { key: \"quote-12500-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-millbrook-carpentry\", \"quote_amount\": 12500.0, \"quote_date\": \"2026-07-22\", \"status\": \"Pending\", \"valid_until\": \"2026-08-22\"} },\n { key: \"quote-6800-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-northgate-hvac\", \"quote_amount\": 6800.0, \"quote_date\": \"2026-07-25\", \"status\": \"Pending\", \"valid_until\": \"2026-08-25\"} },\n { key: \"quote-1800-0\", values: {\"room\": \"room-guest-bathroom\", \"contractor\": \"contractor-hearthstone-flooring\", \"quote_amount\": 1800.0, \"quote_date\": \"2026-07-28\", \"status\": \"Pending\", \"valid_until\": \"2026-08-28\"} },\n { key: \"quote-17200-0\", values: {\"room\": \"room-backyard-deck\", \"contractor\": \"contractor-millbrook-carpentry\", \"quote_amount\": 17200.0, \"quote_date\": \"2026-03-05\", \"status\": \"Accepted\", \"valid_until\": \"2026-04-05\"} },\n { key: \"quote-19800-0\", values: {\"room\": \"room-backyard-deck\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 19800.0, \"quote_date\": \"2026-03-02\", \"status\": \"Rejected\", \"valid_until\": \"2026-04-02\"} },\n { key: \"quote-2100-0\", values: {\"room\": \"room-garage\", \"contractor\": \"contractor-clearcoat-painting\", \"quote_amount\": 2100.0, \"quote_date\": \"2026-01-15\", \"status\": \"Expired\", \"valid_until\": \"2026-02-15\"} },\n ],\n },\n {\n token: \"purchases\",\n name: \"Purchases\",\n labelSingular: \"Purchase\",\n labelPlural: \"Purchases\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"receipt\",\n titleField: \"item_description\",\n describes: \"Every pound spent against the project, so the budget is a fact rather than a feeling.\",\n fields: [\n { key: \"room\", label: \"Room\", parityType: \"relation\", required: true, relationTarget: \"rooms\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"item_description\", label: \"What was bought\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"vendor\", label: \"Vendor\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"purchase_date\", label: \"Bought on\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"amount\", label: \"Amount\", parityType: \"currency\", unit: \"USD\", format: \"currency\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"category\", label: \"Category\", parityType: \"select\", choices: [\"Materials\", \"Fixtures\", \"Labor\", \"Permits\", \"Appliances\", \"Design/Design Fees\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"receipt_number\", label: \"Receipt\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"purchase-custom-shaker-cabinets-painted-alabaster\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Custom shaker cabinets, painted 'Alabaster'\", \"vendor\": \"Millbrook Cabinetry Supply\", \"purchase_date\": \"2026-04-05\", \"amount\": 14200.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10021\"} },\n { key: \"purchase-quartz-countertop-calacatta-gold-42-sq-ft\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Quartz countertop, 'Calacatta Gold' 42 sq ft\", \"vendor\": \"Stone Depot\", \"purchase_date\": \"2026-04-18\", \"amount\": 5900.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10022\"} },\n { key: \"purchase-range-refrigerator-dishwasher-package\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Range, refrigerator, dishwasher package\", \"vendor\": \"Coldstream Appliance Center\", \"purchase_date\": \"2026-04-22\", \"amount\": 8700.0, \"category\": \"Appliances\", \"receipt_number\": \"RCT-10023\"} },\n { key: \"purchase-building-permit-kitchen-remodel\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Building permit — kitchen remodel\", \"vendor\": \"City of Fairmont Permits Office\", \"purchase_date\": \"2026-03-28\", \"amount\": 450.0, \"category\": \"Permits\", \"receipt_number\": \"RCT-10024\"} },\n { key: \"purchase-ferro-sons-final-labor-invoice\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Ferro & Sons — final labor invoice\", \"vendor\": \"Ferro & Sons Construction\", \"purchase_date\": \"2026-06-15\", \"amount\": 15800.0, \"category\": \"Labor\", \"receipt_number\": \"RCT-10025\"} },\n { key: \"purchase-walk-in-shower-kit-with-frameless-glass\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Walk-in shower kit with frameless glass\", \"vendor\": \"Stone Depot\", \"purchase_date\": \"2026-06-25\", \"amount\": 4300.0, \"category\": \"Fixtures\", \"receipt_number\": \"RCT-10026\"} },\n { key: \"purchase-heated-floor-mat-system-45-sq-ft\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Heated floor mat system, 45 sq ft\", \"vendor\": \"WarmFloor Direct\", \"purchase_date\": \"2026-06-28\", \"amount\": 1650.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10027\"} },\n { key: \"purchase-floating-double-vanity-60-inch\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Floating double vanity, 60 inch\", \"vendor\": \"Millbrook Cabinetry Supply\", \"purchase_date\": \"2026-07-02\", \"amount\": 2200.0, \"category\": \"Fixtures\", \"receipt_number\": \"RCT-10028\"} },\n { key: \"purchase-composite-decking-600-sq-ft-weathered-teak\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Composite decking, 600 sq ft, 'Weathered Teak'\", \"vendor\": \"Deckmaster Supply\", \"purchase_date\": \"2026-05-05\", \"amount\": 8900.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10029\"} },\n { key: \"purchase-cedar-pergola-kit-12x14\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Cedar pergola kit, 12x14\", \"vendor\": \"Deckmaster Supply\", \"purchase_date\": \"2026-05-08\", \"amount\": 3200.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10030\"} },\n { key: \"purchase-millbrook-carpentry-labor-and-install\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Millbrook Carpentry — labor and install\", \"vendor\": \"Millbrook Carpentry\", \"purchase_date\": \"2026-06-01\", \"amount\": 4900.0, \"category\": \"Labor\", \"receipt_number\": \"RCT-10031\"} },\n { key: \"purchase-design-consultation-fixture-layout\", values: {\"room\": \"room-guest-bathroom\", \"item_description\": \"Design consultation — fixture layout\", \"vendor\": \"Bianca Moretti Interiors\", \"purchase_date\": \"2026-07-30\", \"amount\": 350.0, \"category\": \"Design/Design Fees\", \"receipt_number\": \"RCT-10032\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A quote is for exactly one room, and it is meaningless once that room is out of scope.\",\n fromTable: \"quotes\",\n fromField: \"room\",\n toTable: \"rooms\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"quotes\",\n },\n {\n describes: \"A quote comes from one contractor, who goes on existing after the quote is rejected.\",\n fromTable: \"quotes\",\n fromField: \"contractor\",\n toTable: \"contractors\",\n flavor: \"referenced\",\n cardinality: \"one\",\n onDelete: \"restrict\",\n inverseKey: \"quotes_given\",\n },\n {\n describes: \"A purchase is charged against the room it was bought for, which is how the budget stays honest.\",\n fromTable: \"purchases\",\n fromField: \"room\",\n toTable: \"rooms\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"purchases\",\n },\n ],\n\n form: {\n token: \"birchwood_contractor_details\",\n name: \"Contractor details and insurance\",\n describes:\n \"What a trade fills in before they are allowed to quote. It asks for the licence number and the insurance because those are the two things nobody can produce after something goes wrong.\",\n audience: \"public\",\n table: \"contractors\",\n fields: [\n { fieldKey: \"company_name\", label: \"Company name\", required: true },\n { fieldKey: \"trade\", label: \"Trade\", required: true },\n { fieldKey: \"contact_name\", label: \"Who should I ask for?\", required: true },\n { fieldKey: \"phone\", label: \"Best number\", required: true },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"license_number\", label: \"Licence number\", required: true, help: \"I check this with the state board before accepting a quote.\" },\n { fieldKey: \"insured\", label: \"Do you carry liability insurance?\", required: true, help: \"I will ask for the certificate before work starts.\" },\n ],\n submitLabel: \"Send my details\",\n confirmation:\n \"Thank you. I will check the licence and come back to you about which rooms I would like quoted, usually within a few days.\",\n },\n\n pipeline: {\n token: \"birchwood_room_progress\",\n name: \"Room by room\",\n describes:\n \"Where each room stands. The board exists because a whole-house renovation is really five small projects at different stages, and the only way to stay sane is to look at them side by side.\",\n table: \"rooms\",\n stageField: \"status\",\n stages: [\n { key: \"Planning\", label: \"Planning\", describes: \"Scope is still being decided. Nothing has been priced, so the budget figure is a guess.\", typicalDurationDays: 21 },\n { key: \"Quoting\", label: \"Quoting\", describes: \"Trades are pricing it. Leaves when a quote is accepted — or when every quote comes back over budget and the scope goes back to Planning.\", typicalDurationDays: 21 },\n { key: \"In Progress\", label: \"In progress\", describes: \"Work has started and receipts are landing against this room. This is where the budget is actually won or lost.\", typicalDurationDays: 45 },\n { key: \"On Hold\", label: \"On hold\", describes: \"Stopped for money, a permit or a lead time. Named honestly so it is not mistaken for progress.\", typicalDurationDays: 30 },\n { key: \"Complete\", label: \"Complete\", describes: \"Finished, paid and signed off. The room's spend is final and can be compared against what was budgeted.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"What have I actually spent on each room so far?\",\n whyItMatters:\n \"The budget was set room by room, so the only useful comparison is room by room. This is the number that decides whether the next room starts on schedule or waits, and it is the one thing a spreadsheet stops being trusted for once there are more than about thirty receipts.\",\n table: \"purchases\",\n aggregate: \"sum\",\n of: \"amount\",\n groupBy: \"room\",\n answerUnit: \"USD\",\n },\n\n documentTemplate: {\n token: \"birchwood_quote_acceptance\",\n name: \"Quote acceptance\",\n describes:\n \"Sent to a contractor when their price is accepted. It restates the number, the room and the date the quote was given, because a renovation dispute is almost always about which version of the price was agreed.\",\n table: \"quotes\",\n title: \"Accepting your quote of {{amount}}\",\n body: [\n \"Thank you for quoting.\",\n \"\",\n \"I am accepting your price of {{amount}}, quoted on {{quoted_on}} and valid until {{valid_until}}, for the work we discussed.\",\n \"\",\n \"Before anything starts I will need a copy of your certificate of insurance. Materials I have bought myself are already on site; anything else is yours to supply and appears on your invoice, not on my receipts.\",\n \"\",\n \"If the scope changes once the wall is open — and on a house this age it usually does — please price the change and send it to me before carrying it out. I would rather approve a second number than argue about a bigger one later.\",\n \"\",\n \"{{project}}\",\n \"{{project_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"amount\", from: \"quote_amount\", describes: \"The accepted price, restated so there is one version of it.\" },\n { key: \"quoted_on\", from: \"quote_date\", describes: \"Which quote this is, when a trade has given several.\" },\n { key: \"valid_until\", from: \"valid_until\", describes: \"The date the price was good until.\" },\n { key: \"project\", from: \"business\", describes: \"The project name.\" },\n { key: \"project_phone\", from: \"business\", describes: \"The number to call back on.\" },\n { key: \"today\", from: \"today\", describes: \"The date of acceptance.\" },\n ],\n },\n\n notificationRule: {\n token: \"birchwood_quote_expiring\",\n name: \"A quote is about to expire\",\n describes:\n \"Quotes are good for thirty days and a renovation moves slower than that, so the default outcome is re-pricing everything at a worse number. A week's warning is what prevents it, and it is the first thing any homeowner would automate.\",\n when: {\n table: \"quotes\",\n event: \"due\",\n field: \"valid_until\",\n daysBefore: 7,\n },\n audience: \"the homeowner\",\n channel: \"email\",\n message:\n \"The quote of {{quote_amount}} expires on {{valid_until}} — about a week from now. Accept it, or ask for it to be held, before it has to be re-priced.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/harbor-dental-new-patient-intake.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Renata Okonkwo runs the front desk at Harbor Dental Group, a\n// six-chair family dental practice, and she uses this to take a new patient\n// from the first phone call through forms, insurance verification and a booked\n// first visit without anything falling between the cracks.\n//\n// Every person, address, phone number, mailbox and member id below is invented.\n// Nothing here is copied from a real patient, a real practice or a real inbox.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"harbor-dental-new-patient-intake\",\n useCase:\n \"Renata Okonkwo runs the front desk at Harbor Dental Group, a six-chair family dental practice, and she uses this to take a new patient from the first phone call through forms, insurance verification and a booked first visit without anything falling between the cracks.\",\n industry: \"Dentistry\",\n cleanupTag: \"use-case:harbor-dental-new-patient-intake\",\n\n business: {\n name: \"Harbor Dental Group\",\n legalName: \"Harbor Dental Group, PLLC\",\n describes: \"A six-chair family dental practice doing general dentistry, hygiene and same-day crowns.\",\n address: {\n line1: \"1840 Waterfront Parkway\",\n line2: \"Suite 210\",\n city: \"Bellingham\",\n region: \"WA\",\n postalCode: \"98225\",\n country: \"US\",\n },\n phone: \"+1 360 555 0142\",\n website: \"https://harbordentalgroup.com\",\n email: \"frontdesk@harbordentalgroup.com\",\n timezone: \"America/Los_Angeles\",\n },\n\n tables: [\n {\n token: \"patient\",\n name: \"Patients\",\n labelSingular: \"Patient\",\n labelPlural: \"Patients\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"user-round\",\n titleField: \"full_name\",\n describes: \"Everyone the practice treats, from the first enquiry through to an active chart.\",\n fields: [\n {\n key: \"full_name\",\n label: \"Patient name\",\n parityType: \"text\",\n required: true,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"chart_number\",\n label: \"Chart number\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n help: \"Assigned when the chart is opened. Printed on every claim and referral.\",\n },\n {\n key: \"date_of_birth\",\n label: \"Date of birth\",\n parityType: \"datetime\",\n format: \"date\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n help: \"Carriers verify eligibility on name plus date of birth, so it has to be exact.\",\n },\n {\n key: \"phone\",\n label: \"Mobile phone\",\n parityType: \"phone\",\n format: \"phone\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"email\",\n label: \"Email\",\n parityType: \"email\",\n format: \"email\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"street\",\n label: \"Street address\",\n parityType: \"text\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"city\",\n label: \"City\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"region\",\n label: \"State\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"postal_code\",\n label: \"ZIP\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"intake_stage\",\n label: \"Intake stage\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Enquiry\",\n \"Forms sent\",\n \"Forms received\",\n \"Insurance verified\",\n \"First visit booked\",\n \"Active patient\",\n ],\n help: \"Where this person is between the first call and a chart the hygienist can work from.\",\n },\n {\n key: \"insurance_carrier\",\n label: \"Insurance carrier\",\n parityType: \"select\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\"Delta Dental\", \"Cigna Dental\", \"MetLife\", \"Guardian\", \"Aetna\", \"Self-pay\"],\n },\n {\n key: \"member_id\",\n label: \"Member ID\",\n parityType: \"text\",\n sensitivity: \"restricted\",\n contextPolicy: \"exclude\",\n help: \"Never leaves the practice. Needed to verify eligibility before the first visit.\",\n },\n {\n key: \"primary_dentist\",\n label: \"Primary dentist\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Dr. Alina Reyes\", \"Dr. Marcus Webb\"],\n },\n {\n key: \"allergies\",\n label: \"Known allergies\",\n parityType: \"multi_select\",\n multi: true,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\n \"Penicillin\",\n \"Latex\",\n \"Codeine\",\n \"Sulfa drugs\",\n \"Local anaesthetic\",\n \"None reported\",\n ],\n help: \"Read out loud at chairside before any injection.\",\n },\n {\n key: \"balance_due\",\n label: \"Balance due\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"referred_by\",\n label: \"How they found us\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Existing patient referral\",\n \"Insurance directory\",\n \"Web search\",\n \"Walk-in\",\n \"Employer benefits fair\",\n ],\n },\n {\n key: \"front_desk_notes\",\n label: \"Front desk notes\",\n parityType: \"long_text\",\n sensitivity: \"confidential\",\n contextPolicy: \"on_request\",\n },\n ],\n rows: [\n {\n key: \"patient-rivera-marisol\",\n values: {\n full_name: \"Marisol Rivera\",\n chart_number: \"HD-10428\",\n date_of_birth: \"1988-03-17\",\n phone: \"+1 360 555 0184\",\n email: \"m.rivera@northshoremail.com\",\n street: \"4417 Chuckanut Ridge Road\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-884201773\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Penicillin\"],\n balance_due: 0,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Prefers early morning. Two children also seen here.\",\n },\n },\n {\n key: \"patient-oyelaran-tunde\",\n values: {\n full_name: \"Tunde Oyelaran\",\n chart_number: \"HD-10431\",\n date_of_birth: \"1975-11-02\",\n phone: \"+1 360 555 0219\",\n email: \"toyelaran@baysidedesignco.com\",\n street: \"902 Eldridge Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4471209\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 142.5,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Travels for work; wants visits batched into one afternoon.\",\n },\n },\n {\n key: \"patient-halvorsen-britt\",\n values: {\n full_name: \"Britt Halvorsen\",\n chart_number: \"HD-10455\",\n date_of_birth: \"1992-07-26\",\n phone: \"+1 360 555 0177\",\n email: \"britt.halvorsen@cascadiaoutfitters.com\",\n street: \"215 Harris Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"First visit booked\",\n insurance_carrier: \"MetLife\",\n member_id: \"ML-63902118\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Latex\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Latex allergy flagged to the back office; nitrile only.\",\n },\n },\n {\n key: \"patient-nakamura-kenji\",\n values: {\n full_name: \"Kenji Nakamura\",\n chart_number: \"HD-10460\",\n date_of_birth: \"1964-01-09\",\n phone: \"+1 360 555 0263\",\n email: \"k.nakamura@harborviewcpa.com\",\n street: \"1130 Yew Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Insurance verified\",\n insurance_carrier: \"Guardian\",\n member_id: \"GD-20117744\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Codeine\"],\n balance_due: 0,\n referred_by: \"Employer benefits fair\",\n front_desk_notes: \"Eligibility confirmed through December. Waiting on his schedule to book.\",\n },\n },\n {\n key: \"patient-abadi-leila\",\n values: {\n full_name: \"Leila Abadi\",\n chart_number: \"HD-10462\",\n date_of_birth: \"1997-05-30\",\n phone: \"+1 360 555 0308\",\n email: \"leila.abadi@westwindstudio.com\",\n street: \"77 Fairhaven Parkway\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Forms received\",\n insurance_carrier: \"Aetna\",\n member_id: \"AE-55823094\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Forms in. Needs eligibility checked before we offer a slot.\",\n },\n },\n {\n key: \"patient-delacroix-yvon\",\n values: {\n full_name: \"Yvon Delacroix\",\n chart_number: \"HD-10466\",\n date_of_birth: \"1981-09-14\",\n phone: \"+1 360 555 0341\",\n email: \"yvon.delacroix@pugetsoundfreight.com\",\n street: \"3320 Northwest Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Forms sent\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-884977120\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Packet emailed Tuesday. Follow up if nothing back by Friday.\",\n },\n },\n {\n key: \"patient-strand-ingrid\",\n values: {\n full_name: \"Ingrid Strand\",\n chart_number: \"HD-10470\",\n date_of_birth: \"1955-12-04\",\n phone: \"+1 360 555 0392\",\n email: \"ingrid.strand@northshoremail.com\",\n street: \"618 Alabama Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Self-pay\",\n member_id: \"\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Sulfa drugs\", \"Local anaesthetic\"],\n balance_due: 880,\n referred_by: \"Walk-in\",\n front_desk_notes: \"On a payment plan for the crown. Anaesthetic sensitivity — Dr. Reyes is aware.\",\n },\n },\n {\n key: \"patient-mbeki-sipho\",\n values: {\n full_name: \"Sipho Mbeki\",\n chart_number: \"HD-10473\",\n date_of_birth: \"2001-02-21\",\n phone: \"+1 360 555 0415\",\n email: \"sipho.mbeki@wwu-alumni.com\",\n street: \"1502 Indian Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Enquiry\",\n insurance_carrier: \"Self-pay\",\n member_id: \"\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Called about a chipped incisor. Quoted the emergency exam fee.\",\n },\n },\n {\n key: \"patient-kowalczyk-agata\",\n values: {\n full_name: \"Agata Kowalczyk\",\n chart_number: \"HD-10477\",\n date_of_birth: \"1986-06-11\",\n phone: \"+1 360 555 0448\",\n email: \"a.kowalczyk@evergreenlabsupply.com\",\n street: \"2245 Cornwall Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4488317\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 64,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Night guard impressions taken; lab case out.\",\n },\n },\n {\n key: \"patient-ferreira-joao\",\n values: {\n full_name: \"João Ferreira\",\n chart_number: \"HD-10481\",\n date_of_birth: \"1970-08-19\",\n phone: \"+1 360 555 0472\",\n email: \"joao.ferreira@harborlinemarine.com\",\n street: \"840 Marine Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Insurance verified\",\n insurance_carrier: \"MetLife\",\n member_id: \"ML-63988402\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Penicillin\", \"Latex\"],\n balance_due: 0,\n referred_by: \"Employer benefits fair\",\n front_desk_notes: \"Two allergies on file. Wants the first available Thursday.\",\n },\n },\n {\n key: \"patient-whitehorse-dara\",\n values: {\n full_name: \"Dara Whitehorse\",\n chart_number: \"HD-10484\",\n date_of_birth: \"1994-04-07\",\n phone: \"+1 360 555 0501\",\n email: \"dara.whitehorse@salishseaarts.com\",\n street: \"506 Girard Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"First visit booked\",\n insurance_carrier: \"Guardian\",\n member_id: \"GD-20166018\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Booked for the new patient exam and a cleaning back to back.\",\n },\n },\n {\n key: \"patient-oconnell-brigid\",\n values: {\n full_name: \"Brigid O'Connell\",\n chart_number: \"HD-10489\",\n date_of_birth: \"1959-10-23\",\n phone: \"+1 360 555 0533\",\n email: \"brigid.oconnell@northshoremail.com\",\n street: \"3901 Sunset Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-885013366\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Codeine\"],\n balance_due: 310.75,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Crown seat next month. Balance is the patient portion from the last claim.\",\n },\n },\n {\n key: \"patient-tran-hieu\",\n values: {\n full_name: \"Hieu Tran\",\n chart_number: \"HD-10492\",\n date_of_birth: \"1990-12-15\",\n phone: \"+1 360 555 0566\",\n email: \"hieu.tran@baysidedesignco.com\",\n street: \"1215 Lakeway Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Forms received\",\n insurance_carrier: \"Aetna\",\n member_id: \"AE-55901287\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Medical history mentions a heart murmur — confirm premedication with Dr. Reyes.\",\n },\n },\n {\n key: \"patient-bergstrom-annika\",\n values: {\n full_name: \"Annika Bergström\",\n chart_number: \"HD-10496\",\n date_of_birth: \"1983-02-08\",\n phone: \"+1 360 555 0590\",\n email: \"annika.bergstrom@cascadiaoutfitters.com\",\n street: \"705 Samish Way\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Enquiry\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4491550\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Walk-in\",\n front_desk_notes: \"Came in over lunch asking about whitening. Packet not sent yet.\",\n },\n },\n ],\n },\n\n {\n token: \"visit\",\n name: \"Visits\",\n labelSingular: \"Visit\",\n labelPlural: \"Visits\",\n type: \"entity\",\n display: \"calendar\",\n weight: \"heavy\",\n ordered: true,\n icon: \"calendar-clock\",\n titleField: \"summary\",\n describes: \"Every booked chair appointment, what it is for, who is in the chair and who is treating.\",\n fields: [\n {\n key: \"summary\",\n label: \"Appointment\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"patient\",\n label: \"Patient\",\n parityType: \"relation\",\n required: true,\n relationTarget: \"patient\",\n relationMax: 1,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"appointment_at\",\n label: \"Date and time\",\n parityType: \"datetime\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"duration_minutes\",\n label: \"Chair time\",\n parityType: \"integer\",\n unit: \"min\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"procedure\",\n label: \"Procedure\",\n parityType: \"select\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\n \"New patient exam\",\n \"Adult prophylaxis\",\n \"Child prophylaxis\",\n \"Composite filling\",\n \"Crown preparation\",\n \"Crown seat\",\n \"Root canal\",\n \"Extraction\",\n \"Emergency exam\",\n ],\n },\n {\n key: \"provider\",\n label: \"Provider\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Dr. Alina Reyes\",\n \"Dr. Marcus Webb\",\n \"Priya Chandra, RDH\",\n \"Tomas Lindgren, RDH\",\n ],\n },\n {\n key: \"operatory\",\n label: \"Operatory\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Op A\", \"Op B\", \"Op C\", \"Op D\", \"Op E\", \"Op F\"],\n },\n {\n key: \"visit_status\",\n label: \"Status\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Scheduled\", \"Confirmed\", \"Checked in\", \"Completed\", \"No-show\", \"Cancelled\"],\n },\n {\n key: \"fee\",\n label: \"Fee\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n ],\n rows: [\n {\n key: \"visit-rivera-prophy-sep\",\n values: {\n summary: \"Adult cleaning — M. Rivera\",\n patient: \"patient-rivera-marisol\",\n appointment_at: \"2026-09-08T08:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Completed\",\n fee: 138,\n },\n },\n {\n key: \"visit-oyelaran-crown-prep\",\n values: {\n summary: \"Crown prep, lower right — T. Oyelaran\",\n patient: \"patient-oyelaran-tunde\",\n appointment_at: \"2026-09-10T13:30:00-07:00\",\n duration_minutes: 90,\n procedure: \"Crown preparation\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Completed\",\n fee: 1240,\n },\n },\n {\n key: \"visit-strand-crown-seat\",\n values: {\n summary: \"Crown seat — I. Strand\",\n patient: \"patient-strand-ingrid\",\n appointment_at: \"2026-09-14T10:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"Crown seat\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Completed\",\n fee: 880,\n },\n },\n {\n key: \"visit-kowalczyk-prophy\",\n values: {\n summary: \"Adult cleaning — A. Kowalczyk\",\n patient: \"patient-kowalczyk-agata\",\n appointment_at: \"2026-09-15T09:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Completed\",\n fee: 138,\n },\n },\n {\n key: \"visit-oconnell-filling\",\n values: {\n summary: \"Composite filling, upper left — B. O'Connell\",\n patient: \"patient-oconnell-brigid\",\n appointment_at: \"2026-09-16T14:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"Composite filling\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Completed\",\n fee: 412,\n },\n },\n {\n key: \"visit-mbeki-emergency\",\n values: {\n summary: \"Emergency exam, chipped incisor — S. Mbeki\",\n patient: \"patient-mbeki-sipho\",\n appointment_at: \"2026-09-17T16:30:00-07:00\",\n duration_minutes: 30,\n procedure: \"Emergency exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op E\",\n visit_status: \"No-show\",\n fee: 95,\n },\n },\n {\n key: \"visit-rivera-filling\",\n values: {\n summary: \"Composite filling, lower left — M. Rivera\",\n patient: \"patient-rivera-marisol\",\n appointment_at: \"2026-09-18T08:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"Composite filling\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Completed\",\n fee: 386,\n },\n },\n {\n key: \"visit-halvorsen-new-patient\",\n values: {\n summary: \"New patient exam — B. Halvorsen\",\n patient: \"patient-halvorsen-britt\",\n appointment_at: \"2026-09-23T09:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Confirmed\",\n fee: 215,\n },\n },\n {\n key: \"visit-halvorsen-prophy\",\n values: {\n summary: \"Adult cleaning — B. Halvorsen\",\n patient: \"patient-halvorsen-britt\",\n appointment_at: \"2026-09-23T10:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Confirmed\",\n fee: 138,\n },\n },\n {\n key: \"visit-whitehorse-new-patient\",\n values: {\n summary: \"New patient exam — D. Whitehorse\",\n patient: \"patient-whitehorse-dara\",\n appointment_at: \"2026-09-24T11:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-whitehorse-prophy\",\n values: {\n summary: \"Adult cleaning — D. Whitehorse\",\n patient: \"patient-whitehorse-dara\",\n appointment_at: \"2026-09-24T12:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Scheduled\",\n fee: 138,\n },\n },\n {\n key: \"visit-oconnell-crown-seat\",\n values: {\n summary: \"Crown seat — B. O'Connell\",\n patient: \"patient-oconnell-brigid\",\n appointment_at: \"2026-10-06T14:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"Crown seat\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Scheduled\",\n fee: 1180,\n },\n },\n {\n key: \"visit-ferreira-new-patient\",\n values: {\n summary: \"New patient exam — J. Ferreira\",\n patient: \"patient-ferreira-joao\",\n appointment_at: \"2026-10-08T15:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op E\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-nakamura-new-patient\",\n values: {\n summary: \"New patient exam — K. Nakamura\",\n patient: \"patient-nakamura-kenji\",\n appointment_at: \"2026-10-09T08:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-tran-child-prophy\",\n values: {\n summary: \"Child cleaning — H. Tran, daughter\",\n patient: \"patient-tran-hieu\",\n appointment_at: \"2026-10-13T16:00:00-07:00\",\n duration_minutes: 40,\n procedure: \"Child prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Scheduled\",\n fee: 112,\n },\n },\n {\n key: \"visit-kowalczyk-cancelled\",\n values: {\n summary: \"Night guard delivery — A. Kowalczyk\",\n patient: \"patient-kowalczyk-agata\",\n appointment_at: \"2026-09-19T11:30:00-07:00\",\n duration_minutes: 30,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Cancelled\",\n fee: 0,\n },\n },\n ],\n },\n\n {\n token: \"insurance_claim\",\n name: \"Insurance claims\",\n labelSingular: \"Claim\",\n labelPlural: \"Claims\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"file-text\",\n titleField: \"claim_number\",\n describes: \"What was billed to a carrier for a completed visit, and what came back.\",\n fields: [\n {\n key: \"claim_number\",\n label: \"Claim number\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"visit\",\n label: \"Visit\",\n parityType: \"relation\",\n required: true,\n relationTarget: \"visit\",\n relationMax: 1,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"carrier\",\n label: \"Carrier\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Delta Dental\", \"Cigna Dental\", \"MetLife\", \"Guardian\", \"Aetna\"],\n },\n {\n key: \"submitted_on\",\n label: \"Submitted\",\n parityType: \"datetime\",\n format: \"date\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"billed_amount\",\n label: \"Billed\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"allowed_amount\",\n label: \"Carrier allowed\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"patient_portion\",\n label: \"Patient portion\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"claim_status\",\n label: \"Claim status\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Prepared\", \"Submitted\", \"In review\", \"Paid\", \"Denied\", \"Appealed\"],\n },\n ],\n rows: [\n {\n key: \"claim-rivera-prophy\",\n values: {\n claim_number: \"HD-CLM-24118\",\n visit: \"visit-rivera-prophy-sep\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-09\",\n billed_amount: 138,\n allowed_amount: 138,\n patient_portion: 0,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-oyelaran-crown-prep\",\n values: {\n claim_number: \"HD-CLM-24123\",\n visit: \"visit-oyelaran-crown-prep\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-11\",\n billed_amount: 1240,\n allowed_amount: 1097.5,\n patient_portion: 142.5,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-kowalczyk-prophy\",\n values: {\n claim_number: \"HD-CLM-24131\",\n visit: \"visit-kowalczyk-prophy\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-16\",\n billed_amount: 138,\n allowed_amount: 74,\n patient_portion: 64,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-oconnell-filling\",\n values: {\n claim_number: \"HD-CLM-24136\",\n visit: \"visit-oconnell-filling\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-17\",\n billed_amount: 412,\n allowed_amount: 310.75,\n patient_portion: 310.75,\n claim_status: \"In review\",\n },\n },\n {\n key: \"claim-rivera-filling\",\n values: {\n claim_number: \"HD-CLM-24140\",\n visit: \"visit-rivera-filling\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-19\",\n billed_amount: 386,\n allowed_amount: 386,\n patient_portion: 0,\n claim_status: \"Submitted\",\n },\n },\n {\n key: \"claim-strand-crown-seat\",\n values: {\n claim_number: \"HD-CLM-24127\",\n visit: \"visit-strand-crown-seat\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-15\",\n billed_amount: 880,\n allowed_amount: 0,\n patient_portion: 880,\n claim_status: \"Denied\",\n },\n },\n {\n key: \"claim-oyelaran-resubmit\",\n values: {\n claim_number: \"HD-CLM-24144\",\n visit: \"visit-oyelaran-crown-prep\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-20\",\n billed_amount: 142.5,\n allowed_amount: 0,\n patient_portion: 142.5,\n claim_status: \"Appealed\",\n },\n },\n {\n key: \"claim-oconnell-crown-predetermination\",\n values: {\n claim_number: \"HD-CLM-24149\",\n visit: \"visit-oconnell-crown-seat\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-21\",\n billed_amount: 1180,\n allowed_amount: 0,\n patient_portion: 0,\n claim_status: \"Prepared\",\n },\n },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A visit belongs to the patient who sits in the chair, and it dies with their chart.\",\n fromTable: \"visit\",\n fromField: \"patient\",\n toTable: \"patient\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"visits\",\n },\n {\n describes: \"A claim bills exactly one completed visit, and it cannot outlive the visit it bills.\",\n fromTable: \"insurance_claim\",\n fromField: \"visit\",\n toTable: \"visit\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"claims\",\n },\n ],\n\n form: {\n token: \"harbor_dental_new_patient_intake\",\n name: \"Harbor Dental new-patient intake\",\n describes:\n \"The packet the front desk emails after the first call. The patient fills it in before they arrive so the hygienist is not taking a medical history in the chair.\",\n audience: \"public\",\n table: \"patient\",\n fields: [\n { fieldKey: \"full_name\", label: \"Your full legal name\", required: true, help: \"As it appears on your insurance card.\" },\n { fieldKey: \"date_of_birth\", label: \"Date of birth\", required: true },\n { fieldKey: \"phone\", label: \"Mobile number\", required: true, help: \"We text appointment reminders to this number.\" },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"street\", label: \"Street address\", required: true },\n { fieldKey: \"city\", label: \"City\", required: true },\n { fieldKey: \"region\", label: \"State\", required: true },\n { fieldKey: \"postal_code\", label: \"ZIP\", required: true },\n { fieldKey: \"insurance_carrier\", label: \"Dental insurance carrier\", help: \"Choose Self-pay if you do not have dental coverage.\" },\n { fieldKey: \"member_id\", label: \"Member ID\", help: \"On the front of your card. We use it to check your benefits before your visit.\" },\n { fieldKey: \"allergies\", label: \"Any known allergies\", help: \"Select all that apply. We read this out before any injection.\" },\n { fieldKey: \"referred_by\", label: \"How did you hear about us?\" },\n ],\n submitLabel: \"Send my intake form\",\n confirmation:\n \"Thank you — we have your forms. We will check your benefits with your carrier and call you within two business days to find a first appointment that works.\",\n },\n\n pipeline: {\n token: \"harbor_dental_intake_pipeline\",\n name: \"New-patient intake\",\n describes:\n \"The six steps between a stranger calling and a chart the hygienist can work from. Renata works this board every morning.\",\n table: \"patient\",\n stageField: \"intake_stage\",\n stages: [\n {\n key: \"Enquiry\",\n label: \"Enquiry\",\n describes: \"They called or walked in. Nothing has been sent yet. Moves on when the intake packet goes out.\",\n typicalDurationDays: 1,\n },\n {\n key: \"Forms sent\",\n label: \"Forms sent\",\n describes: \"The packet is with them. Chase at three days; most people fill it in the evening they get it.\",\n typicalDurationDays: 3,\n },\n {\n key: \"Forms received\",\n label: \"Forms received\",\n describes: \"Medical history is in. Anything flagged goes to the treating dentist before we book.\",\n typicalDurationDays: 1,\n },\n {\n key: \"Insurance verified\",\n label: \"Insurance verified\",\n describes: \"Eligibility and remaining annual maximum confirmed with the carrier, so nobody is surprised by a bill.\",\n typicalDurationDays: 2,\n },\n {\n key: \"First visit booked\",\n label: \"First visit booked\",\n describes: \"Exam and cleaning are on the schedule and confirmed. Moves on the day they are seen.\",\n typicalDurationDays: 14,\n },\n {\n key: \"Active patient\",\n label: \"Active patient\",\n describes: \"Seen at least once and on recall. They leave this stage only if they transfer out.\",\n },\n ],\n },\n\n dashboardQuestion: {\n question: \"How many people have sent their forms back but still are not on the schedule?\",\n whyItMatters:\n \"Everyone sitting between 'Forms received' and 'First visit booked' is someone who already chose us and is quietly going cold. If the number climbs above about six, Renata blocks an hour to call them before the week gets away.\",\n table: \"patient\",\n aggregate: \"count\",\n groupBy: \"intake_stage\",\n filter: \"intake_stage is 'Forms received' or 'Insurance verified'\",\n answerUnit: \"patients\",\n },\n\n documentTemplate: {\n token: \"harbor_dental_welcome_letter\",\n name: \"New patient welcome letter\",\n describes:\n \"Goes out the moment a first visit is booked. It confirms who they will see, what to bring and what the first appointment actually involves, which is the single biggest reason people no-show.\",\n table: \"patient\",\n title: \"Welcome to {{practice_name}}, {{patient_name}}\",\n body: [\n \"Dear {{patient_name}},\",\n \"\",\n \"Thank you for choosing {{practice_name}}. Your chart is open under number {{chart_number}} and you will be seeing {{dentist}}.\",\n \"\",\n \"Your first appointment is a full examination with digital x-rays, followed by a cleaning with one of our hygienists. Together they take about two hours, so please allow for that.\",\n \"\",\n \"Please bring a photo ID and your {{carrier}} card. We have already checked your benefits, so we can tell you what is covered before any work is agreed — we do not start treatment you have not said yes to.\",\n \"\",\n \"If anything about your health has changed since you filled in your forms, tell the front desk when you arrive. It matters more than people expect.\",\n \"\",\n \"We look forward to meeting you.\",\n \"\",\n \"{{practice_name}}\",\n \"{{practice_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"patient_name\", from: \"full_name\", describes: \"How we address them in the letter.\" },\n { key: \"chart_number\", from: \"chart_number\", describes: \"So the letter and the chart agree if they call about it.\" },\n { key: \"dentist\", from: \"primary_dentist\", describes: \"The dentist they are assigned to.\" },\n { key: \"carrier\", from: \"insurance_carrier\", describes: \"Tells them which card to bring.\" },\n { key: \"practice_name\", from: \"business\", describes: \"The practice name.\" },\n { key: \"practice_phone\", from: \"business\", describes: \"The front desk number.\" },\n { key: \"today\", from: \"today\", describes: \"The date the letter went out.\" },\n ],\n },\n\n notificationRule: {\n token: \"harbor_dental_visit_reminder\",\n name: \"Day-before appointment reminder\",\n describes:\n \"A no-show costs the practice the whole chair hour and the hygienist's time. A text the day before is the cheapest thing that prevents it, and it is the first automation any practice turns on.\",\n when: {\n table: \"visit\",\n event: \"due\",\n field: \"appointment_at\",\n daysBefore: 1,\n },\n audience: \"the patient in the chair\",\n channel: \"sms\",\n message:\n \"Harbor Dental: a reminder that you are booked with {{provider}} tomorrow at {{appointment_time}}. Reply C to confirm or call 360 555 0142 if you need to move it.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"lane REAL-DATA (records use-case library)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/ridgeline-physical-therapy-plan-of-care.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Sasha Lindqvist runs Ridgeline Physical Therapy single-handed,\n// and she uses this to carry a patient from a physician's referral through a\n// course of visits to a treatment goal that is either met or honestly written\n// off — without losing track of who is overdue for a re-evaluation.\n//\n// PROVENANCE. The tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/physical-therapy-clinic.json`.\n// Three things were fixed on adoption, each a law the crew's file broke:\n// · the organization was \"Ridgeline Physical Therapy (test fixture)\" — a test\n// organization carries the use case's own name and is found for cleanup by\n// its tag, never by a junk suffix;\n// · patient mailboxes were on `@example-mail.test`, which reads as fake on the\n// screen the owner is looking at;\n// · relations pointed at a patient's NAME, which is not a handle — they now\n// point at the row.\n// Everything the crew's format has no room for — the business identity, the\n// relationship declarations, the form, the pipeline, the dashboard question, the\n// document and the notification rule — was written for this file.\n//\n// Every person, mailbox and phone number below is invented and belongs to nobody.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"ridgeline-physical-therapy-plan-of-care\",\n useCase:\n \"Sasha Lindqvist runs Ridgeline Physical Therapy single-handed, and she uses this to carry a patient from a physician's referral through a course of visits to a treatment goal that is either met or honestly written off, without losing track of who is overdue for a re-evaluation.\",\n industry: \"Physical therapy\",\n cleanupTag: \"use-case:ridgeline-physical-therapy-plan-of-care\",\n\n business: {\n name: \"Ridgeline Physical Therapy\",\n legalName: \"Ridgeline Physical Therapy, LLC\",\n describes: \"A solo outpatient physical therapy practice doing orthopaedic and post-surgical rehabilitation.\",\n address: {\n line1: \"3114 Foothill Boulevard\",\n line2: \"Suite B\",\n city: \"Boise\",\n region: \"ID\",\n postalCode: \"83702\",\n country: \"US\",\n },\n phone: \"+1 208 555 0173\",\n website: \"https://ridgelinept.com\",\n email: \"frontdesk@ridgelinept.com\",\n timezone: \"America/Boise\",\n },\n\n tables: [\n {\n token: \"patients\",\n name: \"Patients\",\n labelSingular: \"Patient\",\n labelPlural: \"Patients\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"user-round\",\n titleField: \"full_name\",\n describes: \"Everyone on the caseload, from referral through discharge.\",\n fields: [\n { key: \"full_name\", label: \"Patient name\", parityType: \"text\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"date_of_birth\", label: \"Date of birth\", parityType: \"datetime\", format: \"date\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"phone\", label: \"Phone\", parityType: \"phone\", format: \"phone\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"email\", label: \"Email\", parityType: \"email\", format: \"email\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"referring_physician\", label: \"Referring physician\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"primary_diagnosis\", label: \"Primary diagnosis\", parityType: \"text\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"insurance_provider\", label: \"Insurance\", parityType: \"select\", choices: [\"Aetna\", \"Blue Cross Blue Shield\", \"UnitedHealthcare\", \"Cigna\", \"Medicare\", \"Self-pay\"], sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"intake_date\", label: \"Intake date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Active\", \"Discharged\", \"On Hold\", \"Referred Out\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"patient-nora-castellan\", values: {\"full_name\": \"Nora Castellan\", \"date_of_birth\": \"1978-03-14\", \"phone\": \"555-201-3341\", \"email\": \"nora.castellan@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Rotator cuff tendinopathy, right shoulder\", \"insurance_provider\": \"Aetna\", \"intake_date\": \"2026-06-02\", \"status\": \"Active\"} },\n { key: \"patient-devon-ashworth\", values: {\"full_name\": \"Devon Ashworth\", \"date_of_birth\": \"1991-11-02\", \"phone\": \"555-201-3342\", \"email\": \"devon.ashworth@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"ACL reconstruction, post-op (6 weeks)\", \"insurance_provider\": \"Blue Cross Blue Shield\", \"intake_date\": \"2026-06-05\", \"status\": \"Active\"} },\n { key: \"patient-priya-vantana\", values: {\"full_name\": \"Priya Vantana\", \"date_of_birth\": \"1965-07-22\", \"phone\": \"555-201-3343\", \"email\": \"priya.vantana@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Chronic low back pain, L4-L5 disc bulge\", \"insurance_provider\": \"Medicare\", \"intake_date\": \"2026-05-19\", \"status\": \"Active\"} },\n { key: \"patient-isaiah-broome\", values: {\"full_name\": \"Isaiah Broome\", \"date_of_birth\": \"2002-01-30\", \"phone\": \"555-201-3344\", \"email\": \"isaiah.broome@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Grade II ankle sprain, left\", \"insurance_provider\": \"UnitedHealthcare\", \"intake_date\": \"2026-07-01\", \"status\": \"Discharged\"} },\n { key: \"patient-marguerite-solano\", values: {\"full_name\": \"Marguerite Solano\", \"date_of_birth\": \"1954-09-08\", \"phone\": \"555-201-3345\", \"email\": \"marguerite.solano@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"Total knee replacement, post-op (3 weeks)\", \"insurance_provider\": \"Medicare\", \"intake_date\": \"2026-06-20\", \"status\": \"Active\"} },\n { key: \"patient-tobias-reinholt\", values: {\"full_name\": \"Tobias Reinholt\", \"date_of_birth\": \"1988-04-17\", \"phone\": \"555-201-3346\", \"email\": \"tobias.reinholt@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Cervical radiculopathy, C6\", \"insurance_provider\": \"Cigna\", \"intake_date\": \"2026-07-10\", \"status\": \"Active\"} },\n { key: \"patient-odalys-fenmore\", values: {\"full_name\": \"Odalys Fenmore\", \"date_of_birth\": \"1997-12-25\", \"phone\": \"555-201-3347\", \"email\": \"odalys.fenmore@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Patellofemoral pain syndrome, bilateral\", \"insurance_provider\": \"Self-pay\", \"intake_date\": \"2026-07-15\", \"status\": \"On Hold\"} },\n { key: \"patient-wendell-okafor\", values: {\"full_name\": \"Wendell Okafor\", \"date_of_birth\": \"1972-02-11\", \"phone\": \"555-201-3348\", \"email\": \"wendell.okafor@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"Plantar fasciitis, right heel\", \"insurance_provider\": \"Aetna\", \"intake_date\": \"2026-06-28\", \"status\": \"Active\"} },\n { key: \"patient-camille-duprez\", values: {\"full_name\": \"Camille Duprez\", \"date_of_birth\": \"1983-06-04\", \"phone\": \"555-201-3349\", \"email\": \"camille.duprez@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Lumbar spinal stenosis\", \"insurance_provider\": \"Blue Cross Blue Shield\", \"intake_date\": \"2026-05-30\", \"status\": \"Active\"} },\n { key: \"patient-griffin-alderete\", values: {\"full_name\": \"Griffin Alderete\", \"date_of_birth\": \"1995-10-19\", \"phone\": \"555-201-3350\", \"email\": \"griffin.alderete@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Achilles tendinopathy, left\", \"insurance_provider\": \"UnitedHealthcare\", \"intake_date\": \"2026-07-18\", \"status\": \"Referred Out\"} },\n ],\n },\n {\n token: \"appointments\",\n name: \"Visits\",\n labelSingular: \"Visit\",\n labelPlural: \"Visits\",\n type: \"entity\",\n display: \"calendar\",\n weight: \"heavy\",\n ordered: true,\n icon: \"calendar-clock\",\n titleField: \"visit_type\",\n describes: \"Every booked appointment, what kind of visit it is and whether it happened.\",\n fields: [\n { key: \"patient\", label: \"Patient\", parityType: \"relation\", required: true, relationTarget: \"patients\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"appointment_date\", label: \"Date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"appointment_time\", label: \"Time\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"visit_type\", label: \"Visit type\", parityType: \"select\", required: true, choices: [\"Initial Evaluation\", \"Follow-up\", \"Re-evaluation\", \"Discharge Visit\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"therapist_name\", label: \"Therapist\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"duration_minutes\", label: \"Length\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Scheduled\", \"Completed\", \"No-show\", \"Cancelled\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"notes\", label: \"Visit notes\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"on_request\" },\n ],\n rows: [\n { key: \"appointment-01\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-02\", \"appointment_time\": \"09:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"AROM shoulder flexion limited to 110 deg, pain 6/10 with overhead reach.\"} },\n { key: \"appointment-02\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-09\", \"appointment_time\": \"09:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Progressing isometrics, pain down to 4/10.\"} },\n { key: \"appointment-03\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-16\", \"appointment_time\": \"09:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Scheduled\", \"notes\": \"\"} },\n { key: \"appointment-04\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-05\", \"appointment_time\": \"13:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Quad lag present, effusion mild. Cleared for closed-chain work.\"} },\n { key: \"appointment-05\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-12\", \"appointment_time\": \"13:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Quad lag resolving, full passive extension achieved.\"} },\n { key: \"appointment-06\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-19\", \"appointment_time\": \"13:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"No-show\", \"notes\": \"Patient did not call.\"} },\n { key: \"appointment-07\", values: {\"patient\": \"patient-priya-vantana\", \"appointment_date\": \"2026-05-19\", \"appointment_time\": \"10:30\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Positive slump test on right, centralization with extension.\"} },\n { key: \"appointment-08\", values: {\"patient\": \"patient-priya-vantana\", \"appointment_date\": \"2026-06-02\", \"appointment_time\": \"10:30\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Symptoms centralizing, tolerating prone press-ups.\"} },\n { key: \"appointment-09\", values: {\"patient\": \"patient-isaiah-broome\", \"appointment_date\": \"2026-07-01\", \"appointment_time\": \"15:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Grade II sprain, moderate swelling, weight-bearing as tolerated.\"} },\n { key: \"appointment-10\", values: {\"patient\": \"patient-isaiah-broome\", \"appointment_date\": \"2026-07-22\", \"appointment_time\": \"15:00\", \"visit_type\": \"Discharge Visit\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 30, \"status\": \"Completed\", \"notes\": \"Full ROM restored, single-leg balance 30s, discharged to home program.\"} },\n { key: \"appointment-11\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-06-20\", \"appointment_time\": \"11:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Knee flexion 85 deg, using front-wheel walker.\"} },\n { key: \"appointment-12\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-06-27\", \"appointment_time\": \"11:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Flexion improved to 100 deg.\"} },\n { key: \"appointment-13\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-07-04\", \"appointment_time\": \"11:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Scheduled\", \"notes\": \"\"} },\n { key: \"appointment-14\", values: {\"patient\": \"patient-tobias-reinholt\", \"appointment_date\": \"2026-07-10\", \"appointment_time\": \"08:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Positive Spurling's test right, numbness in C6 dermatome.\"} },\n { key: \"appointment-15\", values: {\"patient\": \"patient-wendell-okafor\", \"appointment_date\": \"2026-06-28\", \"appointment_time\": \"16:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Point tenderness at medial calcaneal tubercle, worse first step in AM.\"} },\n { key: \"appointment-16\", values: {\"patient\": \"patient-camille-duprez\", \"appointment_date\": \"2026-05-30\", \"appointment_time\": \"09:30\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Symptoms improve with flexion-biased posture, neurogenic claudication at 2 blocks.\"} },\n { key: \"appointment-17\", values: {\"patient\": \"patient-griffin-alderete\", \"appointment_date\": \"2026-07-18\", \"appointment_time\": \"14:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Referred to orthopedic surgeon for imaging before continuing PT.\"} },\n ],\n },\n {\n token: \"treatment_plans\",\n name: \"Treatment plans\",\n labelSingular: \"Treatment plan\",\n labelPlural: \"Treatment plans\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: false,\n icon: \"clipboard-list\",\n titleField: \"diagnosis\",\n describes: \"The goal each patient is working toward, and whether they have met it.\",\n fields: [\n { key: \"patient\", label: \"Patient\", parityType: \"relation\", required: true, relationTarget: \"patients\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"diagnosis\", label: \"Diagnosis\", parityType: \"text\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"goal\", label: \"Goal\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"start_date\", label: \"Start date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_date\", label: \"Target date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Active\", \"Met\", \"Modified\", \"Discontinued\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"plan-nora-castellan\", values: {\"patient\": \"patient-nora-castellan\", \"diagnosis\": \"Rotator cuff tendinopathy, right shoulder\", \"goal\": \"Restore pain-free overhead reach to 160 deg flexion within 6 weeks.\", \"start_date\": \"2026-06-02\", \"target_date\": \"2026-07-14\", \"status\": \"Active\"} },\n { key: \"plan-devon-ashworth\", values: {\"patient\": \"patient-devon-ashworth\", \"diagnosis\": \"ACL reconstruction, post-op\", \"goal\": \"Return to single-leg squat and stair descent without compensation by week 12.\", \"start_date\": \"2026-06-05\", \"target_date\": \"2026-08-28\", \"status\": \"Active\"} },\n { key: \"plan-priya-vantana\", values: {\"patient\": \"patient-priya-vantana\", \"diagnosis\": \"Chronic low back pain, L4-L5 disc bulge\", \"goal\": \"Centralize symptoms and tolerate 30-minute walk without radiating pain.\", \"start_date\": \"2026-05-19\", \"target_date\": \"2026-07-19\", \"status\": \"Active\"} },\n { key: \"plan-isaiah-broome\", values: {\"patient\": \"patient-isaiah-broome\", \"diagnosis\": \"Grade II ankle sprain, left\", \"goal\": \"Full weight-bearing, return to recreational basketball.\", \"start_date\": \"2026-07-01\", \"target_date\": \"2026-07-22\", \"status\": \"Met\"} },\n { key: \"plan-marguerite-solano\", values: {\"patient\": \"patient-marguerite-solano\", \"diagnosis\": \"Total knee replacement, post-op\", \"goal\": \"Achieve 110 deg flexion and walk without assistive device by week 8.\", \"start_date\": \"2026-06-20\", \"target_date\": \"2026-08-15\", \"status\": \"Active\"} },\n { key: \"plan-tobias-reinholt\", values: {\"patient\": \"patient-tobias-reinholt\", \"diagnosis\": \"Cervical radiculopathy, C6\", \"goal\": \"Resolve numbness, restore full cervical rotation.\", \"start_date\": \"2026-07-10\", \"target_date\": \"2026-08-21\", \"status\": \"Active\"} },\n { key: \"plan-wendell-okafor\", values: {\"patient\": \"patient-wendell-okafor\", \"diagnosis\": \"Plantar fasciitis, right heel\", \"goal\": \"Pain-free first step in the morning, return to daily 3-mile walk.\", \"start_date\": \"2026-06-28\", \"target_date\": \"2026-08-09\", \"status\": \"Active\"} },\n { key: \"plan-camille-duprez\", values: {\"patient\": \"patient-camille-duprez\", \"diagnosis\": \"Lumbar spinal stenosis\", \"goal\": \"Increase walking tolerance to 6 blocks without claudication.\", \"start_date\": \"2026-05-30\", \"target_date\": \"2026-08-01\", \"status\": \"Active\"} },\n ],\n },\n {\n token: \"exercises_prescribed\",\n name: \"Home exercises\",\n labelSingular: \"Home exercise\",\n labelPlural: \"Home exercises\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"dumbbell\",\n titleField: \"exercise_name\",\n describes: \"What each patient was told to do between visits, and how it progresses.\",\n fields: [\n { key: \"treatment_plan\", label: \"Treatment plan\", parityType: \"relation\", required: true, relationTarget: \"treatment_plans\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"exercise_name\", label: \"Exercise\", parityType: \"select\", required: true, choices: [\"Pendulum Exercise\", \"Scapular Retraction\", \"Straight Leg Raise\", \"Quadriceps Sets\", \"Heel Slides\", \"Terminal Knee Extension\", \"Prone Press-ups (McKenzie)\", \"Cat-Camel Stretch\", \"Clamshells\", \"Bridging\", \"Standing Hip Abduction\", \"Wall Sits\", \"Calf Raises\", \"Hamstring Curls\", \"Ankle Pumps\", \"Chin Tucks\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"sets\", label: \"Sets\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"reps\", label: \"Reps\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"frequency_per_week\", label: \"Times per week\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"progression_notes\", label: \"Progression notes\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"on_request\" },\n ],\n rows: [\n { key: \"exercises_prescribed-01\", values: {\"treatment_plan\": \"plan-nora-castellan\", \"exercise_name\": \"Pendulum Exercise\", \"sets\": 3, \"reps\": 15, \"frequency_per_week\": 7, \"progression_notes\": \"Started week 1, pain-free arc, add light weight at week 3.\"} },\n { key: \"exercises_prescribed-02\", values: {\"treatment_plan\": \"plan-nora-castellan\", \"exercise_name\": \"Scapular Retraction\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Using resistance band, increase band tension at week 4.\"} },\n { key: \"exercises_prescribed-03\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Quadriceps Sets\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Hold 5 seconds, progressing to straight leg raise next visit.\"} },\n { key: \"exercises_prescribed-04\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Straight Leg Raise\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"No lag observed, add ankle weight 2lb.\"} },\n { key: \"exercises_prescribed-05\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Terminal Knee Extension\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Using resistance band anchored behind knee.\"} },\n { key: \"exercises_prescribed-06\", values: {\"treatment_plan\": \"plan-priya-vantana\", \"exercise_name\": \"Prone Press-ups (McKenzie)\", \"sets\": 2, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"Symptoms centralizing, hold end range 2 seconds.\"} },\n { key: \"exercises_prescribed-07\", values: {\"treatment_plan\": \"plan-priya-vantana\", \"exercise_name\": \"Cat-Camel Stretch\", \"sets\": 2, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Morning stiffness reduced.\"} },\n { key: \"exercises_prescribed-08\", values: {\"treatment_plan\": \"plan-isaiah-broome\", \"exercise_name\": \"Ankle Pumps\", \"sets\": 3, \"reps\": 20, \"frequency_per_week\": 7, \"progression_notes\": \"Early edema control, progressed to standing balance week 2.\"} },\n { key: \"exercises_prescribed-09\", values: {\"treatment_plan\": \"plan-marguerite-solano\", \"exercise_name\": \"Heel Slides\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Flexion improving 5 deg/week.\"} },\n { key: \"exercises_prescribed-10\", values: {\"treatment_plan\": \"plan-marguerite-solano\", \"exercise_name\": \"Quadriceps Sets\", \"sets\": 4, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Hold 5 seconds, no extensor lag.\"} },\n { key: \"exercises_prescribed-11\", values: {\"treatment_plan\": \"plan-tobias-reinholt\", \"exercise_name\": \"Chin Tucks\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"Reduces referred symptoms into arm during session.\"} },\n { key: \"exercises_prescribed-12\", values: {\"treatment_plan\": \"plan-wendell-okafor\", \"exercise_name\": \"Calf Raises\", \"sets\": 3, \"reps\": 15, \"frequency_per_week\": 5, \"progression_notes\": \"Eccentric emphasis, 3-second lower.\"} },\n { key: \"exercises_prescribed-13\", values: {\"treatment_plan\": \"plan-camille-duprez\", \"exercise_name\": \"Bridging\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Flexion-biased, tolerating well.\"} },\n { key: \"exercises_prescribed-14\", values: {\"treatment_plan\": \"plan-camille-duprez\", \"exercise_name\": \"Standing Hip Abduction\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Added ankle weight this week.\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A visit belongs to the patient who attends it, and it dies with their chart.\",\n fromTable: \"appointments\",\n fromField: \"patient\",\n toTable: \"patients\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"visits\",\n },\n {\n describes: \"A treatment plan belongs to the patient it sets a goal for.\",\n fromTable: \"treatment_plans\",\n fromField: \"patient\",\n toTable: \"patients\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"treatment_plans\",\n },\n {\n describes: \"A home exercise is prescribed under exactly one treatment plan and ends with it.\",\n fromTable: \"exercises_prescribed\",\n fromField: \"treatment_plan\",\n toTable: \"treatment_plans\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"exercises\",\n },\n ],\n\n form: {\n token: \"ridgeline_new_patient_referral\",\n name: \"Ridgeline new-patient referral intake\",\n describes:\n \"What a referred patient fills in before the initial evaluation, so the first visit is spent examining them rather than typing.\",\n audience: \"public\",\n table: \"patients\",\n fields: [\n { fieldKey: \"full_name\", label: \"Your full name\", required: true },\n { fieldKey: \"date_of_birth\", label: \"Date of birth\", required: true },\n { fieldKey: \"phone\", label: \"Best number to reach you\", required: true },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"referring_physician\", label: \"Who referred you?\", required: true, help: \"The doctor's name on your referral, so we can send them your plan of care.\" },\n { fieldKey: \"primary_diagnosis\", label: \"What are you coming in for?\", help: \"In your own words is fine — we will write the clinical version.\" },\n { fieldKey: \"insurance_provider\", label: \"Insurance\", help: \"Choose Self-pay if you would rather not bill insurance.\" },\n ],\n submitLabel: \"Send my referral details\",\n confirmation:\n \"Thank you — we have your details. We will verify your benefits and call you within one business day to book your initial evaluation, which takes about an hour.\",\n },\n\n pipeline: {\n token: \"ridgeline_plan_of_care\",\n name: \"Plan of care\",\n describes:\n \"What happens to a treatment goal once it is written. Sasha reviews this board every Friday, because a plan that sits in Active past its target date is the one that quietly fails.\",\n table: \"treatment_plans\",\n stageField: \"status\",\n stages: [\n { key: \"Active\", label: \"Active\", describes: \"The patient is working toward the goal and attending visits. Leaves when the goal is met, changed or abandoned.\", typicalDurationDays: 42 },\n { key: \"Modified\", label: \"Modified\", describes: \"Re-evaluation changed the goal or the timeline — progress was faster or slower than predicted.\", typicalDurationDays: 21 },\n { key: \"Met\", label: \"Met\", describes: \"The measured goal was reached. This is what discharge is built on and what the referring physician is told.\" },\n { key: \"Discontinued\", label: \"Discontinued\", describes: \"Stopped without meeting the goal — the patient withdrew, was referred out, or their insurance ran out. Written down honestly rather than left Active.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"How many plans are still Active past the date I said they would be finished?\",\n whyItMatters:\n \"A plan sitting Active past its target date means a patient is being treated without anyone re-checking whether the treatment is working. Every one of those needs a re-evaluation booked this week, or a decision to change the goal.\",\n table: \"treatment_plans\",\n aggregate: \"count\",\n groupBy: \"status\",\n filter: \"status is 'Active' and target_date is before today\",\n answerUnit: \"treatment plans\",\n },\n\n documentTemplate: {\n token: \"ridgeline_plan_of_care_letter\",\n name: \"Plan of care letter to the referring physician\",\n describes:\n \"Goes back to the doctor who made the referral, at the start of care and again at discharge. Physicians refer again when they hear what happened to the last patient they sent, which makes this letter the practice's whole marketing plan.\",\n table: \"treatment_plans\",\n title: \"Plan of care — {{diagnosis}}\",\n body: [\n \"Thank you for the referral.\",\n \"\",\n \"Following evaluation I have started a course of treatment for {{diagnosis}}.\",\n \"\",\n \"Goal: {{goal}}\",\n \"\",\n \"Care began on {{start_date}} and I expect to reach that goal by {{target_date}}. The plan is currently {{status}}. The patient is on a home exercise programme between visits, and I re-evaluate objectively rather than by report.\",\n \"\",\n \"I will write again at discharge with the measured outcome. If anything in the history changes at your end, please tell me — it usually changes the plan.\",\n \"\",\n \"{{practice_name}}\",\n \"{{practice_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"diagnosis\", from: \"diagnosis\", describes: \"What is being treated.\" },\n { key: \"goal\", from: \"goal\", describes: \"The measurable goal, in the words the physician will be told at discharge.\" },\n { key: \"start_date\", from: \"start_date\", describes: \"When care began.\" },\n { key: \"target_date\", from: \"target_date\", describes: \"When the goal is expected to be met.\" },\n { key: \"status\", from: \"status\", describes: \"Where the plan stands today.\" },\n { key: \"practice_name\", from: \"business\", describes: \"The practice name.\" },\n { key: \"practice_phone\", from: \"business\", describes: \"The number the physician's office calls back on.\" },\n { key: \"today\", from: \"today\", describes: \"The date the letter went out.\" },\n ],\n },\n\n notificationRule: {\n token: \"ridgeline_plan_past_target\",\n name: \"A plan has passed its target date\",\n describes:\n \"The one automation a solo therapist genuinely needs: nobody else is watching the caseload, so a goal that quietly slips past its date has to come and find her.\",\n when: {\n table: \"treatment_plans\",\n event: \"overdue\",\n field: \"target_date\",\n },\n audience: \"the treating therapist\",\n channel: \"in_app\",\n message:\n \"{{diagnosis}} has passed its target date of {{target_date}} and is still {{status}}. Book a re-evaluation or change the goal.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/index.ts — @ai-matrx/records/use-cases\n//\n// THE LIBRARY OF REAL USE CASES: the one source every test, seed, demo,\n// fixture and screenshot script in the platform draws its data from.\n//\n// The owner's law, 2026-09-21 — \"before entering any test data, name the real\n// use case in one sentence: who the user is, what business they run, what job\n// this exact feature does for them.\" This package is where that sentence, and\n// the data that follows from it, lives once.\n//\n// HOW TO USE IT\n//\n// import { loadUseCase, useCaseFor } from \"@ai-matrx/records/use-cases\";\n//\n// // A suite, a demo or a screenshot script names ITSELF and gets a stable\n// // business — rotated across industries so the platform is exercised broadly.\n// const useCase = await loadUseCase(useCaseFor(\"records/door-write-suite\"));\n//\n// // Then seed through the real doors. Validate first: a half-valid dataset\n// // produces a screen that looks like it worked.\n// assertUseCase(useCase);\n//\n// HOW TO ADD ONE — see ./README.md. One file, one line in ./registry.ts.\n\nexport * from \"./types\";\nexport * from \"./placeholders\";\nexport * from \"./validate\";\nexport * from \"./registry\";\n","// src/use-cases/placeholders.ts — @ai-matrx/records/use-cases\n//\n// THE BANNED PATTERNS, IN ONE PLACE.\n//\n// The owner's law, 2026-09-21: no test, fixture, seed, demo or screenshot may\n// carry placeholder junk. This file is the single list of what \"junk\" means,\n// and it is deliberately shared by two consumers that must never disagree:\n//\n// 1. `validateUseCase` — so a use-case template that slips into junk fails\n// its own suite, in this package, at build time.\n// 2. the repo guards (`check:no-placeholder-data` in matrx-frontend and\n// aidream) — so a test or seed file anywhere in the platform fails the\n// build for the same reason, by the same rule, with the same sentence.\n//\n// WHY THE LIST IS SHORTER THAN THE BRIEF'S\n// ----------------------------------------\n// The brief also names `bar`, `widget` and `placeholder`. Each of those is a\n// real English word this platform uses constantly — a bar chart, a dashboard\n// widget, an input's placeholder attribute — and a guard that goes red on\n// `toolbar` is a guard people switch off within a day. So `bar`/`baz`/`qux` are\n// caught only as a WHOLE quoted value (\"bar\"), which is the form that is\n// actually placeholder junk, and `widget`/`placeholder` are not patterns at\n// all. The rule is: catch the junk, never the vocabulary.\n//\n// THE ESCAPE HATCH, AND WHY IT IS VISIBLE\n// ---------------------------------------\n// A line carrying `matrx-real-data:allow <reason>` is exempt. That is how the\n// one legitimate \"Dana Whitfield\" survives, how a test that asserts the guard's\n// own refusal can contain the junk it asserts on, and how a genuine third-party\n// fixture keeps its upstream values. The reason is required and it is in the\n// diff, so an exemption is a decision somebody made on purpose — never a\n// silent hole.\n\n/** One banned pattern, with the reason and what to do instead. */\nexport interface PlaceholderPattern {\n /** Stable id, used in the guard's output so a failure is greppable. */\n id: string;\n /** Matches the junk. Always global + case-insensitive. */\n test: RegExp;\n /** What is wrong with it, in one line. */\n why: string;\n /** What to write instead. */\n instead: string;\n /**\n * Skip the hit when the LINE it sits on matches this. For words that are junk\n * in one world and vocabulary in another: \"Acme\" is a cartoon company, but\n * ACME is also RFC 8555, the protocol Let's Encrypt speaks, and a guard that\n * cannot tell them apart will be told to shut up rather than obeyed.\n */\n unlessLineMatches?: RegExp;\n /** Fire only when the WHOLE text matches this (a rule about a kind of file, not a kind of line). */\n onlyInTextMatching?: RegExp;\n}\n\n/**\n * The pragma that exempts a single line. The reason is not optional: a bare\n * `matrx-real-data:allow` does not match and does not exempt anything.\n */\nexport const ALLOW_PRAGMA = /matrx-real-data:allow\\s+\\S+/i;\n\n/**\n * THE LIST. Every entry is anchored on word boundaries so it catches the token\n * and not the vocabulary it lives inside.\n */\nexport const PLACEHOLDER_PATTERNS: readonly PlaceholderPattern[] = [\n {\n id: \"acme\",\n test: /\\bacme\\b/gi,\n why: \"'Acme' is the cartoon of a company and tells the owner nothing about whether the product works.\",\n instead: \"Name the real business the use case is about — 'Harbor Dental Group', 'Blue Ridge Recycling'.\",\n // RFC 8555. \"ACME account\", \"ACME challenge\", \"Let's Encrypt\" — a real\n // protocol that happens to share the cartoon's name.\n unlessLineMatches:\n /let'?s encrypt|rfc\\s*8555|certificate|\\bacme\\s+(?:account|protocol|challenge|directory|client|server|ca)\\b|\\b(?:tls|ssl|dns-01|http-01)\\b/i,\n },\n {\n id: \"metasyntactic\",\n // foo, baz, qux, quux are never anybody's word. \"bar\" is: a bar chart, a wine bar, a\n // \"Bar\" choice on a restaurant's seating list — so it is junk only beside foo/baz,\n // and then foo/baz already catch it.\n test: /\\bfoo\\b|\\bbaz\\b|\\bqux\\b|\\bquux\\b|\\bfoobar\\b/gi,\n why: \"foo / bar / baz are stand-ins for data nobody thought about.\",\n instead: \"Use the practitioner's own word for the thing — a field is 'po_number', not 'foo'.\",\n },\n {\n id: \"lorem-ipsum\",\n test: /\\blorem\\b|\\bipsum\\b|\\bdolor sit amet\\b/gi,\n why: \"Lorem ipsum is a picture of text, not text. A screenshot of it proves nothing.\",\n instead: \"Write the sentence this business would really send.\",\n },\n {\n // TWO Zs, NOT THREE (widened 2026-09-21, lane ZZ-SWEEP-2). `ZZ W4-AGG Red`,\n // `ZZ HQ`, `zz_a_deal` are the same junk as `ZZZ …` and were the larger\n // half of it: 791 of them across 88 campaign-suite files when this widened.\n //\n // BUT A LEADING `zz` ON A DATABASE TRIGGER IS NOT A NAME, IT IS AN ORDERING\n // DEVICE. PostgreSQL fires triggers in alphabetical order of their name and\n // gives no other way to say \"last\", so this platform spells \"last\" with\n // z's: 591 live triggers across 79 distinct names — `zz0_table_owner`,\n // `zz_memo_clear_i`, `zzz_history_capture_s_u`, `zzzz_unique_rule_holds` —\n // where each extra z buys another rung. A suite that asserts which triggers\n // fire on `custom.record` MUST quote those names exactly. Reddening on them\n // would be this file's own \"catch the junk, never the vocabulary\" rule\n // broken, so a line that is talking about triggers is exempt.\n id: \"zzz-prefix\",\n test: /\\bzz+[\\s_-]/gi,\n unlessLineMatches: /\\btriggers?\\b|\\btgname\\b|\\btgrelid\\b|\\btgenabled\\b|\\bpg_trigger\\b/i,\n why: \"A 'ZZ …' / 'ZZZ …' name exists to sort test rows to the bottom and to be deleted; it makes every screen look broken.\",\n instead: \"Give it the use case's own name and find it for cleanup by the organization's cleanup tag. (On a TRIGGER the prefix is a firing-order device, not a name — say 'trigger' on the line and it is exempt.)\",\n },\n {\n // ADDED 2026-09-23, lane ORG-CLEANUP-2, after 48 organizations named \"Throwaway Dash\n // 3fee58c2\", \"Throwaway Pipe 21d0e260\" walked back onto the owner's organization\n // picker overnight and this list could not see ONE of them: 28 of the 48 carried no\n // `zz` at all. \"Throwaway\" is the word a test writes when it means \"I will delete this\n // later\", and later never comes — the row outlives the run and the screen shows it.\n //\n // `iam.placeholder_in_a_name(name, slug)` on the platform database carries the SAME\n // list and refuses these at the organization door; the two are deliberate mirrors and\n // a pattern added to one belongs in the other.\n id: \"throwaway\",\n test: /\\bthrow[\\s_-]?away\\b|\\bdisposable[\\s_-]org|\\bsafe[\\s_-]to[\\s_-]delete\\b|\\btest[\\s_-]only\\b/gi,\n why: \"'Throwaway' / 'safe to delete' is a promise to clean up later that nothing keeps — the row survives the run and shows up on the owner's screen.\",\n instead:\n \"Name it after the real business the use case is about, reuse the SAME one by slug run after run, and carry the classification in settings.test_fixture so cleanup can find it.\",\n },\n {\n id: \"test-table\",\n test: /\\btest[\\s_-]table\\b|\\bmy[\\s_-]table\\b|\\bsample[\\s_-]table\\b/gi,\n why: \"'Test table' is not a thing any business has.\",\n instead: \"Name the table the way the practitioner says it: 'Work orders', 'Patients', 'Pickup routes'.\",\n },\n {\n id: \"test-organization\",\n test: /\\btest[\\s_-]org(?:anization|anisation)?\\b|\\bdemo[\\s_-]co(?:mpany|rp)?\\b|\\bsample[\\s_-]co(?:mpany|rp)?\\b/gi,\n why: \"A test organization with a test name makes every screenshot worthless.\",\n instead: \"Give the organization the use case's business name; tag it in settings for cleanup.\",\n },\n {\n id: \"sequential-names\",\n // A LEADING ZERO is a counter (\"Job 001\", \"Order 0042\"); so is a number after a word that\n // names nothing (\"Item 3\", \"Row 12\", \"Record 7\"). A business's own numbers — \"Job 2201\",\n // \"Order 10418\" — pass here; a column whose numbers run 1, 2, 3… is caught by the template\n // validator, which can see the whole column.\n test: /\\b(?:job|item|row|record|table|field|form|task|order|client|customer|product|user|thing|entry|note|project)[\\s_-]0\\d{1,4}\\b|\\b(?:item|row|record|table|field|thing|entry)[\\s_-]\\d{1,4}\\b/gi,\n why: \"'Job 001', 'Item 3', 'Client 12' are counters wearing a name. Nothing in a real business is called that.\",\n instead: \"Use the real identifier the business uses — an invoice number, a chart number, a route name.\",\n },\n {\n id: \"example-domain\",\n test: /@example\\.(?:com|org|net)\\b|\\b[a-z0-9-]+\\.example\\b|\\bexample\\.(?:com|org|net)\\b/gi,\n why: \"A '.example' address reads as fake on the screen the owner is looking at.\",\n instead:\n \"A test PERSON comes from the persona factory (aidream/aidream/testing/persona.py, matrx-frontend scripts/lib/persona.mjs): its mailbox is on fixtures.aimatrx.com, a domain we own that can never reach a real inbox. Seed data inside a template keeps the business's own invented domain; never invent a domain a real company might own.\",\n },\n {\n id: \"doe-names\",\n test: /\\bjohn doe\\b|\\bjane doe\\b|\\bdana whitfield\\b|\\btest user\\b|\\btest patient\\b|\\btest client\\b/gi,\n why: \"A repeated stand-in person is the tell that nobody modelled the domain.\",\n instead: \"Synthesize varied, plausible people who belong to nobody — and never copy a real person.\",\n },\n {\n // THE CHAIR'S RULING, 2026-09-21. People in a template are fictional but\n // REALISTIC, and a realistic person's mailbox is a mailbox — not a mailbox\n // with a counter welded to the end of it. `linda.reyes0@…`,\n // `wei.singh.m34@…` are the tell that a loop wrote the row, and the owner\n // reads a whole column of them as one fake person repeated.\n //\n // NARROW ON PURPOSE: it fires only when the local part is name-shaped\n // (two or more words joined by . _ or -) AND ends in a bare counter. That\n // is exactly the generator's signature and leaves the real mailboxes a\n // business has — `support365@`, `ap2@`, `frontdesk@` — alone.\n id: \"suffixed-mailbox\",\n test: /\\b[a-z]+(?:[._-][a-z]+)+\\d{1,3}@/gi,\n why: \"A mailbox whose name ends in a counter (linda.reyes0@, wei.singh.m34@) is a generated row wearing a person's name.\",\n instead:\n \"Give each person their own mailbox on the fictional business's own domain — 'linda.reyes@handsandhopealliance.org' — and vary the people instead of numbering one.\",\n },\n {\n // THE CHAIR'S RULING, 2026-09-21. \"Test fixture\" is a CLASSIFICATION, and a\n // classification lives in the organization's kind/metadata — the\n // `test_fixture` flag in its settings, which is how cleanup finds it. It is\n // never part of a NAME, because a name is what the owner reads on the\n // screen and \"Birchwood Ave Renovation (test fixture)\" tells him the\n // product is a rehearsal.\n //\n // The settings KEY is the right place, so a line that is writing the key is\n // exempt; a line that is writing the words into text is not.\n id: \"fixture-in-name\",\n test: /\\(\\s*test\\s+fixture\\s*\\)|\\btest[\\s_-]fixture\\b|\\bfixture[\\s_-]org(?:anization|anisation)?\\b/gi,\n unlessLineMatches:\n /[\"'`]?test_fixture[\"'`]?\\s*[:=]|\\bp_settings\\b|\\bcleanupTag\\b|\\bsettings\\.[a-z_]*fixture\\b/i,\n why: \"'Test fixture' is a classification, not a name. In a name it tells the owner the screen he is looking at is a rehearsal.\",\n instead:\n \"Name the organization after the business the use case is about, and carry the classification in its settings (`test_fixture: true`), which is also how cleanup finds it.\",\n },\n {\n id: \"keyboard-mash\",\n test: /\\basdf+\\b|\\bqwerty\\b|\\bxxx+\\b|\\btodo name\\b|\\bfixme\\b|\\btbd\\b/gi,\n why: \"Keyboard mash and TODO markers are unfinished data shipped as if it were finished.\",\n instead: \"Write the value the business would really have there.\",\n },\n] as const;\n\n/**\n * THE ACCOUNT DOORS (junk-data-cleanup, 2026-09-30).\n *\n * `PLACEHOLDER_PATTERNS` guards data a SCREEN shows. These guard how a test, script or\n * agent makes a PERSON: agents hand-made `zzz.*@example.invalid` accounts with inline\n * scripts and MCP SQL, ran them once against the live database and never deleted them (28\n * reserved-TLD accounts, 0 of 1,520 carrying any test marker). They are applied only to\n * scripts and tests (`ACCOUNT_DOOR_SCOPE` in each guard), never product code: the\n * portal-invite route and guest sign-in create real accounts on purpose.\n *\n * The one lawful door is the persona factory (aidream/aidream/testing/persona.py,\n * matrx-frontend scripts/lib/persona.mjs): a realistic person, tagged\n * `app_metadata.test_fixture` with an expiry, on `fixtures.aimatrx.com`. The exemption is a\n * line pragma, NOT `matrx-real-data:allow`:\n *\n * matrx-fixture:rollback-only <reason> the account lives in a transaction that is rolled back\n * matrx-fixture:factory-only <reason> the factory's own call to the admin door\n * matrx-fixture:read-only <reason> the line reads or looks up an account, never creates one\n * matrx-fixture:named-permanent <reason> a NAMED permanent fixture the script tags itself (expires_at null)\n * matrx-fixture:not-a-person <reason> the name looks like a junk head but is a stub, never an account or row\n *\n * The reason is required and it is in the diff.\n */\nexport const FIXTURE_PRAGMA = /matrx-fixture:(?:rollback-only|factory-only|read-only|not-a-person|named-permanent)\\s+\\S+/i;\n\n/**\n * A file that CREATES accounts. Reserved-TLD mailboxes are everywhere in plumbing tests that mock\n * a mail parser, a proxy URL or a DSN and never touch auth; the junk-account class is the file that\n * also makes an auth user, so `reserved-tld-mailbox` fires only in such a file.\n */\nexport const ACCOUNT_CREATION_SIGNAL =\n /insert\\s+into\\s+\"?auth\"?\\.\"?users\"?|\\/auth\\/v1\\/(?:admin\\/users|signup|invite)|auth\\.admin\\.create_?user|admin\\.create_?user\\s*\\(|\\bsign_?up\\s*\\(|invite_?user_?by_?email|\\bcreate_?user\\s*\\(/i;\n\n/** A runtime-built junk head: `zzz.`, `verify-`, `fixture-`, `throwaway`, `probe-`, `tmp-`, `e2e-` + an interpolation. */\nconst JUNK_HEAD = \"(?:zz+[._-]|verify-|fixture-|throw-?away[._-]?|probe-|tmp-|e2e-)\";\nconst INTERPOLATION = \"(?:\\\\$\\\\{[^}]*\\\\}|\\\\{[^}]*\\\\}|%s|%\\\\([a-z_]+\\\\)s)\";\n\nexport const ACCOUNT_DOOR_PATTERNS: readonly PlaceholderPattern[] = [\n {\n // The census found live accounts whose names were MADE AT RUNTIME (`f\"zzz.{tag}.{n}@example.invalid\"`),\n // so no literal ever appeared in source for the text patterns above to catch.\n id: \"runtime-junk-name\",\n test: new RegExp(\n // a mailbox built from a junk head: f\"zzz.{tag}@…\", `fixture-${id}@…`, \"verify-%s@…\"\n `(?:\\\\b[fr]{1,2})?[\"'\\`]${JUNK_HEAD}[\\\\w.+-]*${INTERPOLATION}[^\"'\\`]*@` +\n // ...or a name/slug/email/title assignment that does\n `|\\\\b(?:name|slug|email|title|label)\\\\w*[\"']?\\\\s*[:=]\\\\s*(?:\\\\b[fr]{1,2})?[\"'\\`]${JUNK_HEAD}[\\\\w.+-]*${INTERPOLATION}`,\n \"gi\",\n ),\n unlessLineMatches: FIXTURE_PRAGMA,\n why: \"A name or mailbox built at runtime from zzz / verify- / fixture- / throwaway / probe- / tmp- / e2e- is a junk row nothing will ever clean up, and no source scan can see it once it exists.\",\n instead:\n \"Make the person with the persona factory (aidream/aidream/testing/persona.py or scripts/lib/persona.mjs): realistic, tagged with an expiry, and swept even if your teardown never runs.\",\n },\n {\n id: \"reserved-tld-mailbox\",\n test: /@[a-z0-9-]+(?:\\.[a-z0-9-]+)*\\.(?:invalid|test|example)\\b/gi,\n unlessLineMatches: FIXTURE_PRAGMA,\n onlyInTextMatching: ACCOUNT_CREATION_SIGNAL,\n why: \"A reserved-TLD mailbox (.invalid, .test, .example) reads as junk on every screen and, when it is a real auth user, is never deleted.\",\n instead:\n \"Use the persona factory: its mailbox is on fixtures.aimatrx.com. If the account lives only inside a transaction that is rolled back, say so on the line: matrx-fixture:rollback-only <reason>.\",\n },\n {\n id: \"raw-auth-user-creation\",\n test: /insert\\s+into\\s+\"?auth\"?\\.\"?users\"?|\\/auth\\/v1\\/admin\\/users(?!\\/)|auth\\.admin\\.create_?user\\b|admin\\.create_?user\\s*\\(/gi,\n unlessLineMatches: FIXTURE_PRAGMA,\n why: \"An auth user made outside the persona factory carries no test tag and no expiry, so it outlives the run and nobody can tell it from a person.\",\n instead:\n \"Call create_fixture_user / fixture_user (aidream/aidream/testing/persona.py) or createFixtureUser / withFixtureUser (scripts/lib/persona.mjs). A rolled-back raw insert is allowed with a trailing matrx-fixture:rollback-only <reason> on the same line.\",\n },\n] as const;\n\n/** Every account-door violation in `text`. Line-scoped: one pragma never blinds the rest of a file. */\nexport function findAccountDoorViolations(text: string): PlaceholderHit[] {\n const hits: PlaceholderHit[] = [];\n const active = ACCOUNT_DOOR_PATTERNS.filter((p) => !p.onlyInTextMatching || p.onlyInTextMatching.test(text));\n if (active.length === 0) return hits;\n text.split(\"\\n\").forEach((line, index) => {\n if (/^\\s*(?:\\/\\/|#|--|\\*|\\/\\*)/.test(line)) return; // prose, not a value\n for (const pattern of active) {\n if (pattern.unlessLineMatches?.test(line)) continue;\n pattern.test.lastIndex = 0;\n for (const match of line.matchAll(pattern.test)) {\n hits.push({ patternId: pattern.id, match: match[0], why: pattern.why, instead: pattern.instead, line: index + 1 });\n }\n }\n });\n return hits;\n}\n\n/** One hit of one pattern. */\nexport interface PlaceholderHit {\n patternId: string;\n /** The exact text that matched. */\n match: string;\n why: string;\n instead: string;\n /** 1-based line, set by `findAccountDoorViolations`. */\n line?: number;\n}\n\n/**\n * Every banned pattern in `text`, ignoring any LINE carrying the allow pragma.\n *\n * Line-scoped rather than whole-text so one exemption never blinds the rest of\n * a file, which is the failure mode of a file-level ignore comment.\n */\nexport function findPlaceholders(text: string): PlaceholderHit[] {\n const hits: PlaceholderHit[] = [];\n const lines = text.split(\"\\n\");\n for (const line of lines) {\n if (ALLOW_PRAGMA.test(line)) continue;\n for (const pattern of PLACEHOLDER_PATTERNS) {\n if (pattern.unlessLineMatches?.test(line)) continue;\n // Fresh lastIndex every line: these are global regexes and they are shared.\n pattern.test.lastIndex = 0;\n for (const match of line.matchAll(pattern.test)) {\n hits.push({\n patternId: pattern.id,\n match: match[0],\n why: pattern.why,\n instead: pattern.instead,\n });\n }\n }\n }\n return hits;\n}\n\n/** The sentence a guard or a suite prints for one hit. Never a bare code. */\nexport function describePlaceholder(hit: PlaceholderHit): string {\n return `placeholder data \"${hit.match}\" (${hit.patternId}): ${hit.why} ${hit.instead}`;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// BANNED LABELS — the junk that hides in a NAME, not in a line of text\n// ─────────────────────────────────────────────────────────────────────────────\n//\n// `PLACEHOLDER_PATTERNS` scans text. These judge ONE label at a time — a table's name, a\n// field's label, a choice, a person's name in a name column — where a single word like\n// \"Item\" or \"Value\" is the whole label and is junk precisely because it is ALL there is.\n// They are deliberately not in PLACEHOLDER_PATTERNS: the repo guards scan code, where\n// \"value\" and \"data\" are vocabulary. Both guards and the template validator import this\n// file, so what a label may be is decided once.\n\nexport type LabelKind = \"table\" | \"field\" | \"choice\" | \"person\" | \"title\";\n\nexport interface BannedLabel {\n id: string;\n test: RegExp;\n kinds: readonly LabelKind[];\n why: string;\n}\n\nconst GENERIC_NOUN = \"records?|item|values?|details?|data|info(?:rmation)?|misc(?:ellaneous)?|stuff|things?|entr(?:y|ies)|objects?|documents?|reports?\";\n\nexport const BANNED_LABELS: readonly BannedLabel[] = [\n {\n id: \"generic-noun\",\n test: new RegExp(`^\\\\s*(?:my\\\\s+|the\\\\s+|new\\\\s+|other\\\\s+)?(?:${GENERIC_NOUN})(?:\\\\s+field)?\\\\s*$`, \"i\"),\n // A TABLE called \"Records\", or the column that names each record called \"Item\", tells a\n // person nothing. An ordinary column called \"Details\" or a choice called \"Documents\" is fine.\n kinds: [\"table\", \"title\"],\n why: \"a word for any kind of thing (like \\\"Records\\\" or \\\"Details\\\"), not the name this business uses for it\",\n },\n {\n id: \"numbered-label\",\n // A COUNTER is digits, or ONE letter standing apart (\"Option A\", \"Status 1\", \"Field #3\"). A\n // plural is a word, not a counter: \"Clients\", \"Stages\", \"Technicians\" are labels a business uses.\n test: /^\\s*(?:field|column|option|choice|status|type|category|stage|step|tag|group|level|person|user|customer|client|contact|employee|staff|member|technician|agent|team)(?:\\s*#?\\s*\\d+|\\s+#?\\s*[a-z])\\s*$/i,\n kinds: [\"table\", \"field\", \"choice\", \"person\", \"title\"],\n why: \"a generic word with a number or letter after it (like \\\"Option A\\\" or \\\"Status 1\\\"), which names nothing\",\n },\n {\n id: \"other-field\",\n test: /^\\s*other\\s+(?:field|column|value|info)\\s*$/i,\n kinds: [\"field\", \"choice\"],\n why: \"'Other field' is a slot nobody designed\",\n },\n {\n id: \"role-letter-person\",\n test: /^\\s*[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)?\\s+(?:[A-Z]|\\d{1,3})\\s*$/,\n kinds: [\"person\"],\n why: \"a role and a letter ('Technician A', 'Nurse 2') is a placeholder, not a person\",\n },\n];\n\n/** The first banned-label rule `label` breaks for its kind, or null. */\nexport function findBannedLabel(label: string, kind: LabelKind): BannedLabel | null {\n for (const rule of BANNED_LABELS) if (rule.kinds.includes(kind) && rule.test.test(label)) return rule;\n return null;\n}\n","// src/store.generated.ts — @ai-matrx/records\n//\n// GENERATED. Do not edit by hand: `pnpm records:generate` rewrites it from the\n// live record store, and `pnpm check:store-registry` fails the build when this\n// file and the store disagree. Every literal below was read from the database's\n// own catalogue — the vocabularies from the store's vocabulary functions, the\n// parity types from `custom.parity_field_types()`, the doors from `pg_proc`,\n// the kernel ids from the kernel rows themselves, the tokens from\n// `platform.entity_types`.\n//\n// Counts at generation: 3 actor words, 4 absence\n// reasons, 14 parity field types, 29 declarable field kinds,\n// 76 rule node kinds,\n// 9 kernel Tables, 912 doors, 70 knobs,\n// 1102 entity tokens.\n\nexport const ACTOR_VOCABULARY = [\"user\", \"agent\", \"system\"] as const;\n\n/** The three words the store still accepts and rewrites, and what each becomes. */\nexport const RETIRED_ACTOR_WORDS = {\"ai\": \"agent\", \"code\": \"system\", \"human\": \"user\"} as const;\n\nexport const ABSENCE_REASONS = [\"never asked\", \"none\", \"refused\", \"conflicting\"] as const;\n\nexport const VALUE_ENVELOPE_KEYS = [\"ver\", \"src\", \"actor\", \"on_behalf_of\", \"at\", \"absent\", \"alternates\", \"dated\", \"pinned\"] as const;\n\nexport const VALUE_ALTERNATE_KEYS = [\"value\", \"src\", \"rank\"] as const;\n\nexport const STORAGE_MODES = [\"light\", \"heavy\"] as const;\n\nexport const RULE_USES = [\"validate\", \"compute\", \"membership\", \"applicability\"] as const;\n\nexport const PER_VALUE_ACCESS_WORDS = [\"visibility\", \"access\", \"share\", \"acl\", \"permission\", \"permissions\", \"secret\"] as const;\n\n/** FLD-11's parity floor, each with the behaviour it is MADE OF (FLD-1). */\nexport const PARITY_FIELD_TYPES = [\n { parity_type: \"attachment\", behavior: \"relation\", made_of: \"REC-31: a File record reached through a relation, target the kernel `File` Table\" },\n { parity_type: \"checkbox\", behavior: \"boolean\", made_of: \"a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two\" },\n { parity_type: \"currency\", behavior: \"range\", made_of: \"FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation\" },\n { parity_type: \"datetime\", behavior: \"range\", made_of: \"a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question\" },\n { parity_type: \"email\", behavior: \"text\", made_of: \"text whose format is email\" },\n { parity_type: \"formula\", behavior: \"formula\", made_of: \"FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval\" },\n { parity_type: \"lookup\", behavior: \"formula\", made_of: \"a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side\" },\n { parity_type: \"member\", behavior: \"relation\", made_of: \"a person: a relation whose target is the kernel `Person` Table\" },\n { parity_type: \"multi_select\", behavior: \"list\", made_of: \"many choices from the same Table — the multi modifier, never a second behaviour\" },\n { parity_type: \"percent\", behavior: \"range\", made_of: \"a number whose unit is % and whose format is percent\" },\n { parity_type: \"phone\", behavior: \"text\", made_of: \"text whose format is phone\" },\n { parity_type: \"rollup\", behavior: \"formula\", made_of: \"an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice\" },\n { parity_type: \"select\", behavior: \"list\", made_of: \"one choice from a Table shown as a list (FLD-5/FLD-6)\" },\n { parity_type: \"url\", behavior: \"text\", made_of: \"text whose format is url, with the pattern Rule that makes the format enforceable\" },\n] as const;\n\n/**\n * THE ONE REGISTRY: every kind a column can be DECLARED as, from\n * `custom.field_kinds()`. `parity` says whether the kind is one of FLD-11's parity\n * floor; the rest are the behaviours and formats the declaration door answers to and\n * nothing else enumerated — which is how `signature` came to be a shape\n * `custom.doc_sign` accepted and no screen could offer.\n */\nexport const DECLARABLE_FIELD_KINDS = [\n { kind: \"address\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format address; the value is {street, city, region, postal_code, country}, every part optional, at least one filled\" },\n { kind: \"attachment\", behavior: \"relation\", parity: true, made_of: \"REC-31: a File record reached through a relation, target the kernel `File` Table\" },\n { kind: \"barcode\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format barcode; one printable line a scanner reads, config.symbology optional (custom.barcode_symbologies()), EAN/UPC digits and check digit enforced\" },\n { kind: \"checkbox\", behavior: \"boolean\", parity: true, made_of: \"a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two\" },\n { kind: \"count\", behavior: \"formula\", parity: false, made_of: \"P4: a roll-up whose config.agg is count, with format count: how many records a many-relation points at, as a number of its own\" },\n { kind: \"created_by\", behavior: \"formula\", parity: false, made_of: \"P4: a formula Field whose config.system is created_by: who made the record, {id, name}, filled by the store from the record's writer on read and never typed\" },\n { kind: \"currency\", behavior: \"range\", parity: true, made_of: \"FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation\" },\n { kind: \"datetime\", behavior: \"range\", parity: true, made_of: \"a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question\" },\n { kind: \"duration\", behavior: \"range\", parity: false, made_of: \"P4: behaviour range, format duration, unit seconds; a length of time kept as seconds, never below zero\" },\n { kind: \"email\", behavior: \"text\", parity: true, made_of: \"text whose format is email\" },\n { kind: \"entity_reference\", behavior: \"relation\", parity: false, made_of: \"SC-R / P12: a relation whose target mode is any (REL-8), restricted by config.allowed_types to the platform kinds it may name (custom.entity_reference_kinds() — agents, notes, web sites, workbooks, datasets, conversations …); each value is {token, id}, the edge a platform.associations row record → <token>. File and Person stay relations to their kernel Tables\" },\n { kind: \"formula\", behavior: \"formula\", parity: true, made_of: \"FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval\" },\n { kind: \"long_text\", behavior: \"text\", parity: false, made_of: \"behaviour text with format long and config.multiline, for several lines rather than one\" },\n { kind: \"lookup\", behavior: \"formula\", parity: true, made_of: \"a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side\" },\n { kind: \"member\", behavior: \"relation\", parity: true, made_of: \"a person: a relation whose target is the kernel `Person` Table\" },\n { kind: \"modified_by\", behavior: \"formula\", parity: false, made_of: \"P4: a formula Field whose config.system is modified_by: who last changed the record, {id, name}, filled by the store on read and never typed\" },\n { kind: \"multi_select\", behavior: \"list\", parity: true, made_of: \"many choices from the same Table — the multi modifier, never a second behaviour\" },\n { kind: \"number\", behavior: \"range\", parity: false, made_of: \"a plain number: behaviour range with no date kind and neither the currency nor the percent format\" },\n { kind: \"percent\", behavior: \"range\", parity: true, made_of: \"a number whose unit is % and whose format is percent\" },\n { kind: \"phone\", behavior: \"text\", parity: true, made_of: \"text whose format is phone\" },\n { kind: \"rating\", behavior: \"range\", parity: false, made_of: \"P4: behaviour range, format rating; a whole number of stars from 0 to its max Rule (1 to 10, default 5), shown as stars\" },\n { kind: \"relation\", behavior: \"relation\", parity: false, made_of: \"REL / FLD-11: a relation a person aims themselves — relation_target names a Table of this organization, and it is a BEHAVIOUR, never a parity type of its own\" },\n { kind: \"rich_text\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format rich_text; Markdown with no raw HTML and no script links, shown formatted\" },\n { kind: \"rollup\", behavior: \"formula\", parity: true, made_of: \"an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice\" },\n { kind: \"select\", behavior: \"list\", parity: true, made_of: \"one choice from a Table shown as a list (FLD-5/FLD-6)\" },\n { kind: \"signature\", behavior: \"text\", parity: false, made_of: \"VAL-10: behaviour text whose format is signature — the one shape custom.doc_sign accepts, sealed by custom.doc_signature_write and checked by custom.doc_signature_intact\" },\n { kind: \"status\", behavior: \"list\", parity: false, made_of: \"P4: a single-choice list with format status; config.status_groups puts each choice key in todo, in_progress or done (Notion's Status)\" },\n { kind: \"text\", behavior: \"text\", parity: false, made_of: \"plain text: behaviour text with no format — it carries no parity type, which is exactly what custom.parity_type answers for it\" },\n { kind: \"url\", behavior: \"text\", parity: true, made_of: \"text whose format is url, with the pattern Rule that makes the format enforceable\" },\n] as const;\n\n/** The node kinds `custom.rule_eval` evaluates, and the lane that owns each. */\nexport const RULE_NODE_KINDS = [\n { node: \"actor_at_least\", evaluated_by: \"PIPELINES\" },\n { node: \"add\", evaluated_by: \"W1-RULE\" },\n { node: \"and\", evaluated_by: \"W1-RULE\" },\n { node: \"concat\", evaluated_by: \"W1-RULE\" },\n { node: \"const\", evaluated_by: \"W1-RULE\" },\n { node: \"div\", evaluated_by: \"W1-RULE\" },\n { node: \"eq\", evaluated_by: \"W1-RULE\" },\n { node: \"field\", evaluated_by: \"W1-RULE\" },\n { node: \"fx.abs\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.add\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.and\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.arraycompact\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.arrayjoin\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.autonumber\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.average\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.blank\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.concatenate\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.contains\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.created_time\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.dateadd\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.datediff\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.datetime_format\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.day\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.div\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.eq\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.find\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.gt\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.gte\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.if\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.isblank\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.left\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.len\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lower\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lt\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lte\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.max\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.min\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.mod\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.modified_time\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.month\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.mul\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.ne\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.neg\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.not\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.now\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.or\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.regex_match\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.right\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.round\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.sub\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.substitute\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.sum\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.switch\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.today\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.trim\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.upper\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.workday\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.year\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"gt\", evaluated_by: \"W1-RULE\" },\n { node: \"gte\", evaluated_by: \"W1-RULE\" },\n { node: \"length\", evaluated_by: \"W1-RULE\" },\n { node: \"lt\", evaluated_by: \"W1-RULE\" },\n { node: \"lte\", evaluated_by: \"W1-RULE\" },\n { node: \"matches\", evaluated_by: \"W1-RULE\" },\n { node: \"merge_field\", evaluated_by: \"W5-MERGE-B\" },\n { node: \"mul\", evaluated_by: \"W1-RULE\" },\n { node: \"ne\", evaluated_by: \"W1-RULE\" },\n { node: \"not\", evaluated_by: \"W1-RULE\" },\n { node: \"or\", evaluated_by: \"W1-RULE\" },\n { node: \"parent_field\", evaluated_by: \"W1-RULE-APPLY\" },\n { node: \"present\", evaluated_by: \"W1-RULE\" },\n { node: \"previous\", evaluated_by: \"PIPELINES\" },\n { node: \"sibling_count\", evaluated_by: \"STAGE-RULES\" },\n { node: \"stage_count\", evaluated_by: \"PIPELINES\" },\n { node: \"sub\", evaluated_by: \"W1-RULE\" },\n { node: \"within\", evaluated_by: \"CHAIR-FILTER\" },\n] as const;\n\n/** REC-27. The kernel, by name and by id, as the store holds it. */\nexport const KERNEL_TABLES = [\n { id: \"11111111-0000-4000-8000-000000000002\", name: \"Field\" },\n { id: \"11111111-0000-4000-8000-000000000006\", name: \"File\" },\n { id: \"11111111-0000-4000-8000-000000000009\", name: \"Merge Field\" },\n { id: \"11111111-0000-4000-8000-000000000004\", name: \"Organization\" },\n { id: \"11111111-0000-4000-8000-000000000005\", name: \"Person\" },\n { id: \"11111111-0000-4000-8000-000000000007\", name: \"Presentation\" },\n { id: \"11111111-0000-4000-8000-000000000003\", name: \"Rule\" },\n { id: \"11111111-0000-4000-8000-000000000001\", name: \"Table\" },\n { id: \"11111111-0000-4000-8000-000000000008\", name: \"Widget\" },\n] as const;\n\n/**\n * Every door the store actually has, with the argument list and the result the\n * catalogue reports. A client call whose door is not in this list is answered\n * `door_absent` by name — never a guess, never a silent no-op.\n */\nexport const STORE_DOORS = [\n { name: \"absence_reasons\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"action_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_actions jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"action_run\", args: \"p_organization_id uuid, p_action_id uuid, p_record_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"actor_vocabulary\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"actor_word\", args: \"p_declared text\", returns: \"text\", security: \"invoker\" },\n { name: \"addressed_cap\", args: \"p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"addressed_cap_specific\", args: \"p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"agent_change_approval\", args: \"p_organization uuid, p_conversation uuid DEFAULT NULL::uuid, p_table uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agent_change_trust\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agent_context\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agent_context_value\", args: \"p_doc jsonb, p_key text, p_type text, p_organization_id uuid, p_record_id uuid, p_cap bigint\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agent_context_value_cap\", args: \"p_organization_id uuid\", returns: \"bigint\", security: \"invoker\" },\n { name: \"agent_table_claim\", args: \"p_organization uuid, p_table uuid, p_conversation uuid DEFAULT NULL::uuid\", returns: \"void\", security: \"definer\" },\n { name: \"agg_assert_key\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_bucket_ordinal\", args: \"p_by text, p_window_from timestamp without time zone, p_at timestamp without time zone, p_week_start text\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_buckets\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_cadence_normalize\", args: \"p_cadence text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_calendar\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_compare_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_compare_windows\", args: \"p_organization_id uuid, p_compare jsonb, p_bucket jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_deliver\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb DEFAULT '{}'::jsonb, p_dedupe_suffix text DEFAULT NULL::text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"agg_deliver_quietly\", args: \"p_organization_id uuid, p_rule_id uuid, p_subject_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb, p_quiet_hours jsonb, p_link text, p_dedupe_suffix text DEFAULT NULL::text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"agg_delta\", args: \"p_current jsonb, p_prior jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_digest_assemble\", args: \"p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone, p_until timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_digest_due_at\", args: \"p_cadence text, p_schedule text, p_quiet jsonb, p_after timestamp with time zone\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_digest_judged_at\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_digest_run\", args: \"p_organization_id uuid, p_rule_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_run_at\", args: \"p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone, p_now timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_tick\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_tick_at\", args: \"p_now timestamp with time zone, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_explain\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agg_field_kind\", args: \"p_organization_id uuid, p_table_id uuid, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_field_value_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_fields_readable_assert\", args: \"p_organization_id uuid, p_table_id uuid, p_keys text[], p_required text DEFAULT 'viewer'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"agg_group_value\", args: \"p_value text, p_kind text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_last_digest_at\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_local_label\", args: \"p_local timestamp without time zone, p_tz text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_moment_sql\", args: \"p_key text, p_tz text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_operations\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_parse_moment\", args: \"p_raw text, p_tz text, p_what text\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_period_start\", args: \"p_local timestamp without time zone, p_by text, p_week_start text DEFAULT 'monday'::text\", returns: \"timestamp without time zone\", security: \"invoker\" },\n { name: \"agg_period_step\", args: \"p_by text\", returns: \"interval\", security: \"invoker\" },\n { name: \"agg_quiet_until\", args: \"p_quiet jsonb, p_at timestamp with time zone\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_record_name\", args: \"p_organization_id uuid, p_record_id uuid, p_state jsonb DEFAULT NULL::jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_window jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_subscription_cadences\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_subscription_fire\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_changed_field_ids jsonb DEFAULT '[]'::jsonb\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscription_fire_entered\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscription_tick\", args: \"p_window interval DEFAULT '00:15:00'::interval\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscriptions\", args: \"p_organization_id uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_cadence text DEFAULT NULL::text\", returns: \"TABLE(rule_id uuid, saved_view_id uuid, table_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, name text)\", security: \"invoker\" },\n { name: \"agg_value_sql\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_value_text\", args: \"p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_view_admits\", args: \"p_organization_id uuid, p_saved_view_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"agg_view_admits_state\", args: \"p_definition jsonb, p_state jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"agg_withheld_marker\", args: \"p_organization_id uuid, p_table_id uuid, p_key text, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_zero\", args: \"p_measures jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"anon_capture\", args: \"p_organization_id uuid, p_client_key text, p_table_id uuid, p_payload jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_clear\", args: \"p_organization_id uuid, p_submission_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_inbound_land\", args: \"p_address text, p_secret text, p_payload jsonb, p_raw_payload jsonb DEFAULT '{}'::jsonb, p_client_key text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_publish\", args: \"p_organization_id uuid, p_form_id uuid, p_published boolean DEFAULT true\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"anon_rate_take\", args: \"p_organization_id uuid, p_form_id uuid, p_bucket text, p_token_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"anon_submissions\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, form_id uuid, inbound_id uuid, table_id uuid, source text, state text, payload jsonb, raw_payload jsonb, client_key text, record_id uuid, remote_origin text, rejection_reason text, created_at timestamp with time zone, cleared_at timestamp with time zone)\", security: \"definer\" },\n { name: \"anon_token_issue\", args: \"p_organization_id uuid, p_mode text, p_allowed_origins jsonb, p_form_id uuid DEFAULT NULL::uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid, p_expires_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"TABLE(token_id uuid, secret text)\", security: \"definer\" },\n { name: \"anon_token_revoke\", args: \"p_organization_id uuid, p_token_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"anon_token_verify\", args: \"p_secret text, p_origin text, p_required_mode text\", returns: \"TABLE(token_id uuid, organization_id uuid, form_id uuid, saved_view_id uuid, record_id uuid, mode text)\", security: \"definer\" },\n { name: \"anon_write\", args: \"p_secret text, p_origin text, p_payload jsonb, p_client_key text DEFAULT NULL::text, p_raw_payload jsonb DEFAULT '{}'::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"applicable_fields\", args: \"p_organization_id uuid, p_table_id uuid, p_record_type text DEFAULT NULL::text\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"archive_event_of\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"history.migration_log\", security: \"definer\" },\n { name: \"archived_tables_everywhere\", args: \"p_lane text DEFAULT 'org'::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_sort text DEFAULT 'archived_at'::text, p_desc boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"assert_client_may_change\", args: \"p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'editor'::permission_level, p_subject_word text DEFAULT 'record'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_client_may_open\", args: \"p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'viewer'::permission_level, p_subject_word text DEFAULT 'record'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_client_may_reach\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_columns_are_defined\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb\", returns: \"void\", security: \"definer\" },\n { name: \"assert_entity_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_entity_is_organization_scoped\", args: \"p_token text, p_label text, p_scoped boolean\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_may_know_table\", args: \"p_organization_id uuid, p_table_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_organization_admin\", args: \"p_organization_id uuid, p_door text, p_what text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_organization_wall\", args: \"p_kind text, p_organization_id uuid, p_row jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_public_reader_names_a_public_table\", args: \"p_organization_id uuid, p_table_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_scope_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_store_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"automation_archive\", args: \"p_organization_id uuid, p_automation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"automation_restore\", args: \"p_organization_id uuid, p_automation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"automation_set_enabled\", args: \"p_organization_id uuid, p_automation_id uuid, p_enabled boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"automations\", args: \"p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"autonumber_backfill\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"barcode_symbologies\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { 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\" },\n { name: \"booking_confirm\", args: \"p_form_id uuid, p_hold_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(booking_ref text, record_id uuid, submission_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"booking_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_availability jsonb DEFAULT '{}'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_home_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"booking_hold\", args: \"p_form_id uuid, p_slot_key text, p_origin text, p_bucket text, p_client_key text DEFAULT NULL::text\", returns: \"TABLE(hold_id uuid, slot_key text, expires_at timestamp with time zone, member_user_id uuid, state text, message text)\", security: \"definer\" },\n { name: \"booking_manage\", args: \"p_booking_ref text, p_days integer DEFAULT NULL::integer\", returns: \"TABLE(booking_ref text, form_id uuid, title text, slot_key text, slot_at timestamp with time zone, status text, slots jsonb, availability jsonb, state text, message text)\", security: \"definer\" },\n { name: \"booking_notify\", args: \"p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid, p_event text, p_when text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"booking_public\", args: \"p_form_id uuid, p_days integer DEFAULT NULL::integer\", returns: \"TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, availability jsonb, slots jsonb, state text, message text)\", security: \"definer\" },\n { name: \"booking_reschedule\", args: \"p_booking_ref text, p_slot_key text, p_origin text, p_bucket text DEFAULT NULL::text\", returns: \"TABLE(booking_ref text, record_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"bookings\", 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, slot_minutes integer, timezone text, slot_table_id uuid, booked bigint, cancelled bigint, upcoming bigint, held bigint, next_at timestamp with time zone, state text)\", security: \"definer\" },\n { name: \"bump_epoch\", args: \"p_entity_type text, p_entity_id uuid, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"bigint\", security: \"definer\" },\n { name: \"cache_lookup\", args: \"p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"caller_role\", args: \"\", returns: \"name\", security: \"invoker\" },\n { name: \"capture_open\", args: \"p_organization_id uuid, p_sheet_id uuid\", returns: \"TABLE(sheet_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, state text, may_capture boolean, message text)\", security: \"definer\" },\n { name: \"capture_publish\", args: \"p_organization_id uuid, p_sheet_id uuid, p_open boolean DEFAULT true\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"capture_sheet_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_sheet_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"capture_sheets\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(sheet_id uuid, table_id uuid, title text, slug text, state text, opened_at timestamp with time zone, captures bigint, replays bigint, last_capture_at timestamp with time zone, presentation jsonb)\", security: \"definer\" },\n { name: \"capture_submit\", args: \"p_organization_id uuid, p_sheet_id uuid, p_client_key text, p_payload jsonb, p_files jsonb DEFAULT '[]'::jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_location jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(record_id uuid, state text, message text, replay boolean, file_ids uuid[])\", security: \"definer\" },\n { name: \"carry_unchanged_value_stamps\", args: \"p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"carrying_edges_in\", args: \"p_organization_id uuid\", returns: \"TABLE(container_type text, container_id uuid, item_type text, item_id uuid, conveys_max permission_level)\", security: \"definer\" },\n { name: \"carrying_edges_of\", args: \"p_item_type text, p_item_id uuid\", returns: \"TABLE(container_type text, container_id uuid, conveys_max permission_level)\", security: \"definer\" },\n { name: \"checklist_declare\", args: \"p_organization_id uuid, p_spec jsonb, p_template_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_refusal\", args: \"p_spec jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"checklist_run\", args: \"p_organization_id uuid, p_run_id uuid\", returns: \"TABLE(step_id uuid, step_order integer, ref text, title text, role text, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, finished boolean, requires text, requires_key text, requires_label text, requires_id uuid, evidence jsonb, blocked_by text[], may_complete boolean, refusal text)\", security: \"definer\" },\n { name: \"checklist_runs\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_include_closed boolean DEFAULT true, p_limit integer DEFAULT 100\", returns: \"TABLE(run_id uuid, name text, template_id uuid, template text, about_record_id uuid, about text, about_table_id uuid, started_at timestamp with time zone, started_by uuid, origin text, step_count integer, done integer, overdue integer, next_step text, next_due timestamp with time zone, closed_at timestamp with time zone)\", security: \"definer\" },\n { name: \"checklist_start\", args: \"p_organization_id uuid, p_template_id uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_roles jsonb DEFAULT '{}'::jsonb, p_starting_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_step_complete\", args: \"p_organization_id uuid, p_step_id uuid, p_evidence jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_step_refusal\", args: \"p_organization_id uuid, p_step_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"checklist_steps_table\", args: \"p_organization_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"checklist_template_shape\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_templates\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, roles integer, trigger_kind text, trigger_status text, open_runs integer, total_runs integer, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"checklist_templates_archived\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, archived_at timestamp with time zone, archived_by uuid, table_archived boolean)\", security: \"definer\" },\n { name: \"choice_census\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"choice_field_map\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_filter_normalize\", args: \"p_map jsonb, p_filter jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_key_for\", args: \"p_organization_id uuid, p_options_table_id uuid, p_title text, p_exclude uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_key_of\", args: \"p_field jsonb, p_token text\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_nudge\", args: \"p_organization_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"choice_options\", args: \"p_organization_id uuid, p_options_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_groups\", args: \"p_map jsonb, p_groups jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_note\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_plan\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_value\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_with\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_slug\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_synonyms\", args: \"p_organization_id uuid, p_table_id uuid, p_token text\", returns: \"text[]\", security: \"invoker\" },\n { name: \"choice_synonyms_in\", args: \"p_map jsonb, p_token text\", returns: \"text[]\", security: \"invoker\" },\n { name: \"choice_value_keys\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"choice_words\", args: \"p_field jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"client_write_grants\", args: \"\", returns: \"TABLE(role_name text, object_name text, privilege text)\", security: \"invoker\" },\n { name: \"comment_mention_deliver\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid, p_comment_id uuid, p_recipient uuid, p_author_name text, p_record_title text, p_body text\", returns: \"uuid\", security: \"definer\" },\n { name: \"comment_thread\", args: \"p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"comment_write\", args: \"p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid, p_mentions uuid[] DEFAULT NULL::uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"computed_block\", args: \"p_block jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"computed_provenance\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)\", security: \"definer\" },\n { name: \"confidential_anchor\", args: \"p_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"confidential_answer\", args: \"p_user uuid, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"confidential_header\", args: \"p_user uuid, p_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"confidential_names\", args: \"p_organization_id uuid, p_value jsonb, p_user uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"containment_chain\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(ancestor_id uuid, depth integer)\", security: \"invoker\" },\n { name: \"containment_depth_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"containment_edges\", args: \"p_organization_id uuid\", returns: \"TABLE(parent_id uuid, child_id uuid, via text)\", security: \"invoker\" },\n { name: \"containment_parent\", args: \"p_data jsonb\", returns: \"uuid\", security: \"invoker\" },\n { name: \"context_archived_types\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_class_for_checkout\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_compare_facts\", args: \"p_user_id uuid, p_record_ids uuid[], p_item_ids uuid[] DEFAULT NULL::uuid[], p_cells jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_archive\", args: \"p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_restore\", args: \"p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_row_of\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_item_write\", args: \"p_item_id uuid, p_scope_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_items\", args: \"p_scope_type_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_policy_rank\", args: \"p_policy text\", returns: \"integer\", security: \"invoker\" },\n { name: \"context_resolve\", args: \"p_bindings jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_archive\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_restore\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_write\", args: \"p_organization_id uuid, p_scope_id uuid, p_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scopes\", args: \"p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_system_items\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tags_set\", args: \"p_entity_type text, p_entity_id uuid, p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_template_define\", args: \"p_organization_id uuid, p_definition jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_templates\", args: \"\", returns: \"SETOF jsonb\", security: \"invoker\" },\n { name: \"context_tree\", args: \"p_organization_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_search\", args: \"p_organization_ids uuid[], p_query text, p_limit integer DEFAULT 100\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_type_scopes\", args: \"p_scope_type_id uuid, p_offset integer DEFAULT 0, p_limit integer DEFAULT 200\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_types\", args: \"p_organization_ids uuid[], p_with_counts boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_archive\", args: \"p_type_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_restore\", args: \"p_type_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_write\", args: \"p_organization_id uuid, p_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_value_write\", args: \"p_payload jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_values\", args: \"p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_writer\", args: \"p_organization_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"conversation_scope\", args: \"p_organization_id uuid, p_conversation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_bind\", args: \"p_organization_id uuid, p_conversation_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_context\", args: \"p_organization_id uuid, p_conversation_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_unbind\", args: \"p_organization_id uuid, p_conversation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"count_records_archived\", args: \"p_organization_id uuid, p_table_ids uuid[], p_lane text DEFAULT 'org'::text\", returns: \"TABLE(table_id uuid, n integer)\", security: \"definer\" },\n { name: \"cross_organization_links_open\", args: \"p_source_organization_id uuid, p_target_organization_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"custom_fields_tables\", args: \"\", returns: \"TABLE(token text, schema_name text, table_name text)\", security: \"invoker\" },\n { name: \"dashboard_block_normalize\", args: \"p_organization_id uuid, p_subject_table_id uuid, p_block jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dashboard_class\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboard_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_name text, p_blocks jsonb DEFAULT '[]'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_dashboard_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"dashboard_delete\", args: \"p_organization_id uuid, p_dashboard_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"dashboard_field_keys\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"dashboard_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"dashboard_moment_sql\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboard_restore\", args: \"p_organization_id uuid, p_dashboard_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"dashboard_run\", args: \"p_organization_id uuid, p_dashboard_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_compare jsonb DEFAULT NULL::jsonb, p_grain text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dashboard_stuck\", args: \"p_organization_id uuid, p_table_id uuid, p_state_key text, p_days integer DEFAULT 14, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 50, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, title text, state text, last_changed_at timestamp with time zone, days_unchanged numeric, measured_from text)\", security: \"definer\" },\n { name: \"dashboard_target_field_assert\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text\", returns: \"void\", security: \"invoker\" },\n { name: \"dashboard_window_sql\", args: \"p_key text, p_window jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboards\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(dashboard_id uuid, table_id uuid, name text, blocks jsonb, presentation jsonb, block_count integer, version integer, created_at timestamp with time zone, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"data_home\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"data_home_changed_by\", args: \"p_asks jsonb\", returns: \"TABLE(organization_id uuid, id uuid, at timestamp with time zone, who text)\", security: \"definer\" },\n { name: \"data_home_items\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)\", security: \"definer\" },\n { name: \"data_home_tables\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)\", security: \"definer\" },\n { name: \"data_home_tables\", args: \"p_organization_id uuid, p_include_app_tables boolean\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)\", security: \"invoker\" },\n { name: \"declared_conversation\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"decoration_colors\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"decoration_rule_ops\", args: \"\", returns: \"TABLE(op text, takes_value boolean, label text)\", security: \"invoker\" },\n { name: \"delete_cascade_closure\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid[]\", security: \"invoker\" },\n { name: \"delete_preview\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"delete_rule\", args: \"p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dependency_cycle\", args: \"p_organization_id uuid, p_row custom.record\", returns: \"text[]\", security: \"invoker\" },\n { name: \"dependency_label\", args: \"p_organization_id uuid, p_node text\", returns: \"text\", security: \"invoker\" },\n { name: \"derive_visibility\", args: \"p_container_type text, p_container_id uuid\", returns: \"TABLE(item_type text, item_id uuid, depth integer, max_level permission_level)\", security: \"definer\" },\n { name: \"derived_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"derived_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"derived_values_of\", args: \"v_rec custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"display_format_ids\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"doc_content_hash\", args: \"p_body text\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_format_value\", args: \"p_field_data jsonb, p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_letterhead\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_name_token_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_name_tokens\", args: \"p_body text\", returns: \"TABLE(ordinal integer, raw text)\", security: \"invoker\" },\n { name: \"doc_render_body\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_render_document\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_render_read\", args: \"p_organization_id uuid, p_render_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_render_write\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid, p_table_id uuid, p_template_version integer, p_body text, p_content_hash text\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_renders\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(render_id uuid, template_id uuid, record_id uuid, table_id uuid, template_version integer, body text, content_hash text, rendered_at timestamp with time zone)\", security: \"definer\" },\n { name: \"doc_sign\", args: \"p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_signature_field_ok\", args: \"p_field_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"doc_signature_intact\", args: \"p_organization_id uuid, p_signature_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"doc_signature_read\", args: \"p_organization_id uuid, p_signature_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_signature_write\", args: \"p_organization_id uuid, p_render_id uuid, p_record_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid, p_document_hash text, p_document_version integer\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_signatures\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(signature_id uuid, render_id uuid, record_id uuid, field_key text, signer_name text, signer_user_id uuid, signed_at timestamp with time zone, document_hash text, document_version integer)\", security: \"definer\" },\n { name: \"doc_template_delete\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"doc_template_read\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_template_restore\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"doc_template_save\", args: \"p_organization_id uuid, p_table_id uuid, p_name text, p_body text, p_template_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_templates\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(template_id uuid, renders_table_id uuid, name text, body text, template_version integer, token_count bigint, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"doc_token_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_tokens\", args: \"p_body text\", returns: \"TABLE(ordinal integer, raw text, field_id uuid)\", security: \"invoker\" },\n { name: \"doc_unresolved_tokens\", args: \"p_organization_id uuid, p_table_id uuid, p_body text\", returns: \"TABLE(raw text, field_id uuid, why text)\", security: \"invoker\" },\n { name: \"door_reads_only\", args: \"p_door text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"doors_not_deciding_the_caller\", args: \"\", returns: \"TABLE(function_name text, identity_args text)\", security: \"invoker\" },\n { name: \"doors_not_deciding_the_record\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_not_masking_fields\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_not_on_one_ladder\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_refusing_in_another_doors_name\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"enrich_declare\", args: \"p_organization_id uuid, p_field_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"enrich_land\", args: \"p_organization_id uuid, p_field_id uuid, p_results jsonb, p_run jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_normalize\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_pin\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_pinned boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_run_class\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"enrich_runs\", args: \"p_organization_id uuid, p_field_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50\", returns: \"TABLE(run_id uuid, field_id uuid, field_key text, model text, trigger_word text, rows_seen integer, rows_written integer, rows_absent integer, rows_below_floor integer, rows_pinned integer, rows_refused integer, cost_cents numeric, cost_per_row_cents numeric, ran_at timestamp with time zone)\", security: \"definer\" },\n { name: \"enrich_sensitivity_rank\", args: \"p_word text\", returns: \"integer\", security: \"invoker\" },\n { name: \"enrich_triggers\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"enrichments\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(field_id uuid, table_id uuid, field_key text, label text, enrichment jsonb, enabled boolean, review_interval_days integer, rows_total integer, rows_filled integer, rows_stale integer, rows_pinned integer, rows_absent integer, runs integer, cost_cents numeric, cost_per_row_cents numeric, last_run_at timestamp with time zone, last_run jsonb)\", security: \"definer\" },\n { name: \"entity_back_links\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_limit integer DEFAULT 50, p_cursor text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_declare\", args: \"p_organization_id uuid, p_token text, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_field_protect_arman_explicitly_approved\", args: \"p_field_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_retire\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_field_rights\", args: \"p_organization_id uuid, p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_update\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_fields\", args: \"p_organization_id uuid, p_token text\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"entity_fields_across\", args: \"p_token text, p_organization_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_read_mask\", args: \"p_organization_id uuid, p_token text, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_record_home\", args: \"p_token text, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_record_read\", args: \"p_organization_id uuid, p_token text, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_records_find\", args: \"p_organization_id uuid, p_token text, p_key text, p_value jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_kinds\", args: \"\", returns: \"TABLE(token text, label text, category text)\", security: \"definer\" },\n { name: \"entity_reference_render\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_render_with\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_rows\", args: \"p_organization_id uuid, p_token text, p_ids uuid[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_search\", args: \"p_organization_id uuid, p_tokens text[], p_search text DEFAULT NULL::text, p_limit integer DEFAULT 20\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_reference_target\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_reference_words\", args: \"p_organization_id uuid, p_refs jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_row_propose\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean, p_note text DEFAULT NULL::text, p_conversation_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_row_write\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_seat_level\", args: \"p_organization_id uuid, p_token text, p_record_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"entity_table\", args: \"p_token text\", returns: \"TABLE(token text, schema_name text, table_name text, type text, title_column text, label text, has_organization boolean, has_deleted_at boolean)\", security: \"definer\" },\n { name: \"entity_value_write\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_patch jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"export_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"export_records\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000\", returns: \"TABLE(id uuid, document jsonb)\", security: \"invoker\" },\n { name: \"external_foreign_table_findings\", args: \"\", returns: \"SETOF text\", security: \"definer\" },\n { name: \"external_history_event\", args: \"p_organization_id uuid, p_link_id uuid, p_operation text\", returns: \"bigint\", security: \"definer\" },\n { name: \"external_rows\", args: \"p_organization_id uuid, p_source_id uuid\", returns: \"SETOF jsonb\", security: \"definer\" },\n { name: \"external_source_declare\", args: \"p_organization_id uuid, p_tier text, p_connection_token text, p_external_schema text, p_external_table text, p_link_template text\", returns: \"uuid\", security: \"definer\" },\n { name: \"external_stub_upsert\", args: \"p_organization_id uuid, p_source_id uuid, p_table_id uuid, p_external_key text, p_link_url text, p_cached_title text\", returns: \"uuid\", security: \"definer\" },\n { name: \"external_tier_contract\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"external_write_through\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb\", returns: \"void\", security: \"definer\" },\n { name: \"external_writes_set\", args: \"p_organization_id uuid, p_source_id uuid, p_enabled boolean\", returns: \"boolean\", security: \"definer\" },\n { name: \"far_value\", args: \"p_organization_id uuid, p_record_id uuid, p_key text, p_reader jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"field_access\", args: \"p_user uuid, p_field_id uuid, p_token text, p_row_id uuid, p_action text, p_audit boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_add_rung\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"field_behaviour\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_choice_usage\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_context_policy_floor\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid\", returns: \"TABLE(context_policy text, reads jsonb)\", security: \"definer\" },\n { name: \"field_cycle\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"field_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"field_is_protected\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"field_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"field_kind_of\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_kinds\", args: \"\", returns: \"TABLE(kind text, behavior text, parity boolean, made_of text)\", security: \"invoker\" },\n { name: \"field_options\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"field_protection_refusal\", args: \"p_op text, p_old jsonb, p_new jsonb, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"field_restore\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"field_retire\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"field_rules\", args: \"p_field_data jsonb\", returns: \"TABLE(kind text, spec jsonb)\", security: \"invoker\" },\n { name: \"field_sensitivity_floor\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid\", returns: \"TABLE(sensitivity text, reads jsonb)\", security: \"definer\" },\n { name: \"field_source_archived\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_update\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"field_update_rehoming_choices\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb, p_rehome jsonb DEFAULT NULL::jsonb, p_cells_back jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_value_convert\", args: \"p_to jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"field_value_kind\", args: \"p_organization_id uuid, p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_words\", args: \"p_organization_id uuid, p_field_id uuid, p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"file_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"filter_is_rule\", args: \"p_filter jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"form_archive\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"form_draft_read\", args: \"p_form_id uuid, p_secret text\", returns: \"TABLE(answers jsonb, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"form_draft_save\", args: \"p_form_id uuid, p_answers jsonb, p_secret text DEFAULT NULL::text, p_bucket text DEFAULT NULL::text, p_origin text DEFAULT NULL::text\", returns: \"TABLE(draft_secret text, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"form_look_options\", args: \"p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_notify\", args: \"p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"form_public_route\", args: \"p_form_id uuid, p_values jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_redirect_domains\", args: \"p_organization_id uuid\", returns: \"text[]\", security: \"invoker\" },\n { name: \"form_redirect_refusal\", args: \"p_organization_id uuid, p_url text\", returns: \"text\", security: \"invoker\" },\n { name: \"form_restore\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_results\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_slug\", args: \"p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"invoker\" },\n { 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\" },\n { name: \"form_theme_options\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"form_visit\", args: \"p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text\", returns: \"text\", security: \"definer\" },\n { 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\" },\n { 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\" },\n { name: \"formula_compile_sql\", args: \"p_organization_id uuid, p_expr jsonb, p_values_sql text\", returns: \"text\", security: \"invoker\" },\n { name: \"formula_eval\", args: \"p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"formula_field_keys\", args: \"p_organization_id uuid, p_expr jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"formula_node_kinds\", args: \"\", returns: \"TABLE(node text, min_args integer, max_args integer, result text, signature text, says text)\", security: \"invoker\" },\n { name: \"formula_parse\", args: \"p_organization_id uuid, p_table_id uuid, p_text text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"formula_result_kind\", args: \"p_organization_id uuid, p_expr jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"formula_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"freshness_verdict\", args: \"p_written_at timestamp with time zone, p_ceiling_seconds numeric\", returns: \"jsonb\", security: \"definer\" },\n { name: \"grid_layout\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"grid_layout_check\", args: \"p_layout jsonb, p_scope text DEFAULT 'view'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"guard_refusals_are_complete\", args: \"\", returns: \"TABLE(guard text, said text)\", security: \"invoker\" },\n { name: \"has_visibility\", args: \"p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"has_visibility_at\", args: \"p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_organization_id uuid DEFAULT NULL::uuid, p_min_version bigint DEFAULT NULL::bigint\", returns: \"boolean\", security: \"definer\" },\n { name: \"hidden_field_notice\", args: \"p_field custom.record, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_actor\", args: \"p_tier text, p_document jsonb, p_actor_id uuid, p_people jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_changes\", args: \"p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_people\", args: \"p_organization_id uuid, p_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_prune\", args: \"p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_restore_body\", args: \"p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_restore_body\", args: \"p_current jsonb, p_target jsonb, p_field_key text, p_author jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_retention\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_retention_floor_raise\", args: \"p_organization_id uuid, p_days integer\", returns: \"integer\", security: \"definer\" },\n { name: \"history_retention_set\", args: \"p_organization_id uuid, p_table_id uuid, p_days integer\", returns: \"integer\", security: \"definer\" },\n { name: \"home_add\", args: \"p_organization_id uuid, p_table_id uuid, p_home_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"home_relations\", args: \"\", returns: \"TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)\", security: \"invoker\" },\n { name: \"hub_changed_by\", args: \"p_organization_id uuid, p_kind text, p_ids uuid[]\", returns: \"TABLE(id uuid, at timestamp with time zone, who text)\", security: \"definer\" },\n { name: \"inbound_addresses\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_domain\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"inbound_mail_land\", args: \"p_address text, p_mail jsonb, p_secret text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_mail_map\", args: \"p_organization_id uuid, p_table_id uuid, p_mail jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"inbound_set\", args: \"p_organization_id uuid, p_inbound_id uuid, p_enabled boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_clear\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_counts\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(organization_id uuid, organization_name text, waiting integer, snoozed integer, cleared integer, overdue integer, oldest_waiting_at timestamp with time zone)\", security: \"definer\" },\n { name: \"inbox_remind_tick\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"inbox_snooze\", args: \"p_organization_id uuid, p_item_id uuid, p_until timestamp with time zone\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_unclear\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_unsnooze\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"index_payload\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000\", returns: \"TABLE(id uuid, searchable text)\", security: \"invoker\" },\n { name: \"intern_provenance\", args: \"p_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_cell\", args: \"p_organization_id uuid, p_field jsonb, p_word text, p_date_order text DEFAULT 'mdy'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_actor\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_fields\", args: \"p_keys text[], p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_via\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"io_changed_field_ids\", args: \"p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_changed_keys\", args: \"p_old jsonb, p_new jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"io_comment_resolve\", args: \"p_organization_id uuid, p_comment_id uuid, p_resolved boolean DEFAULT true\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_comment_write\", args: \"p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_comments\", args: \"p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false\", returns: \"TABLE(id uuid, body text, anchor jsonb, parent_comment_id uuid, created_by uuid, created_at timestamp with time zone, resolved_at timestamp with time zone, resolved_by uuid)\", security: \"definer\" },\n { name: \"io_csv_escape\", args: \"p_value text, p_delimiter text DEFAULT ','::text\", returns: \"text\", security: \"invoker\" },\n { name: \"io_csv_parse\", args: \"p_text text, p_delimiter text DEFAULT NULL::text\", returns: \"TABLE(row_number integer, cells text[])\", security: \"invoker\" },\n { name: \"io_export\", args: \"p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_export_csv\", args: \"p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text\", returns: \"text\", security: \"definer\" },\n { name: \"io_import_begin\", args: \"p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb, p_file_hash text DEFAULT NULL::text, p_policy jsonb DEFAULT '{}'::jsonb, p_dedupe_key text DEFAULT NULL::text, p_file_bytes bigint DEFAULT NULL::bigint, p_force boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_declare_columns\", args: \"p_organization_id uuid, p_table_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_finish\", args: \"p_organization_id uuid, p_import_id uuid, p_unmapped text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_forget\", args: \"p_organization_id uuid, p_import_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_import_open\", args: \"p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_import_plan\", args: \"p_organization_id uuid, p_table_id uuid, p_columns jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_report\", args: \"p_organization_id uuid, p_import_id uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_rows\", args: \"p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_imports\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 25\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_infer_column\", args: \"p_organization_id uuid, p_table_id uuid, p_header text, p_samples jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_infer_type\", args: \"p_samples jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"io_money_unit\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"io_outbox_announce\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_outbox_backlog\", args: \"p_consumer text, p_event_key text, p_older_than interval DEFAULT '00:00:00'::interval\", returns: \"TABLE(organization_id uuid, waiting bigint, oldest timestamp with time zone, last_carried timestamp with time zone)\", security: \"definer\" },\n { name: \"io_outbox_broadcast_stmt\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_outbox_consumed_by\", args: \"p_event_id uuid, p_consumer text, p_consumed_at timestamp with time zone\", returns: \"boolean\", security: \"invoker\" },\n { name: \"io_outbox_drain\", args: \"p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text\", returns: \"TABLE(outbox_id uuid, record_id uuid, table_id uuid, operation text, changed_field_ids jsonb, actor jsonb, occurred_at timestamp with time zone)\", security: \"definer\" },\n { name: \"io_outbox_last_consumed\", args: \"p_consumer text, p_event_key text, p_organization_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"io_outbox_pending_organizations\", args: \"p_consumer text, p_event_key text\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"io_outbox_per_consumer\", args: \"\", returns: \"boolean\", security: \"invoker\" },\n { name: \"io_outbox_rearm\", args: \"p_organization_id uuid, p_dedupe_key text\", returns: \"void\", security: \"definer\" },\n { name: \"io_outbox_release\", args: \"p_organization_id uuid, p_consumer text, p_older_than interval DEFAULT '00:15:00'::interval\", returns: \"integer\", security: \"definer\" },\n { name: \"io_outbox_release_claimed\", args: \"p_organization_id uuid, p_consumer text, p_ids uuid[]\", returns: \"integer\", security: \"definer\" },\n { name: \"io_outbox_subscribe\", args: \"p_consumer text, p_event_key text\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"io_proposal_accept\", args: \"p_organization_id uuid, p_import_id uuid, p_column text, p_type text DEFAULT NULL::text, p_label text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_proposal_reject\", args: \"p_organization_id uuid, p_import_id uuid, p_column text\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_proposal_spec\", args: \"p_proposal jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_record_changed\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_delete\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_insert\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_update\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_relation_candidate\", args: \"p_organization_id uuid, p_table_id uuid, p_words text[]\", returns: \"uuid\", security: \"invoker\" },\n { name: \"io_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer\", returns: \"integer\", security: \"definer\" },\n { name: \"io_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb\", returns: \"integer\", security: \"definer\" },\n { name: \"io_revisions\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)\", security: \"definer\" },\n { name: \"io_sample_words\", args: \"p_samples jsonb\", returns: \"TABLE(word text)\", security: \"invoker\" },\n { name: \"io_value_shape\", args: \"p_envelope jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_workflow_chain\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"is_a_retirement\", args: \"p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"ladder_replanners\", args: \"p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]\", returns: \"TABLE(fn text, lang text, why text, remedy text)\", security: \"definer\" },\n { name: \"level_floor\", args: \"\", returns: \"permission_level\", security: \"definer\" },\n { name: \"levels_of\", args: \"p_user_id uuid, p_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"levels_raised_by_a_less_specific_rung\", args: \"\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, member_email text, record_id uuid, addressed_level permission_level, answered_level permission_level)\", security: \"definer\" },\n { name: \"list_door_disagreements\", args: \"p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)\", security: \"invoker\" },\n { name: \"list_door_disagreements\", args: \"p_pretend text, p_only_organization uuid, p_sample integer, p_exhaustive boolean\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)\", security: \"invoker\" },\n { name: \"list_portals\", args: \"p_organization_id uuid, p_archived text DEFAULT 'active'::text\", returns: \"TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)\", security: \"definer\" },\n { name: \"list_portals_everywhere\", args: \"p_archived text DEFAULT 'active'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"listed_predicate_sql\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text\", returns: \"text\", security: \"invoker\" },\n { name: \"lookup_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_document\", args: \"p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_document\", args: \"p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb, p_declared_keys text[] DEFAULT NULL::text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_history_data\", args: \"p_data jsonb, p_mask jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_says_withheld\", args: \"p_mask jsonb, p_key text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"may_invite_outside\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"member_personal_tables\", args: \"p_organization_id uuid, p_person uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"member_records_take_over\", args: \"p_organization_id uuid, p_from uuid, p_to uuid, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"merge_field_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"migrate_choice_keys\", args: \"p_organization_id uuid, p_table_id uuid, p_dry_run boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_delete\", args: \"p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_demote\", args: \"p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_extract_parent\", args: \"p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_merge\", args: \"p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_promote\", args: \"p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge_hard\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_compliance_reason text DEFAULT NULL::text, p_chunk integer DEFAULT 200, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge_hard_request\", args: \"p_organization_id uuid, p_table_id uuid, p_compliance_reason text\", returns: \"void\", security: \"definer\" },\n { name: \"migrate_reclass\", args: \"p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_rename\", args: \"p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_reparent\", args: \"p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_retype\", args: \"p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_split\", args: \"p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_undo\", args: \"p_organization_id uuid, p_log_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrations\", args: \"p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(id uuid, verb text, target_kind text, target_id uuid, note text, applied_at timestamp with time zone, applied_by uuid, undone_at timestamp with time zone)\", security: \"definer\" },\n { name: \"mirror_asks_the_whole_database\", args: \"\", returns: \"TABLE(schema_name text, table_name text, policy_name text, why text)\", security: \"invoker\" },\n { name: \"my_level\", args: \"p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text\", returns: \"permission_level\", security: \"definer\" },\n { name: \"my_levels\", args: \"p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text\", returns: \"TABLE(id uuid, level permission_level)\", security: \"definer\" },\n { name: \"organization_clear\", args: \"p_organization_id uuid, p_confirm text, p_and_destroy boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"organization_contents\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"organization_has_a_public_table\", args: \"p_organization_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"organization_home_id\", args: \"p_organization_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"organization_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"organization_pick_lists\", args: \"p_organization_id uuid\", returns: \"TABLE(id uuid, list_name text, description text, updated_at timestamp with time zone, lives_in text)\", security: \"definer\" },\n { name: \"organization_references\", args: \"p_kind text, p_organization_id uuid, p_row jsonb\", returns: \"TABLE(site text, what text, ref_id uuid, openable boolean)\", security: \"invoker\" },\n { name: \"owning_table\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"owning_table_gone\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"page_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"page_contract\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"page_size\", args: \"p_organization_id uuid, p_door text, p_limit integer, p_default integer DEFAULT NULL::integer, p_ceiling integer DEFAULT NULL::integer\", returns: \"integer\", security: \"invoker\" },\n { name: \"parity_field_types\", args: \"\", returns: \"TABLE(parity_type text, behavior text, made_of text)\", security: \"invoker\" },\n { name: \"parity_type\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"parity_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, parity_type text, behavior text, unit text, format text, value jsonb, value_version integer, actor text, written_at timestamp with time zone)\", security: \"invoker\" },\n { name: \"per_value_access_words\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"person_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"phone_canonical\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"phone_display\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"phone_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"pick_list_create\", args: \"p_organization_id uuid, p_list_name text, p_description text DEFAULT NULL::text, p_items jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pick_list_index\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pick_list_index_everywhere\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pin_agent_cells\", args: \"p_new jsonb, p_old jsonb, p_agent_keys text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"pipeline_board\", args: \"p_organization_id uuid, p_table_id uuid, p_measure text DEFAULT NULL::text\", returns: \"TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)\", security: \"definer\" },\n { name: \"pipeline_board\", args: \"p_organization_id uuid, p_table_id uuid, p_measure text, p_filter jsonb\", returns: \"TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)\", security: \"definer\" },\n { name: \"pipeline_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_gate_preview\", args: \"p_organization_id uuid, p_table_id uuid, p_stage text, p_gate jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_move\", args: \"p_organization_id uuid, p_record_id uuid, p_to text, p_also jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_move_many\", args: \"p_organization_id uuid, p_moves jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_pending\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_read\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_transition_refusal\", args: \"p_organization_id uuid, p_record_id uuid, p_to text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipelines\", args: \"p_organization_id uuid\", returns: \"TABLE(table_id uuid, table_name text, stage_field text, stage_label text, stages integer, rules integer, broken text, updated_at timestamp with time zone, updated_by uuid)\", security: \"definer\" },\n { name: \"plural_of\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"portal_accents\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"portal_admits\", args: \"p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"portal_archive\", args: \"p_organization_id uuid, p_portal_id uuid, p_confirm_title text, p_reason text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_card\", args: \"p_organization_id uuid, p_portal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_declare\", args: \"p_organization_id uuid, p_title text, p_client_table_id uuid, p_tables jsonb, p_portal_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_sign_in_method text DEFAULT 'magic_link'::text, p_config jsonb DEFAULT NULL::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"portal_field_map\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(field_id uuid, field_key text, field_type text, points_at uuid)\", security: \"definer\" },\n { name: \"portal_form\", args: \"p_organization_id uuid, p_portal_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_form_submit\", args: \"p_organization_id uuid, p_portal_id uuid, p_form_id uuid, p_payload jsonb, p_client_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invitation\", args: \"p_slug text, p_email text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invite\", args: \"p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invite_accept\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_me\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_preview\", args: \"p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid\", returns: \"TABLE(record_id uuid, title text)\", security: \"definer\" },\n { name: \"portal_principal_bind\", args: \"p_organization_id uuid, p_principal_id uuid, p_user_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_public\", args: \"p_slug text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_record_title\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"portal_restore\", args: \"p_organization_id uuid, p_portal_id uuid, p_confirm_title text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_revoke\", args: \"p_organization_id uuid, p_portal_id uuid, p_principal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_slug\", args: \"p_organization_id uuid, p_title text, p_portal_id uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"definer\" },\n { name: \"portal_tables\", args: \"p_organization_id uuid\", returns: \"TABLE(portal_id uuid, table_id uuid, name text)\", security: \"definer\" },\n { name: \"portals\", args: \"p_organization_id uuid\", returns: \"TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)\", security: \"definer\" },\n { name: \"presentation_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"promote_field\", args: \"p_organization_id uuid, p_table_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"promote_table\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"promoted_field_cap\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"promoted_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(field_id uuid, field_key text, parity_type text, is_unique boolean, value_path text, index_arm text, index_expr text, index_name text, indexable boolean, why_not text)\", security: \"invoker\" },\n { name: \"promoted_index_arm\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_index_ddl\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(step integer, purpose text, statement text)\", security: \"invoker\" },\n { name: \"promoted_index_expr\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_index_name\", args: \"p_table_id uuid, p_field_key text, p_unique boolean\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_query_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_read\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text, p_value text\", returns: \"SETOF uuid\", security: \"invoker\" },\n { name: \"promoted_value_path\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promotion_inline_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"protected_field_notice\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"protected_field_query_refusal\", args: \"p_field_id uuid, p_verb text\", returns: \"text\", security: \"definer\" },\n { name: \"protected_field_rule\", args: \"p_token text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"protected_matches\", args: \"p_field_id uuid, p_value jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(row_id uuid, value jsonb)\", security: \"definer\" },\n { name: \"protected_readers_problem\", args: \"p_token text, p_readers jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"protected_value\", args: \"p_token text, p_row_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"protected_value_leaks\", args: \"p_field_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(place text, table_token text, field_key text, row_id uuid, ref text)\", security: \"definer\" },\n { name: \"protected_values\", args: \"p_organization_id uuid, p_token text, p_row_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"provenance_prune\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true, p_limit integer DEFAULT 200000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"provenance_retention_days\", args: \"p_organization_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"provenance_write\", args: \"p_organization_id uuid, p_conversation_id uuid, p_turn_id text, p_rows jsonb\", returns: \"integer\", security: \"definer\" },\n { name: \"public_definition_owner\", args: \"p_organization_id uuid, p_table_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"publish_bind\", args: \"p_organization_id uuid, p_kind text, p_resource_id uuid, p_slug text, p_render_mode text DEFAULT 'page'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"query_access_ids\", args: \"p_organization_id uuid, p_required text DEFAULT 'viewer'::text\", returns: \"uuid[]\", security: \"invoker\" },\n { name: \"query_across_homes\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"query_by_coordinates\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)\", security: \"definer\" },\n { name: \"query_can_see\", args: \"p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text\", returns: \"boolean\", security: \"definer\" },\n { name: \"query_hot_paths\", args: \"\", returns: \"TABLE(name text, statement text)\", security: \"invoker\" },\n { name: \"query_hot_paths_prepared\", args: \"\", returns: \"TABLE(name text, prepared boolean, generic_plans bigint)\", security: \"invoker\" },\n { name: \"query_is_store_owner\", args: \"\", returns: \"boolean\", security: \"invoker\" },\n { name: \"query_prepare_hot\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"query_principal\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"query_record_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"query_record_document\", args: \"p_principal uuid, p_row custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"query_relation_edges\", args: \"p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text\", returns: \"TABLE(parent_id uuid, child_id uuid, role text, flavor text)\", security: \"definer\" },\n { name: \"query_rollup\", args: \"p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, depth integer)\", security: \"definer\" },\n { name: \"query_rollup_sum\", args: \"p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text\", returns: \"numeric\", security: \"definer\" },\n { name: \"query_table_as_of\", args: \"p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, data jsonb)\", security: \"definer\" },\n { name: \"query_table_homes\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"query_visibility_parity\", args: \"p_organization_id uuid\", returns: \"TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)\", security: \"definer\" },\n { 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\" },\n { name: \"reachable_from\", args: \"p_organization_id uuid, p_roots uuid[]\", returns: \"TABLE(record_id uuid, depth integer, via text)\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { name: \"read_door_granted_ids\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"read_door_ladder_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"read_door_parity\", args: \"p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer\", returns: \"TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)\", security: \"definer\" },\n { name: \"read_mask\", args: \"p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_mask_at\", args: \"p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_mask_for\", args: \"p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_paths_outside_the_door\", args: \"\", returns: \"TABLE(object_name text, why text)\", security: \"invoker\" },\n { name: \"read_record\", args: \"p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_records\", args: \"p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_archived\", args: \"p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)\", security: \"definer\" },\n { name: \"read_records_by_ids\", args: \"p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_in_view_order\", args: \"p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(id uuid, document jsonb, level permission_level, \\\"position\\\" numeric)\", security: \"definer\" },\n { name: \"read_records_keyset\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_after jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_time_zone text DEFAULT NULL::text, p_ids uuid[] DEFAULT NULL::uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_records_matching\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_page\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_view_id uuid DEFAULT NULL::uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_time_zone text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"realtime_topic_admits\", args: \"p_topic text\", returns: \"boolean\", security: \"definer\" },\n { name: \"record_aggregate\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_compare jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text\", returns: \"TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)\", security: \"definer\" },\n { name: \"record_aggregate_as_of\", args: \"p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone, p_measure text DEFAULT 'count'::text, p_field_key text DEFAULT NULL::text, p_group_by text DEFAULT NULL::text, p_match jsonb DEFAULT '{}'::jsonb\", returns: \"TABLE(bucket text, result numeric, row_count bigint, not_numbers bigint, a_non_number text)\", security: \"definer\" },\n { name: \"record_applicability\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)\", security: \"invoker\" },\n { name: \"record_archiver\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(state jsonb, replayed boolean)\", security: \"definer\" },\n { name: \"record_card\", args: \"p_viewer uuid, p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_carrying_edges\", args: \"p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(container_id uuid, item_id uuid, edge_role text)\", security: \"invoker\" },\n { name: \"record_change_actions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_change_many\", args: \"p_organization_id uuid, p_table_id uuid, p_changes jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_changes_drain\", args: \"p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100\", returns: \"TABLE(event_id uuid, organization_id uuid, table_id uuid, record_id uuid, kind text, operation text, version integer, fields jsonb, changed_field_ids jsonb, actor jsonb, chain jsonb, op_id uuid, occurred_at timestamp with time zone, via text)\", security: \"definer\" },\n { name: \"record_delete\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"record_entity_edges\", args: \"p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(target_type text, target_id uuid, edge_role text, field_id uuid, ord integer)\", security: \"invoker\" },\n { name: \"record_filter_sql\", args: \"p_filter jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"record_filter_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"record_headers\", args: \"p_organization_id uuid, p_ids uuid[]\", returns: \"TABLE(id uuid, table_id uuid, created_at timestamp with time zone, updated_at timestamp with time zone, version integer, deleted_at timestamp with time zone, mine boolean, created_by uuid)\", security: \"definer\" },\n { name: \"record_history\", args: \"p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)\", security: \"definer\" },\n { name: \"record_platform_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"record_relation_edges\", args: \"p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)\", security: \"invoker\" },\n { name: \"record_reparent\", args: \"p_organization_id uuid, p_record_id uuid, p_parent_id uuid\", returns: \"void\", security: \"definer\" },\n { name: \"record_resolve\", args: \"p_organization_id uuid, p_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"void\", security: \"definer\" },\n { name: \"record_restore_preview\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_field_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore_version\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore_version\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_row_controls\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_row_controls_set\", args: \"p_organization_id uuid, p_record_id uuid, p_controls jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_runs\", args: \"p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 50\", returns: \"TABLE(run_id uuid, kind text, name text, trigger_name text, status text, started_at timestamp with time zone, finished_at timestamp with time zone, steps integer, says text, ran_by uuid)\", security: \"definer\" },\n { name: \"record_scope_context\", args: \"p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_search_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_search text, p_alias text DEFAULT 'r'::text, p_time_zone text DEFAULT NULL::text\", returns: \"text\", security: \"invoker\" },\n { name: \"record_source_key\", args: \"p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"record_source_keys\", args: \"p_table_id uuid\", returns: \"text[]\", security: \"invoker\" },\n { name: \"record_source_table\", args: \"p_key text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"record_stage_pending\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_state_as_of\", args: \"p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(state jsonb, replayed boolean)\", security: \"definer\" },\n { name: \"record_table\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_triggers\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(trigger_id uuid, name text, definition_id uuid, definition_name text, table_id uuid, event text, operations jsonb, field_ids jsonb, via jsonb, is_active boolean, last_fired_at timestamp with time zone, fire_count integer, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"record_update\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"integer\", security: \"definer\" },\n { name: \"record_update_adding_choices\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_add jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"integer\", security: \"definer\" },\n { name: \"record_upsert\", args: \"p_organization_id uuid, p_table_id uuid, p_key text[], p_data jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_value_one\", args: \"p_organization_id uuid, p_record_id uuid, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values_of\", args: \"p_row custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values_step\", args: \"p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb\", returns: \"record\", security: \"invoker\" },\n { name: \"record_values_versioned\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)\", security: \"definer\" },\n { name: \"record_words\", args: \"p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text\", returns: \"text\", security: \"definer\" },\n { name: \"record_write\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_write_graph\", args: \"p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_write_graph_superseding\", args: \"p_organization_id uuid, p_table_id uuid, p_lock_key text, p_idempotence jsonb DEFAULT NULL::jsonb, p_parent jsonb DEFAULT NULL::jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb, p_chain jsonb DEFAULT '{\\\"mode\\\": \\\"first\\\"}'::jsonb, p_rows_state jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_write_many\", args: \"p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"records_search\", args: \"p_search text, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_table_ids uuid[] DEFAULT NULL::uuid[], p_organization_ids uuid[] DEFAULT NULL::uuid[], p_include_app_tables boolean DEFAULT false\", returns: \"TABLE(record_id uuid, table_id uuid, table_name text, name text, organization_id uuid, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"refusals_claiming_a_level_never_asked\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"relation_carry\", args: \"p_organization_id uuid, p_container_id uuid, p_item_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_edges_withdraw\", args: \"p_organization_id uuid, p_field_ids uuid[], p_why text\", returns: \"integer\", security: \"definer\" },\n { name: \"relation_halves_disagreements\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(organization_id uuid, record_id uuid, field_key text, field_id uuid, target_id uuid, direction text, remedy text, why text)\", security: \"definer\" },\n { name: \"relation_halves_repair\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_kernel_record\", args: \"p_organization_id uuid, p_kernel_table_id uuid, p_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_name_key\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"relation_names_match\", args: \"p_organization_id uuid, p_table_id uuid, p_names text[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_own\", args: \"p_organization_id uuid, p_owner_id uuid, p_target_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_restore\", args: \"p_organization_id uuid, p_relation_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"relation_target_card\", args: \"p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text\", returns: \"TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)\", security: \"definer\" },\n { name: \"relation_target_external\", args: \"p_connection_token text, p_external_table text, p_external_key text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_target_ours\", args: \"p_entity_token text, p_row_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_targets\", args: \"p_organization_id uuid, p_record_id uuid, p_via_key text\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"relation_uncarry\", args: \"p_organization_id uuid, p_container_id uuid, p_item_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"relation_value_target_ok\", args: \"p_organization_id uuid, p_field_id uuid, p_field_data jsonb, p_target_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"relation_words\", args: \"p_organization_id uuid, p_field_id uuid, p_value text\", returns: \"text\", security: \"definer\" },\n { name: \"relation_words_many\", args: \"p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, words text, archived boolean)\", security: \"definer\" },\n { name: \"relation_words_with_icons_many\", args: \"p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, words text, archived boolean, icon text, table_icon text)\", security: \"definer\" },\n { name: \"reopen_declared_doors\", args: \"\", returns: \"TABLE(reopened text)\", security: \"definer\" },\n { name: \"required_epoch\", args: \"p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid\", returns: \"bigint\", security: \"definer\" },\n { name: \"resolve_context\", args: \"p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"resolve_first_match\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"resolve_id\", args: \"p_organization_id uuid, p_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"retired_actor_words\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"reverse_columns\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(key text, label text, source_field_id uuid, source_field_key text, source_field_label text, source_table_id uuid, source_table_name text, cardinality text, read_only boolean)\", security: \"definer\" },\n { name: \"reverse_links_many\", args: \"p_organization_id uuid, p_table_id uuid, p_field_id uuid, p_record_ids uuid[], p_limit integer DEFAULT 10, p_offset integer DEFAULT 0\", returns: \"TABLE(record_id uuid, total integer, links jsonb)\", security: \"definer\" },\n { name: \"rollup_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"row_actions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"row_sits_in_a_personal_table\", args: \"p_type text, p_organization_id uuid, p_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"row_template_bodies\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(template_id uuid, body jsonb)\", security: \"definer\" },\n { name: \"row_template_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { 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\" },\n { name: \"rule_applies\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_context\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_declare\", args: \"p_organization_id uuid, p_spec jsonb, p_rule_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"rule_dependency_edges\", args: \"p_organization_id uuid, p_row custom.record DEFAULT NULL::custom.record\", returns: \"TABLE(needs text, needed text)\", security: \"invoker\" },\n { name: \"rule_eval\", args: \"p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_field_key\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_field_label\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_filter_node_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_node jsonb, p_map jsonb, p_visible text[]\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"rule_members\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"rule_members_visible\", args: \"p_organization_id uuid, p_rule_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"rule_membership\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_node_kinds\", args: \"\", returns: \"TABLE(node text, evaluated_by text, note text)\", security: \"invoker\" },\n { name: \"rule_restore\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"rule_run\", args: \"p_organization_id uuid, p_rule_id uuid, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_sql_op\", args: \"p_op text, p_a jsonb, p_b jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_truth\", args: \"p_answer jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"rule_uses\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"rule_version\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"said\", args: \"p_value text, p_when_there_is_none text\", returns: \"text\", security: \"invoker\" },\n { name: \"scope_item_row_of\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_item_value_type\", args: \"p_field jsonb, p_carried jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"scope_items_of\", args: \"p_org uuid, p_table uuid\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"scope_member_reaches\", args: \"p_user_id uuid, p_record_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"invoker\" },\n { name: \"scope_row_of\", args: \"p_rec custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_rows_of\", args: \"p_org uuid, p_types uuid[] DEFAULT NULL::uuid[]\", returns: \"TABLE(id uuid, table_id uuid, type_sort integer, sort_order integer, name text, type_doc jsonb, row_doc jsonb)\", security: \"invoker\" },\n { name: \"scope_setting_back\", args: \"p_value jsonb, p_behavior text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_table_provision\", args: \"p_organization_id uuid, p_item_id uuid, p_scope_id uuid, p_home_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"scope_type_row_of\", args: \"p_table custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_value_columns\", args: \"p_org uuid, p_field jsonb, p_value_type text, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"seen_among\", args: \"p_user_id uuid, p_ids uuid[]\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"sensitivity_rank\", args: \"p_sensitivity text\", returns: \"integer\", security: \"invoker\" },\n { name: \"set_table_confidential_arman_explicitly_approved\", args: \"p_table_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date, p_maker_is_reader boolean DEFAULT NULL::boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_access\", args: \"p_organization_id uuid, p_subject_id uuid\", returns: \"TABLE(principal_kind text, principal_id uuid, principal_label text, level permission_level, reason text, reason_detail text, via_type text, via_id uuid, revocable boolean)\", security: \"definer\" },\n { name: \"share_grant\", args: \"p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_lane_set\", args: \"p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_lanes\", args: \"\", returns: \"TABLE(choice text, lane text, discoverable boolean, label text, means text)\", security: \"definer\" },\n { name: \"share_levels\", args: \"\", returns: \"TABLE(level permission_level, ordinal integer, label text, means text)\", security: \"definer\" },\n { name: \"share_people\", args: \"p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25\", returns: \"TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)\", security: \"definer\" },\n { name: \"share_revoke\", args: \"p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_subject_name\", args: \"p_organization_id uuid, p_type text, p_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"shared_only_disagreements\", args: \"p_pretend text DEFAULT NULL::text\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, record_id uuid, table_id uuid, ladder boolean, read_door boolean, rls_mirror boolean, why text)\", security: \"invoker\" },\n { name: \"shares_outside\", args: \"p_organization_id uuid\", returns: \"TABLE(invitation_id uuid, table_id uuid, table_name text, email text, level text, level_label text, status text, joined boolean, expired boolean, invited_at timestamp with time zone, expires_at timestamp with time zone, say text)\", security: \"definer\" },\n { name: \"sign_request_cancel\", args: \"p_organization_id uuid, p_request_id uuid, p_reason text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_create\", args: \"p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_email text, p_signer_name text, p_expires_in interval DEFAULT '14 days'::interval\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_decline\", args: \"p_token text, p_reason text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_public\", args: \"p_token text, p_origin text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_remind\", args: \"p_organization_id uuid, p_request_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_sentence\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"sign_request_sign\", args: \"p_token text, p_signed_name text, p_mark text, p_image text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text, p_origin text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_state\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"sign_request_unchanged\", args: \"p_organization_id uuid, p_request_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"sign_requests\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(request_id uuid, render_id uuid, record_id uuid, field_key text, document_title text, signer_name text, signer_email text, signer_has_account boolean, state text, sentence text, document_version integer, document_hash text, sent_at timestamp with time zone, expires_at timestamp with time zone, viewed_at timestamp with time zone, signed_at timestamp with time zone, declined_at timestamp with time zone, invalidated_at timestamp with time zone, signature_id uuid, signature_mark text, reminder_count integer)\", security: \"definer\" },\n { name: \"sign_token_decode\", args: \"p_token text\", returns: \"bytea\", security: \"invoker\" },\n { name: \"sign_token_encode\", args: \"p_bytes bytea\", returns: \"text\", security: \"invoker\" },\n { name: \"silent_page_doors\", args: \"\", returns: \"TABLE(door text, why text)\", security: \"definer\" },\n { name: \"size_refusal\", args: \"p_organization_id uuid, p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"source_next_pointer\", args: \"p_sources jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"source_pointer\", args: \"p_sources jsonb, p_source jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"stage_rule_enforcement\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"stage_rule_on_fail_kinds\", args: \"\", returns: \"TABLE(behaviour text, note text)\", security: \"invoker\" },\n { name: \"stamp_value_envelopes\", args: \"p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"status_groups_keyed\", args: \"p_organization_id uuid, p_options_table_id uuid, p_groups jsonb, p_kept jsonb, p_label text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"status_groups_of\", args: \"p_groups jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"storage_modes\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"store_census_pair_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"store_is_open\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"store_off_sentence\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"subscription_cadences\", args: \"p_organization_id uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"subscription_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"subscription_mute\", args: \"p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true\", returns: \"boolean\", security: \"definer\" },\n { name: \"subscription_preview\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"subscriptions\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)\", security: \"definer\" },\n { name: \"table_add_rung\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"table_archive\", args: \"p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 50, p_include_table boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_archive_deliberately\", args: \"p_organization_id uuid, p_table_id uuid, p_typed_slug text, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_capacity\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_carries_its_rows\", args: \"p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_column_source\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"table_contents\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(record_id uuid, kind text, goes_at integer)\", security: \"invoker\" },\n { name: \"table_copies_in_progress\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_declare\", args: \"p_organization_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"table_decorate\", args: \"p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_decorations\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_dimensions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_dimensions_set\", args: \"p_organization_id uuid, p_table_id uuid, p_overrides jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_duplicate\", args: \"p_table_id uuid, p_with_records boolean DEFAULT false, p_name text DEFAULT NULL::text, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_duplicate_continue\", args: \"p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_ensure\", args: \"p_organization_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_facts\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(table_id uuid, visibility text, mine boolean, kept_by_the_app boolean, kept_for text, offered_as_context boolean, keeper_group text, keeper_says text, used_in_kind text, used_in_id uuid, used_in_table_id uuid, foundation boolean)\", security: \"definer\" },\n { name: \"table_find\", args: \"p_organization_id uuid, p_slug text DEFAULT NULL::text, p_name text DEFAULT NULL::text, p_kept_for text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_from_example\", args: \"p_organization_id uuid, p_home_id uuid, p_example jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_has_a_visible_record\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_home\", args: \"p_table_id uuid, p_to_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_is_foundation\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_live\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_options_table\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_platform_context\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_kept_for_derived\", args: \"p_data jsonb, p_is_kernel boolean, p_is_options boolean\", returns: \"text\", security: \"invoker\" },\n { name: \"table_kept_out_of_lists\", args: \"p_kept_for text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"table_kind_facts\", args: \"p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_list_everywhere\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_list_everywhere\", args: \"p_organization_id uuid, p_include_app_tables boolean\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_move\", args: \"p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_placement\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_record_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"table_record_ceiling\", args: \"p_organization_id uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"table_restore\", args: \"p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 20\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_counts\", args: \"p_organization_id uuid, p_table_ids uuid[]\", returns: \"TABLE(table_id uuid, visible_rows bigint)\", security: \"definer\" },\n { name: \"table_row_defaults\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_defaults_apply\", args: \"p_organization_id uuid, p_table_id uuid, p_after uuid DEFAULT NULL::uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_defaults_set\", args: \"p_organization_id uuid, p_table_id uuid, p_defaults jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_rules\", args: \"p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"table_share_outside\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_accept\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_for_me\", args: \"\", returns: \"TABLE(invitation_id uuid, organization_id uuid, organization text, table_id uuid, table_name text, level text, level_label text, token text, expires_at timestamp with time zone, say text)\", security: \"definer\" },\n { name: \"table_share_outside_grant\", args: \"p_organization_id uuid, p_table_id uuid, p_person text, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_invite\", args: \"p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_resend\", args: \"p_organization_id uuid, p_invitation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_revoke\", args: \"p_organization_id uuid, p_invitation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_stage_field\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"table_storage\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"table_sync\", args: \"p_organization_id uuid, p_home_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_template_declare\", args: \"p_org_id uuid, p_name text, p_description text, p_fields jsonb\", returns: \"uuid\", security: \"invoker\" },\n { name: \"table_templates\", args: \"p_org_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_transfer_owner\", args: \"p_table_id uuid, p_to_person uuid, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_type_field\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"table_unique_rule_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_webhook_archive\", args: \"p_organization_id uuid, p_webhook_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_webhook_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_target_url text, p_events text[] DEFAULT NULL::text[], p_description text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_webhooks\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(webhook_id uuid, target_url text, description text, events text[], is_active boolean, last_attempt_at timestamp with time zone, last_success_at timestamp with time zone, consecutive_failures integer, owner_id uuid, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"table_work_kind\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"tables_at_home\", args: \"p_organization_id uuid, p_home_ids uuid[]\", returns: \"TABLE(table_id uuid, home_record_id uuid, kind text)\", security: \"definer\" },\n { name: \"tables_described_without_asking\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"tables_i_can_open\", args: \"\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"tables_listed_among\", args: \"p_organization_id uuid, p_tables uuid[]\", returns: \"SETOF uuid\", security: \"invoker\" },\n { name: \"tables_seen_among\", args: \"p_user_id uuid, p_organization_ids uuid[], p_among uuid[]\", returns: \"TABLE(organization_id uuid, id uuid, seen boolean)\", security: \"definer\" },\n { name: \"tables_seen_once_per_group\", args: \"p_user_id uuid, p_organization_ids uuid[]\", returns: \"TABLE(organization_id uuid, id uuid, seen boolean)\", security: \"definer\" },\n { name: \"tables_shared_with_me\", args: \"\", returns: \"TABLE(table_id uuid, organization_id uuid, organization text, table_name text, level text, level_label text, shared_at timestamp with time zone, opens boolean, say text)\", security: \"definer\" },\n { name: \"template_archive\", args: \"p_template_id uuid, p_restore boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_declare\", args: \"p_scope text, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_from_tables\", args: \"p_organization_id uuid, p_table_ids uuid[], p_include_rows boolean DEFAULT false, p_rows_per_table integer DEFAULT 25\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install\", args: \"p_organization_id uuid, p_template_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install_claim\", args: \"p_organization_id uuid, p_install_id uuid, p_kind text, p_label text, p_source_id uuid DEFAULT NULL::uuid, p_lease_seconds integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install_note\", args: \"p_organization_id uuid, p_install_id uuid, p_kind text, p_id uuid, p_label text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_keep\", args: \"p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_restore\", args: \"p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_uninstall\", args: \"p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_upgrade\", args: \"p_organization_id uuid, p_install_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"templates\", args: \"p_filter jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"text_head_bytes\", args: \"p_text text, p_bytes bigint\", returns: \"text\", security: \"invoker\" },\n { name: \"trg_associations_bump_visibility\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"undeclared_keys\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"unresolved_sources_of\", args: \"p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"validate_custom_fields\", args: \"p_token text, p_organization_id uuid, p_values jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"validate_value_envelope\", args: \"p_organization_id uuid, p_fields custom.record[], p_data jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"validate_values\", args: \"p_organization_id uuid, p_fields custom.record[], p_values jsonb, p_record_type text DEFAULT NULL::text\", returns: \"void\", security: \"invoker\" },\n { name: \"value_alternate_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"value_envelope_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"value_envelope_ok\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"value_envelope_refusal\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"value_read\", args: \"p_organization_id uuid, p_record_id uuid, p_key text\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)\", security: \"definer\" },\n { name: \"value_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"value_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer, p_author jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"value_versions\", args: \"p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"view_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"view_designate\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_layout text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"view_keys\", args: \"\", returns: \"TABLE(path text, shape text, layouts text[], writer text, sentence text)\", security: \"invoker\" },\n { name: \"view_keys_check\", args: \"p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"view_look_read\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"view_look_set\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"view_record_order_set\", args: \"p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"views\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(view_id uuid, name text, table_id uuid, filters jsonb, definition jsonb, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"visibility_ancestors\", args: \"p_item_type text, p_item_id uuid\", returns: \"TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)\", security: \"definer\" },\n { name: \"visibility_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(principal_kind text, principal_id uuid, level permission_level, through_kind text, through_id uuid, reason text, replayed boolean, held_from timestamp with time zone, held_to timestamp with time zone)\", security: \"definer\" },\n { name: \"visibility_cache_rebuild\", args: \"\", returns: \"integer\", security: \"definer\" },\n { name: \"visibility_parity\", args: \"\", returns: \"TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)\", security: \"definer\" },\n { name: \"visibility_warm\", args: \"p_container_type text, p_container_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"visible_predicate_sql\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text\", returns: \"text\", security: \"definer\" },\n { name: \"visible_record_ids\", args: \"p_user_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"TABLE(id uuid)\", security: \"definer\" },\n { name: \"visible_set\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text\", returns: \"record\", security: \"definer\" },\n { name: \"where_id_opens\", args: \"p_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"where_lists_live\", args: \"p_list_ids uuid[]\", returns: \"TABLE(list_id uuid, lives_in text, address text, why text)\", security: \"definer\" },\n { name: \"where_tables_live\", args: \"p_table_ids uuid[]\", returns: \"TABLE(table_id uuid, lives_in text, why text)\", security: \"definer\" },\n { name: \"whole_value_ceiling\", args: \"p_organization_id uuid\", returns: \"bigint\", security: \"invoker\" },\n { name: \"whole_value_complete\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_file_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"whole_value_head\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"whole_value_park\", args: \"p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_owner_id uuid, p_visibility platform.visibility, p_data jsonb, p_park jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"whole_value_pointer_of\", args: \"p_values jsonb, p_sources jsonb, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"whole_value_source\", args: \"p_text text, p_writer_src jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"whole_values_waiting\", args: \"p_organization_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, field_key text, pointer text, value_version integer, sha256 text, bytes bigint, chars bigint, owner_id uuid, record_visibility text, table_id uuid, table_name text)\", security: \"definer\" },\n { name: \"widget_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"with_retired\", args: \"p_doc jsonb, p_retired jsonb, p_visible text[], p_declared text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"with_whole_value_pointers\", args: \"p_document jsonb, p_values jsonb, p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"withheld_marker\", args: \"p_mask jsonb, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"withheld_sentence\", args: \"p_mask jsonb, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"work_approval_approvers\", args: \"p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(user_id uuid, name text, why text)\", security: \"definer\" },\n { name: \"work_approval_decide\", args: \"p_organization_id uuid, p_approval_id uuid, p_approve boolean, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"work_approval_may_decide\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_approval_read\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_request\", args: \"p_organization_id uuid, p_subject_id uuid, p_change jsonb, p_note text DEFAULT NULL::text, p_approver_id uuid DEFAULT NULL::uuid, p_origin text DEFAULT 'person'::text, p_conversation_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_withdrawal\", args: \"p_organization_id uuid, p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"work_assign\", args: \"p_organization_id uuid, p_record_id uuid, p_assignee_user_id uuid, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_clear_due boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_assignment_fields\", args: \"p_options_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(key text, label text, spec jsonb)\", security: \"invoker\" },\n { name: \"work_decide_many\", args: \"p_organization_id uuid, p_decisions jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_has_assignment\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_inbox\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text\", returns: \"TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone, table_id uuid, table_name text, decided_by uuid, decided_by_name text, decided_at timestamp with time zone, outcome text, snoozed_until timestamp with time zone, cleared_at timestamp with time zone, snoozed_count integer, cleared_count integer, undo_seconds integer, undo_refusal text)\", security: \"definer\" },\n { name: \"work_instantiation_shape\", args: \"p_organization_id uuid, p_instantiation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_list\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"TABLE(record_id uuid, table_id uuid, table_name text, title text, assignee_id uuid, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, terminal boolean, assigned_by uuid, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"work_person\", args: \"p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true\", returns: \"uuid\", security: \"definer\" },\n { name: \"work_record_states\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(state_id uuid, name text, sort integer, terminal boolean, is_current boolean, allowed boolean, refusal text)\", security: \"definer\" },\n { name: \"work_relation_kinds\", args: \"\", returns: \"TABLE(kind text, available boolean, why text)\", security: \"invoker\" },\n { name: \"work_set_state\", args: \"p_organization_id uuid, p_record_id uuid, p_state_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_slot_expire\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"work_slot_hold\", args: \"p_organization_id uuid, p_table_id uuid, p_slot_key text, p_holder text, p_ttl interval DEFAULT '00:15:00'::interval\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_slot_holds\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(hold_id uuid, slot_key text, holder text, expires_at timestamp with time zone, expired boolean)\", security: \"definer\" },\n { name: \"work_slot_index_name\", args: \"p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"work_slot_release\", args: \"p_organization_id uuid, p_hold_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_slots_declare\", args: \"p_organization_id uuid, p_name text, p_slug text, p_home_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_state_id\", args: \"p_organization_id uuid, p_table_id uuid, p_value text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"work_states\", args: \"\", returns: \"TABLE(sort integer, name text, terminal boolean, next text[])\", security: \"invoker\" },\n { name: \"work_take_assignment\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_template_declare\", args: \"p_organization_id uuid, p_name text, p_graph jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"work_template_instantiate\", args: \"p_organization_id uuid, p_template_id uuid, p_overrides jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_template_refusal\", args: \"p_graph jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"work_template_shape\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_templates\", args: \"p_organization_id uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, nodes integer, relations integer, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"work_transition_refusal\", args: \"p_organization_id uuid, p_from_state_id uuid, p_to_state_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"work_whose_turn\", args: \"p_organization_id uuid, p_table_id uuid, p_include_finished boolean DEFAULT false\", returns: \"TABLE(record_id uuid, title text, assignee_id uuid, turn text, due_on timestamp with time zone, state text, status text, terminal boolean)\", security: \"definer\" },\n { name: \"world_reader_may_know_row\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"world_reader_only\", args: \"p_organization_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"world_reader_reads_public_definition\", args: \"p_organization_id uuid, p_table_id uuid, p_record_ids uuid[]\", returns: \"boolean\", security: \"definer\" },\n] as const;\n\n/** The campaign's own knobs, with the value the store resolves them to today. */\nexport const STORE_KNOBS = [\n { key: \"accessible_entity_ids_guard\", value: \"true\", type: \"boolean\" },\n { key: \"action_run_records_max\", value: \"5000\", type: \"integer\" },\n { key: \"agent_context_reads_the_copy\", value: \"true\", type: \"boolean\" },\n { key: \"agent_context_value_cap_bytes\", value: \"0\", type: \"integer\" },\n { key: \"agent_schema_changes\", value: \"\\\"ask\\\"\", type: \"string\" },\n { key: \"archive_confirm_over\", value: \"1000\", type: \"integer\" },\n { key: \"back_links\", value: \"true\", type: \"boolean\" },\n { key: \"batch_items_max\", value: \"500\", type: \"integer\" },\n { key: \"choice_nudge\", value: \"\\\"ask\\\"\", type: \"string\" },\n { key: \"closed_custom_field_tables\", value: \"[\\\"party\\\"]\", type: \"json\" },\n { key: \"code_paths_enabled\", value: \"true\", type: \"boolean\" },\n { key: \"consumer_chat_seeding_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_checkout_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_context_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_education_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_extension_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_grid_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_retirement_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_saved_ai_outputs_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_scopes_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"containment_depth_ceiling\", value: \"16\", type: \"integer\" },\n { key: \"context_copy_following\", value: \"true\", type: \"boolean\" },\n { key: \"cross_organization_links\", value: \"false\", type: \"boolean\" },\n { key: \"data_home_default_kind\", value: \"\\\"all\\\"\", type: \"string\" },\n { key: \"data_home_default_order\", value: \"\\\"updated\\\"\", type: \"enum\" },\n { key: \"data_home_default_scope\", value: \"\\\"all\\\"\", type: \"enum\" },\n { key: \"data_home_default_view\", value: \"\\\"table\\\"\", type: \"enum\" },\n { key: \"decision_undo_seconds\", value: \"5\", type: \"integer\" },\n { key: \"decoration_rules_max\", value: \"50\", type: \"integer\" },\n { key: \"decorations_max_bytes\", value: \"262144\", type: \"integer\" },\n { key: \"document_letterhead\", value: \"{}\", type: \"json\" },\n { key: \"document_max_bytes\", value: \"1048576\", type: \"integer\" },\n { key: \"enrichment_batch_ceiling\", value: \"200\", type: \"integer\" },\n { key: \"enrichment_confidence_floor\", value: \"0.6\", type: \"number\" },\n { key: \"enrichment_cost_cap_cents\", value: \"2000\", type: \"integer\" },\n { key: \"enrichment_model\", value: \"\\\"claude-fable-5-latest\\\"\", type: \"string\" },\n { key: \"enrichment_sensitivity_ceiling\", value: \"\\\"internal\\\"\", type: \"string\" },\n { key: \"entity_types_guard\", value: \"false\", type: \"boolean\" },\n { key: \"example_rows_max\", value: \"500\", type: \"integer\" },\n { key: \"export_rows_ceiling\", value: \"100000\", type: \"integer\" },\n { key: \"external_principal_enabled\", value: \"true\", type: \"boolean\" },\n { key: \"field_sensitivity_levels\", value: \"{\\\"edit\\\": {\\\"public\\\": \\\"editor\\\", \\\"internal\\\": \\\"editor\\\", \\\"restricted\\\": \\\"admin\\\", \\\"confidential\\\": \\\"admin\\\"}, \\\"read\\\": {\\\"public\\\": \\\"viewer\\\", \\\"internal\\\": \\\"viewer\\\", \\\"restricted\\\": \\\"admin\\\", \\\"confidential\\\": \\\"editor\\\"}}\", type: \"json\" },\n { key: \"form_draft_days\", value: \"30\", type: \"integer\" },\n { key: \"form_draft_max_bytes\", value: \"65536\", type: \"integer\" },\n { key: \"form_draft_saves_per_hour\", value: \"240\", type: \"integer\" },\n { key: \"form_redirect_domains\", value: \"[]\", type: \"json\" },\n { key: \"grid_layout\", value: \"{\\\"mode\\\": \\\"auto\\\", \\\"wrap\\\": false, \\\"row_height\\\": \\\"normal\\\", \\\"fit_max_columns\\\": 8, \\\"freeze_first_column\\\": false}\", type: \"json\" },\n { key: \"inbound_domain\", value: \"\\\"inbound.matrxserver.com\\\"\", type: \"string\" },\n { key: \"inbox_reminder_after_days\", value: \"3\", type: \"integer\" },\n { key: \"member_default_level\", value: \"\\\"editor\\\"\", type: \"enum\" },\n { key: \"outside_invite_who\", value: \"\\\"org_admins_and_table_owners\\\"\", type: \"string\" },\n { key: \"page_size_ceiling\", value: \"1000\", type: \"integer\" },\n { key: \"protected_field_rules\", value: \"{\\\"hr_employee\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_candidate\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_position_assignment\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_training_assignment\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}}\", type: \"json\" },\n { key: \"provenance_retention_days\", value: \"30\", type: \"number\" },\n { key: \"row_action_steps_max\", value: \"60\", type: \"integer\" },\n { key: \"row_actions_max\", value: \"24\", type: \"integer\" },\n { key: \"sandbox_message_bytes\", value: \"65536\", type: \"integer\" },\n { key: \"sandbox_org_components\", value: \"true\", type: \"boolean\" },\n { key: \"scope_members_admitted\", value: \"true\", type: \"boolean\" },\n { key: \"scopes_written_in_the_store\", value: \"true\", type: \"boolean\" },\n { key: \"signup_provisioning_guard\", value: \"false\", type: \"boolean\" },\n { key: \"stage_rule_enforcement\", value: \"\\\"refuse\\\"\", type: \"enum\" },\n { key: \"table_record_ceiling\", value: \"150000\", type: \"integer\" },\n { key: \"table_sync_rows_max\", value: \"20000\", type: \"integer\" },\n { key: \"table_webhooks_max\", value: \"10\", type: \"integer\" },\n { key: \"time_zone\", value: \"\\\"UTC\\\"\", type: \"string\" },\n { key: \"value_max_bytes\", value: \"100000\", type: \"integer\" },\n { key: \"view_record_order_max\", value: \"20000\", type: \"integer\" },\n { key: \"week_start\", value: \"\\\"monday\\\"\", type: \"enum\" },\n { key: \"world_publish_enabled\", value: \"false\", type: \"boolean\" },\n] as const;\n\n/**\n * Every SQLSTATE the store's own function bodies raise, with the functions that\n * raise it. This is the list the client's refusal mapper is checked against: a\n * code the store can raise and the package cannot name is a hole, and the\n * real-door suite says so by name.\n */\nexport const STORE_REFUSAL_CODES = [\n { code: \"02000\", raised_by: \"_checklist_instantiate,_entity_change_file,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_restore,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_restore,doc_template_save,enrich_pin,entity_back_links,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_record_read,entity_row_propose,entity_row_write,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,field_choice_usage,field_restore,field_update_rehoming_choices,form_archive,form_restore,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_change_many,record_delete,record_restore,record_restore_preview,record_row_controls,record_row_controls_set,record_table,record_update,record_write_graph_superseding,relation_halves_repair,relation_restore,relation_uncarry,rule_restore,set_table_confidential_arman_explicitly_approved,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_archive_deliberately,table_restore,table_row_defaults,table_row_defaults_apply,table_row_defaults_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,template_from_tables,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state\" },\n { code: \"0A000\", raised_by: \"checklist_step_complete,entity_row_write,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,read_records_keyset,read_records_page,rule_eval,rule_filter_node_sql,work_assign\" },\n { code: \"22003\", raised_by: \"context_resolve\" },\n { code: \"22004\", raised_by: \"_entity_change_file,_entity_custom_fields_guard,_io_outbox_claim,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,assert_scope_door,booking_declare,capture_submit,checklist_declare,context_resolve,context_template_define,context_type_write,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,entity_field_protect_arman_explicitly_approved,entity_row_propose,entity_row_write,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_look_options,form_submit,home_add,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_outbox_release_claimed,io_outbox_subscribe,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_aggregate_as_of,record_delete,record_reparent,record_resolve,record_restore,record_update,record_upsert,record_write,record_write_graph,record_write_graph_superseding,record_write_many,relation_carry,relation_halves_repair,relation_own,row_template_declare,rule_declare,set_table_confidential_arman_explicitly_approved,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_archive_deliberately,table_declare,table_duplicate,table_move,table_restore,table_share_outside_grant,table_share_outside_invite,template_declare,value_restore,view_declare,view_designate,view_look_read,view_look_set,whole_value_complete,work_approval_decide,work_approval_request,work_template_declare\" },\n { code: \"22007\", raised_by: \"_template_date,agg_parse_moment,dashboard_window_sql\" },\n { code: \"22012\", raised_by: \"formula_eval,rule_eval,rule_sql_op\" },\n { code: \"22023\", raised_by: \"_action_check,_automation_fire,_booking_availability,_ctx_reference_value_holds,_ctx_store_scope,_ctx_table_template_field_holds,_ctx_tree_part,_decorations_check,_entity_change_file,_entity_custom_fields_guard,_form_flow_judge,_form_look_judge,_fx_date,_fx_num,_fx_regex,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_rule_eval_seated,_table_dimensions_check,_take_op_id,_template_bind,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,_write_via_mark,action_run,actor_word,agent_change_trust,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,context_scope_write,context_scopes,context_template_define,context_type_write,context_values,count_records_archived,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,data_home,data_home_changed_by,doc_render_body,doc_render_write,doc_signature_write,drill_resolve,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_back_links,entity_fields_across,entity_read_mask,entity_reference_rows,entity_reference_search,entity_reference_words,entity_row_write,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_access,field_history,field_update,form_declare,form_draft_save,form_visit,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbound_domain,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,listed_predicate_sql,member_records_take_over,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pick_list_create,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,publish_bind,query_by_coordinates,query_rollup,query_rollup_sum,read_records_archived,read_records_in_view_order,read_records_keyset,read_records_page,record_aggregate_as_of,record_change_many,record_filter_sql,record_row_controls_set,record_search_sql,record_update,record_upsert,record_write_graph,record_write_graph_superseding,record_write_many,records_search,relation_carry,relation_names_match,row_template_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_archive_deliberately,table_ensure,table_find,table_from_example,table_move,table_row_defaults_set,table_rules,table_share_outside_grant,table_sync,table_template_declare,table_transfer_owner,table_webhook_declare,template_declare,template_from_tables,template_install_claim,template_install_note,template_upgrade,templates,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold\" },\n { code: \"23503\", raised_by: \"_action_check,_automation_fire,_automation_flip,_booking_availability,_checklist_instantiate,_containment_guard,_ctx_store_value,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_form_flow_judge,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,automation_declare,automation_runs,automations,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_results,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,migrate_purge_hard,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,read_records_page,record_applicability,record_reparent,record_write_graph_superseding,relation_carry,relation_own,resolve_first_match,row_template_declare,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_dimensions_set,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,whole_value_complete,work_set_state,work_take_assignment,work_template_instantiate\" },\n { code: \"23505\", raised_by: \"_ctx_store_item,_ctx_store_scope,_ctx_store_type,_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,field_restore,field_update,form_restore,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,relation_restore,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold\" },\n { code: \"23514\", raised_by: \"_checklist_instantiate,_checklist_step_guard,_containment_guard,_ctx_scope_parent_holds,_ctx_store_item,_ctx_table_template_field_holds,_ctx_value_fits_its_scope,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_choice_keys,_entity_custom_fields_guard,_field_choices_save,_field_class_guard,_field_default_fitted,_field_document_for,_field_kind_shape_ok,_field_shape_guard,_field_type_parity_guard,_kind_value_ok,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,dashboard_restore,doc_sign,doc_signature_write,doc_template_restore,doc_template_save,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_records_find,entity_table,entity_value_write,field_declare,field_restore,field_retire,field_update,field_update_rehoming_choices,form_restore,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_update_adding_choices,record_upsert,record_write_graph,record_write_graph_superseding,relation_carry,relation_halves_repair,relation_own,relation_restore,rollup_value,row_template_declare,rule_restore,sign_request_create,sign_request_sign,status_groups_keyed,status_groups_of,table_from_example,table_restore,template_upgrade,validate_value_envelope,validate_values,whole_value_complete,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate\" },\n { code: \"40001\", raised_by: \"has_visibility_at,table_move,whole_value_complete\" },\n { code: \"42501\", raised_by: \"_agent_change_gate,_context_copy_fence,_copy_evaluation_note,_copy_evaluation_reimage,_copy_in_progress_guard,_doc_render_immutable,_doc_signature_immutable,_entity_change_file,_entity_custom_fields_guard,_field_definition_write,_field_write_door,_io_outbox_server_only,_not_a_member_refusal,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_share_write_person,_store_door,_table_dimensions_infer,_table_duplicate_step,_table_shape_guard,_template_call,_value_envelope,_workdoors_approval_guard,agent_change_trust,agent_table_claim,agg_fields_readable_assert,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_may_know_table,assert_organization_admin,assert_scope_door,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_item_archive,context_item_restore,context_item_write,context_resolve,context_scope_archive,context_scope_restore,context_scope_write,context_tags_set,context_type_archive,context_type_restore,context_type_write,conversation_scope_bind,conversation_scope_unbind,count_records_archived,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_row_propose,entity_row_write,entity_value_write,external_write_through,field_restore,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,protected_matches,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_keyset,read_records_matching,read_records_page,record_delete,record_row_controls,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,reverse_links_many,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_archive_deliberately,table_copies_in_progress,table_duplicate,table_duplicate_continue,table_kind_facts,table_move,table_row_defaults_apply,table_row_defaults_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_sync,table_templates,table_transfer_owner,table_webhook_declare,template_declare,template_install,template_upgrade,templates,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,whole_value_complete,work_approval_decide,work_approval_read,work_approval_request,work_person\" },\n { code: \"42703\", raised_by: \"entity_table,portal_declare\" },\n { code: \"42883\", raised_by: \"_template_call\" },\n { code: \"42P17\", raised_by: \"_field_reads_what_it_reads,far_value\" },\n { code: \"53400\", raised_by: \"anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field\" },\n { code: \"54000\", raised_by: \"_table_dimensions_check,action_run,data_home_changed_by,form_draft_save,hub_changed_by,pipeline_move_many,record_change_many,record_headers,relation_names_match,reverse_links_many,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many\" },\n { code: \"54001\", raised_by: \"record_delete\" },\n { code: \"55000\", raised_by: \"_code_depends_refuse,_io_outbox_claim,entity_field_protect_arman_explicitly_approved,inbox_clear,inbox_snooze,io_outbox_release,io_outbox_subscribe,table_duplicate,table_ensure,table_move,template_install,template_restore,template_upgrade,work_approval_decide,work_approval_request\" },\n { code: \"57014\", raised_by: \"formula_eval\" },\n { code: \"MXD01\", raised_by: \"_held_change_refusal\" },\n { code: \"MXD02\", raised_by: \"entity_row_propose\" },\n { code: \"P0001\", raised_by: \"action_run,context_scope_write\" },\n { code: \"P0002\", raised_by: \"inbox_clear,inbox_snooze,publish_bind,template_archive,template_install,template_install_claim,template_install_note,template_keep,template_restore,template_uninstall,template_upgrade,whole_value_complete\" },\n { code: \"PT409\", raised_by: \"entity_row_write,record_change_many,record_update,record_upsert,record_write_graph_superseding\" },\n { code: \"PT428\", raised_by: \"_record_rule_uses\" },\n] as const;\n\n/** `platform.entity_types` — the registered tokens a Table or relation may name. */\nexport const ENTITY_TOKENS = [\n \"access_delta_probe\",\n \"access_delta_run\",\n \"access_request\",\n \"account_addon\",\n \"account_closure\",\n \"acquisition_block\",\n \"activity\",\n \"admin_audit_log\",\n \"admin_email_log\",\n \"admin_markdown_sample\",\n \"admin_user\",\n \"admission_config\",\n \"agent\",\n \"agent_card\",\n \"agent_definition_version\",\n \"agent_drift_alert\",\n \"agent_exemplar\",\n \"agent_mandate_note\",\n \"agent_prompt_remediation\",\n \"agent_run\",\n \"agent_run_stage\",\n \"agent_schedule\",\n \"agent_schedule_claim\",\n \"agent_shortcut\",\n \"agent_surface_binding\",\n \"agent_template\",\n \"agent_term_list\",\n \"agent_usage\",\n \"agent_user_kv\",\n \"ai_api\",\n \"ai_calls\",\n \"ai_endpoint\",\n \"ai_model\",\n \"ai_model_alias\",\n \"ai_offering\",\n \"ai_provider\",\n \"ai_setting\",\n \"ai_setting_profile\",\n \"ai_translation_cell\",\n \"ai_usage_executions\",\n \"ai_usage_hourly\",\n \"ai_usage_hourly_watermark\",\n \"analysis_result\",\n \"anon_form\",\n \"anon_form_visit\",\n \"anon_function_birth_grandfather\",\n \"anon_hit\",\n \"anon_inbound\",\n \"anon_replay\",\n \"anon_submission\",\n \"anon_token\",\n \"api_field_warning\",\n \"api_request_log\",\n \"app\",\n \"app_config\",\n \"app_config_history\",\n \"app_definition_version\",\n \"app_error\",\n \"app_execution\",\n \"app_instance\",\n \"app_log\",\n \"app_log_muted_pattern\",\n \"app_log_norm_exception\",\n \"app_rate_limit\",\n \"app_setting\",\n \"app_sync_status\",\n \"approach\",\n \"artifact\",\n \"assessment\",\n \"assessment_item\",\n \"assessment_result\",\n \"assignment_session\",\n \"assist\",\n \"assist_producer_policy\",\n \"assist_producer_policy_history\",\n \"association_type\",\n \"assurance_level\",\n \"attempt\",\n \"audit_broken_functions\",\n \"audit_canonical_findings\",\n \"audit_exemption\",\n \"audit_function_deps\",\n \"audit_function_runtime_probe\",\n \"audit_m2m_candidates\",\n \"audit_refresh_log\",\n \"audit_stale_registry\",\n \"audit_unregistered_candidates\",\n \"base_entity_template\",\n \"batch_cost_event\",\n \"batch_provider_batch\",\n \"batch_work_item\",\n \"billing_capability\",\n \"billing_capability_limit\",\n \"billing_connect_account\",\n \"billing_coupon\",\n \"billing_coupon_redemption\",\n \"billing_customer\",\n \"billing_free_period_grant\",\n \"billing_plan\",\n \"billing_plan_limit\",\n \"billing_price\",\n \"billing_product\",\n \"billing_spend_approval\",\n \"billing_spend_guardrail\",\n \"billing_stripe_event\",\n \"billing_subscription\",\n \"billing_usage_ledger\",\n \"billing_usage_reset\",\n \"billing_user_plan\",\n \"block_state\",\n \"board\",\n \"browser_account_binding\",\n \"browser_action_event\",\n \"browser_authenticator_window\",\n \"browser_capture\",\n \"browser_control_request\",\n \"browser_handoff\",\n \"browser_login_attempt\",\n \"browser_login_recipe\",\n \"browser_profile\",\n \"browser_profile_checkpoint\",\n \"browser_run\",\n \"browser_site_observation\",\n \"browser_site_policy\",\n \"browser_stream_ticket\",\n \"build_lock\",\n \"calendar_event\",\n \"campaign_watch_ramp_gate_run\",\n \"campaign_watch_switch_outbox\",\n \"campaign_watch_switch_window\",\n \"canvas_comment\",\n \"canvas_comment_like\",\n \"canvas_item\",\n \"canvas_item_state\",\n \"canvas_like\",\n \"canvas_score\",\n \"canvas_view\",\n \"capture_window\",\n \"carrying_rule\",\n \"catalog_entries_history\",\n \"catalog_entry\",\n \"category\",\n \"change_type_default\",\n \"chat_user_usage_summary\",\n \"citations\",\n \"class_purchase\",\n \"classifier_revision_ledger\",\n \"client_callable_door\",\n \"client_callable_door_retirement\",\n \"client_excluded_column_unregistered\",\n \"cmp_entry\",\n \"cmp_feedback\",\n \"code_file\",\n \"code_folder\",\n \"code_repository\",\n \"coding_session\",\n \"coding_session_entry\",\n \"comment\",\n \"commerce_asset_allocation\",\n \"commerce_asset_grading\",\n \"commerce_asset_identifier\",\n \"commerce_asset_lot_event\",\n \"commerce_asset_mandate_result\",\n \"commerce_asset_price_factor\",\n \"commerce_asset_reshoot_request\",\n \"commerce_asset_review\",\n \"commerce_asset_unknown\",\n \"commerce_certified_printer\",\n \"commerce_cloud_sync_connection\",\n \"commerce_ebay_business_policy\",\n \"commerce_ebay_category\",\n \"commerce_ebay_category_aspect\",\n \"commerce_ebay_category_tree\",\n \"commerce_ebay_custom_policy\",\n \"commerce_ebay_inventory_item\",\n \"commerce_ebay_inventory_item_group\",\n \"commerce_ebay_inventory_item_group_member\",\n \"commerce_ebay_inventory_location\",\n \"commerce_ebay_listing\",\n \"commerce_ebay_marketplace_policy\",\n \"commerce_ebay_media_asset\",\n \"commerce_ebay_notification_destination\",\n \"commerce_ebay_notification_event\",\n \"commerce_ebay_notification_subscription\",\n \"commerce_ebay_notification_topic\",\n \"commerce_ebay_offer\",\n \"commerce_ebay_order\",\n \"commerce_ebay_order_line_item\",\n \"commerce_ebay_shipping_fulfillment\",\n \"commerce_ebay_store_category\",\n \"commerce_human_correction\",\n \"commerce_intake_artifact\",\n \"commerce_intake_asset\",\n \"commerce_intake_batch\",\n \"commerce_label_batch\",\n \"commerce_label_code\",\n \"commerce_marketplace_account\",\n \"commerce_marketplace_account_deletion_audit\",\n \"commerce_marketplace_api_call\",\n \"commerce_marketplace_rate_budget\",\n \"commerce_marketplace_site\",\n \"commerce_marketplace_sync_run\",\n \"commerce_prediction_outcome\",\n \"commerce_print_order\",\n \"commerce_product\",\n \"commerce_product_channel_ref\",\n \"commerce_product_media\",\n \"commerce_product_variant\",\n \"commerce_recall_audit\",\n \"communication_calendar_selected_snapshot_state\",\n \"communication_channel_readiness\",\n \"comparison_set\",\n \"component_group\",\n \"contact_medium\",\n \"contact_submission\",\n \"content_certification\",\n \"content_ir_kind\",\n \"content_ir_kind_component\",\n \"content_ir_kind_component_incident\",\n \"content_ir_kind_conformance\",\n \"content_ir_kind_edge\",\n \"content_ir_kind_example\",\n \"content_ir_kind_instance\",\n \"content_ir_kind_surface\",\n \"content_lane\",\n \"context_access_log\",\n \"context_item\",\n \"context_item_suggestion\",\n \"context_item_value\",\n \"context_value_refs\",\n \"conversation\",\n \"conversation_value\",\n \"courts\",\n \"credential_attachment\",\n \"credential_item\",\n \"credential_mutation_receipt\",\n \"crm_address\",\n \"crm_affiliation\",\n \"crm_blocklist_entry\",\n \"crm_contact_candidate\",\n \"crm_deal\",\n \"crm_deal_stage_event\",\n \"crm_enrichment_call\",\n \"crm_interaction\",\n \"crm_merge_candidate\",\n \"crm_outreach_list\",\n \"crm_outreach_list_member\",\n \"crm_party_merge\",\n \"crm_party_research\",\n \"crm_registry_ingest_run\",\n \"crm_registry_source\",\n \"crm_sending_claim\",\n \"crm_sending_event\",\n \"crm_sending_identity\",\n \"crm_sending_identity_check\",\n \"crm_sending_policy\",\n \"custom_agent_table_trust\",\n \"custom_agg_digest_checked\",\n \"custom_entity_definition\",\n \"custom_field_definition\",\n \"custom_field_target\",\n \"custom_io_outbox_consumer\",\n \"custom_io_outbox_consumption\",\n \"custom_record\",\n \"custom_share_tails_mine_repair\",\n \"custom_template\",\n \"custom_template_install\",\n \"cx_agent_memory\",\n \"cx_agent_plan\",\n \"cx_agent_task\",\n \"cx_code_edit\",\n \"cx_code_message_file\",\n \"cx_conversation_documents\",\n \"cx_media\",\n \"cx_observational_memory\",\n \"cx_observational_memory_event\",\n \"cx_pending_injection\",\n \"cx_request\",\n \"cx_request_snapshot\",\n \"cx_tool_trace\",\n \"cx_user_request\",\n \"cx_user_todo\",\n \"dashboard_saved_view\",\n \"data_rights_event\",\n \"data_store\",\n \"data_store_members\",\n \"dataset\",\n \"ddl_guard_log\",\n \"deck_suggestion\",\n \"definer_class_exemption\",\n \"definer_client_grant_grandfather\",\n \"definer_grant_baseline\",\n \"deprecated_relation\",\n \"derive_run\",\n \"dev_login_audit\",\n \"dict_entry\",\n \"dict_provider_publication\",\n \"dict_setting\",\n \"dm_conversation\",\n \"dm_message\",\n \"dm_participant\",\n \"doc_render\",\n \"doc_signature\",\n \"dockets\",\n \"document\",\n \"document_version\",\n \"domain_classification\",\n \"edge_payload_kind\",\n \"egress_device\",\n \"egress_pairing\",\n \"egress_ticket\",\n \"emails\",\n \"embedding_cache\",\n \"embeddings_google_gemini_2_1536\",\n \"embeddings_oai_3_small_1536\",\n \"embeddings_voyage_4_large_1024\",\n \"embeddings_voyage_code_3_1024\",\n \"endpoint_family_sweep_state\",\n \"engine_owner_task\",\n \"entity_grant\",\n \"entity_protected_value\",\n \"entity_protected_value_version\",\n \"entity_relationship\",\n \"entity_type\",\n \"esign_campaign\",\n \"esign_campaign_member\",\n \"esign_consent_disclosure\",\n \"esign_envelope\",\n \"esign_envelope_certificate\",\n \"esign_envelope_document\",\n \"esign_envelope_event\",\n \"esign_envelope_external_ref\",\n \"esign_envelope_signer\",\n \"esign_provider\",\n \"esign_provider_binding\",\n \"esign_signing_key\",\n \"execution_event_cursor\",\n \"extension_auth_code\",\n \"external_link\",\n \"external_source\",\n \"extract_sweep_state\",\n \"fc_card\",\n \"fc_detail\",\n \"fc_set\",\n \"feature_doc\",\n \"feature_knob\",\n \"feedback_comments\",\n \"feedback_user_messages\",\n \"field_component\",\n \"file\",\n \"file_analysis\",\n \"file_entities\",\n \"file_overrides\",\n \"file_page_annotations\",\n \"file_pages\",\n \"file_rag_job\",\n \"file_version\",\n \"files_account_tier\",\n \"files_machine_written_prefix\",\n \"files_sync_mapping\",\n \"files_user_account\",\n \"flashcard_data\",\n \"flashcard_history\",\n \"flashcard_sets\",\n \"flexible_data\",\n \"folder\",\n \"function_contract\",\n \"game_badge\",\n \"game_result\",\n \"game_room\",\n \"global_execution\",\n \"global_execution_checkpoint\",\n \"global_execution_control\",\n \"global_execution_event\",\n \"global_meter_entry\",\n \"global_origin\",\n \"global_request\",\n \"google_document\",\n \"growth_loop_event\",\n \"growth_loop_run\",\n \"growth_loop_stage_run\",\n \"guardian_link\",\n \"guest_conversion_audit\",\n \"guest_execution_log\",\n \"guest_executions\",\n \"guided_checklist_run\",\n \"heatmap_save\",\n \"hindsight_enrollment\",\n \"hindsight_finding\",\n \"hindsight_regression_case\",\n \"hindsight_replay\",\n \"hindsight_replay_step\",\n \"hindsight_review\",\n \"hr_access_audit\",\n \"hr_access_role\",\n \"hr_accommodation_request\",\n \"hr_ai_evidence\",\n \"hr_alert_routing_rule\",\n \"hr_application\",\n \"hr_approval_authority\",\n \"hr_approval_delegation\",\n \"hr_asset\",\n \"hr_asset_assignment\",\n \"hr_attendance_exception\",\n \"hr_auto_close_rule\",\n \"hr_availability\",\n \"hr_background_check\",\n \"hr_benefits_event\",\n \"hr_calculation_snapshot\",\n \"hr_candidate\",\n \"hr_candidate_conversion\",\n \"hr_candidate_message\",\n \"hr_careers_portal\",\n \"hr_checklist_item\",\n \"hr_checklist_run\",\n \"hr_checklist_template\",\n \"hr_checklist_template_item\",\n \"hr_compensation\",\n \"hr_corrective_action\",\n \"hr_course\",\n \"hr_course_version\",\n \"hr_credential\",\n \"hr_crew\",\n \"hr_deduction_code\",\n \"hr_department\",\n \"hr_derived_grant\",\n \"hr_disposition_event\",\n \"hr_earning_code\",\n \"hr_eeo_response\",\n \"hr_emergency_contact\",\n \"hr_employee\",\n \"hr_employee_private\",\n \"hr_employer_profile\",\n \"hr_employment\",\n \"hr_employment_pin\",\n \"hr_engagement\",\n \"hr_establishment\",\n \"hr_external_identity\",\n \"hr_field_policy\",\n \"hr_holiday\",\n \"hr_holiday_calendar\",\n \"hr_i9\",\n \"hr_i9_document\",\n \"hr_incident\",\n \"hr_incident_party\",\n \"hr_interview\",\n \"hr_interview_kit\",\n \"hr_job_title\",\n \"hr_jurisdiction\",\n \"hr_jurisdiction_rule\",\n \"hr_jurisdiction_rule_class\",\n \"hr_jurisdiction_rule_org_decision\",\n \"hr_jurisdiction_rule_test\",\n \"hr_kiosk_device\",\n \"hr_kiosk_session\",\n \"hr_labor_target\",\n \"hr_leave_case\",\n \"hr_leave_enrollment\",\n \"hr_leave_ledger\",\n \"hr_leave_policy\",\n \"hr_leave_request\",\n \"hr_legal_hold\",\n \"hr_legal_hold_item\",\n \"hr_location\",\n \"hr_new_hire_report\",\n \"hr_offer\",\n \"hr_opening\",\n \"hr_overtime_alert\",\n \"hr_overtime_alert_rule\",\n \"hr_overtime_preapproval\",\n \"hr_pay_group\",\n \"hr_pay_period\",\n \"hr_pay_period_employment\",\n \"hr_payroll_export\",\n \"hr_payroll_export_line\",\n \"hr_position_assignment\",\n \"hr_posting\",\n \"hr_posting_publication\",\n \"hr_provider_binding\",\n \"hr_provider_event\",\n \"hr_provisioning_result\",\n \"hr_punch\",\n \"hr_recalculation_batch\",\n \"hr_record_class\",\n \"hr_records_request\",\n \"hr_reference_check\",\n \"hr_reporting_line\",\n \"hr_requisition\",\n \"hr_restricted_note\",\n \"hr_retention_rule\",\n \"hr_role_assignment\",\n \"hr_schedule\",\n \"hr_schedule_change\",\n \"hr_schedule_guidance\",\n \"hr_schedule_template\",\n \"hr_schedule_template_shift\",\n \"hr_scorecard\",\n \"hr_separation\",\n \"hr_shift\",\n \"hr_shift_claim\",\n \"hr_staffing_requirement\",\n \"hr_survey\",\n \"hr_survey_invitation\",\n \"hr_survey_question\",\n \"hr_survey_response\",\n \"hr_tax_registration\",\n \"hr_tax_withholding\",\n \"hr_time_adjustment\",\n \"hr_training_assignment\",\n \"hr_training_attempt\",\n \"hr_transcript_entry\",\n \"hr_verification_letter_request\",\n \"hr_work_interval\",\n \"hr_workflow_binding\",\n \"hr_workflow_decision\",\n \"hr_workflow_definition\",\n \"hr_workflow_event\",\n \"hr_workflow_failure\",\n \"hr_workflow_flow_type\",\n \"hr_workflow_instance\",\n \"hr_workflow_step\",\n \"hr_workflow_step_definition\",\n \"hr_workweek\",\n \"html_extraction\",\n \"iam_access_audit\",\n \"iam_api_key\",\n \"iam_emergency_door_request\",\n \"iam_org_availability_key\",\n \"iam_read_lane_v2_rollout\",\n \"idempotency\",\n \"industry\",\n \"industry_curator\",\n \"infra_status\",\n \"ingest_runs\",\n \"integration_connection\",\n \"integration_connection_resource\",\n \"interview_decision_interview\",\n \"interview_decision_question\",\n \"interview_document_revision\",\n \"interview_hole\",\n \"interview_question\",\n \"interview_session\",\n \"interview_turn\",\n \"invitation\",\n \"invitation_code\",\n \"invitation_request\",\n \"io_comment\",\n \"io_contract\",\n \"io_import\",\n \"io_outbox\",\n \"item\",\n \"item_mastery\",\n \"judge_verdict\",\n \"jurisdiction_policy\",\n \"keyword_classification_queue\",\n \"kg_alert\",\n \"kg_chunk_entities\",\n \"kg_chunks\",\n \"kg_clusters\",\n \"kg_edges\",\n \"kg_entities\",\n \"kg_entity_aliases\",\n \"kg_suggestion_ack\",\n \"kg_sweep_queue\",\n \"kg_sweep_run\",\n \"kg_sweep_state\",\n \"kg_value_match\",\n \"knob_override\",\n \"knob_override_audit\",\n \"knob_rung_lock\",\n \"knob_scope_kind\",\n \"knob_write_door\",\n \"league_membership\",\n \"learn_doc\",\n \"library_doc\",\n \"lifecycle_archive\",\n \"lifecycle_archive_row\",\n \"lifecycle_audit\",\n \"lifecycle_entity_plan\",\n \"lifecycle_map_build\",\n \"lifecycle_reference_map\",\n \"lifecycle_run\",\n \"lifecycle_tier_ledger\",\n \"location\",\n \"mandate\",\n \"mandate_advance_batch_row\",\n \"mandate_binding\",\n \"mandate_candidate\",\n \"mandate_candidate_run\",\n \"mandate_candidate_run_payload\",\n \"mandate_goal_clauses\",\n \"mandate_observation\",\n \"mandate_reference\",\n \"mandate_scan\",\n \"mandate_treatment\",\n \"marketing_initiative\",\n \"masterwork_corpus_item\",\n \"masterwork_run\",\n \"masterwork_run_kind\",\n \"masterwork_source\",\n \"math_course_structure\",\n \"math_problem\",\n \"matrx_action_ledger\",\n \"mcp_config\",\n \"mcp_server\",\n \"mcp_user_conn\",\n \"media_capture_handoff\",\n \"media_catalog_setting\",\n \"media_library_item\",\n \"media_selection_item\",\n \"media_selection_job\",\n \"media_source_library\",\n \"meet_call_invite\",\n \"meet_chat_message\",\n \"meet_invitee\",\n \"meet_meeting\",\n \"meet_note\",\n \"meet_occurrence_override\",\n \"meet_participant\",\n \"meet_recording\",\n \"meet_transcript_segment\",\n \"membership\",\n \"membership_grant\",\n \"merge_field_provenance\",\n \"message\",\n \"message_template\",\n \"message_template_detail\",\n \"meta_excluded_schema\",\n \"meta_table_stats_history\",\n \"metadata_reserved_keys\",\n \"microservice_project\",\n \"migration_log\",\n \"mtx_media_heal_queue\",\n \"mtx_public_url_guard\",\n \"ner_shadow\",\n \"note\",\n \"note_folder\",\n \"notification\",\n \"notification_channel_preference\",\n \"notification_event_override\",\n \"notification_event_type\",\n \"notification_preference\",\n \"notification_submission\",\n \"notify_outsider_door_baseline\",\n \"oauth_handoff_claim\",\n \"opinion_clusters\",\n \"opinions\",\n \"ops_auth_lock_watchdog_log\",\n \"ops_check_item\",\n \"ops_check_run\",\n \"ops_db_host_sample\",\n \"ops_issue_class\",\n \"ops_issue_event\",\n \"ops_proof_check\",\n \"ops_proof_run\",\n \"ops_proof_scenario\",\n \"org_admin_audit\",\n \"org_change_policy\",\n \"org_context_ledger\",\n \"org_industries\",\n \"org_member_control\",\n \"org_module_config\",\n \"org_plan\",\n \"organization\",\n \"organization_preferences\",\n \"organization_visibility_version\",\n \"output_feedback\",\n \"outreach_acceptance\",\n \"page_extraction_job\",\n \"page_extraction_page_run\",\n \"page_extraction_results\",\n \"page_extraction_runs\",\n \"page_intent_queue\",\n \"page_mapping_queue\",\n \"part_config\",\n \"part_config_sub\",\n \"party\",\n \"party_contact_point\",\n \"passkey_credential\",\n \"pb_claim_appeals_fd31de\",\n \"pb_insurance_claims_fd31de\",\n \"pc_article\",\n \"pc_episode\",\n \"pc_show\",\n \"pc_studio_run\",\n \"pc_studio_run_asset\",\n \"pdf_consolidation_log\",\n \"pdf_redaction_audit\",\n \"pdf_redaction_key_escrow\",\n \"permission_grant\",\n \"personal_data_column\",\n \"plan_cms_fill_item\",\n \"plan_cms_fill_job\",\n \"plan_entity\",\n \"plan_node\",\n \"plan_node_artifact\",\n \"plan_node_step\",\n \"plan_profile\",\n \"platform_action_request\",\n \"platform_actor_session\",\n \"platform_actor_token\",\n \"platform_actor_token_event\",\n \"platform_class_approval_by_arman\",\n \"platform_continued_access\",\n \"platform_cutover_census_run\",\n \"platform_cutover_evaluation_replaced\",\n \"platform_cutover_evaluation_write\",\n \"platform_cutover_seam\",\n \"platform_cutover_seam_measure\",\n \"platform_cutover_seam_press\",\n \"platform_dated_change\",\n \"platform_doors_only_pending_cutover\",\n \"platform_google_calendar_event_create_intent\",\n \"platform_google_task_create_intent\",\n \"platform_kernel_fingerprint_record\",\n \"platform_org_knob_override\",\n \"platform_outcome_event\",\n \"platform_outsider_consumer\",\n \"platform_provision_base_contract_pending\",\n \"platform_reachability\",\n \"platform_reachability_rebuild_pending\",\n \"platform_realtime_topic_prefix\",\n \"platform_reference_category\",\n \"platform_reference_declaration\",\n \"platform_repo\",\n \"platform_saved_view\",\n \"platform_schema\",\n \"platform_secure_delivery\",\n \"platform_share_link\",\n \"platform_strict_class_probe\",\n \"platform_user_knob_override\",\n \"podcast_race\",\n \"position\",\n \"processed_document\",\n \"processed_document_page\",\n \"product_capture_file\",\n \"product_capture_item\",\n \"product_capture_payload\",\n \"product_capture_product\",\n \"product_capture_question\",\n \"profile\",\n \"project\",\n \"prompt\",\n \"provider_account\",\n \"provider_account_credential\",\n \"provision\",\n \"provision_generate_target\",\n \"provision_grant\",\n \"provision_marker\",\n \"provision_rule_message\",\n \"provision_schema\",\n \"provision_shape_debt\",\n \"provision_spec\",\n \"provision_spec_grandfather\",\n \"provision_vocabulary\",\n \"provlock_recall_visits_all8u5\",\n \"public_compat_wrapper\",\n \"public_placement_baseline\",\n \"public_placement_domain\",\n \"public_restore_permit\",\n \"purpose\",\n \"quiz_session\",\n \"rag_ingest_run\",\n \"rag_library_audit_log\",\n \"rate_limit_buckets\",\n \"reachability_pending\",\n \"recompute_queue\",\n \"record\",\n \"record_alias\",\n \"redaction_mapping\",\n \"research_analysis\",\n \"research_content\",\n \"research_context_bundle\",\n \"research_document\",\n \"research_intent\",\n \"research_keyword\",\n \"research_media\",\n \"research_source\",\n \"research_synthesis\",\n \"research_tag\",\n \"research_template\",\n \"research_topic\",\n \"retention_policy\",\n \"retrieval_audit\",\n \"review_queue\",\n \"route_manifest_entry\",\n \"row_version\",\n \"rulebook\",\n \"runtime_operation_stream\",\n \"runtime_operation_stream_batch\",\n \"sandbox_instance\",\n \"sch_agent_task\",\n \"sch_run\",\n \"sch_task\",\n \"sch_trigger\",\n \"schema_client_exposure\",\n \"schema_migration_ledger\",\n \"schema_migration_legacy\",\n \"schema_migration_slot_grandfather\",\n \"schema_templates\",\n \"scope\",\n \"scope_association_suggestion\",\n \"scope_dataset_instance\",\n \"scope_door_registry\",\n \"scope_item_value_suggestion\",\n \"scope_suggestion\",\n \"scope_type\",\n \"scrape_domain\",\n \"scrape_domain_settings\",\n \"scrape_failure_log\",\n \"scrape_parsed_page\",\n \"scrape_path_override\",\n \"scrape_path_pattern\",\n \"scrape_retry_queue\",\n \"search_item\",\n \"seo_ai_capability\",\n \"seo_ai_visibility_citation\",\n \"seo_ai_visibility_claim\",\n \"seo_ai_visibility_panel\",\n \"seo_ai_visibility_response\",\n \"seo_ai_visibility_signal\",\n \"seo_backlink\",\n \"seo_backlink_change_event\",\n \"seo_backlink_dimension_snapshot\",\n \"seo_backlink_observation\",\n \"seo_backlink_snapshot\",\n \"seo_change_assessment\",\n \"seo_change_event\",\n \"seo_change_item\",\n \"seo_change_metric\",\n \"seo_change_set\",\n \"seo_change_theory\",\n \"seo_collection_run\",\n \"seo_competitor\",\n \"seo_competitor_observation\",\n \"seo_competitor_opportunity\",\n \"seo_coverage_mention\",\n \"seo_coverage_tracker\",\n \"seo_dimension_value_matcher\",\n \"seo_engine_schedule\",\n \"seo_geo_place\",\n \"seo_gsc_dig_rule\",\n \"seo_keyword\",\n \"seo_keyword_class_rule\",\n \"seo_keyword_edge\",\n \"seo_keyword_facet\",\n \"seo_keyword_market\",\n \"seo_keyword_market_observation\",\n \"seo_keyword_place\",\n \"seo_keyword_saved_view\",\n \"seo_keyword_topic\",\n \"seo_landscape_brief\",\n \"seo_link_gap_domain\",\n \"seo_link_gap_match\",\n \"seo_map_facet\",\n \"seo_map_facet_value\",\n \"seo_map_topic\",\n \"seo_page_measurement_health\",\n \"seo_page_performance\",\n \"seo_pr_moment\",\n \"seo_provider_call\",\n \"seo_provider_task\",\n \"seo_rank_observation\",\n \"seo_rank_target\",\n \"seo_raw_payload\",\n \"seo_referring_domain_profile\",\n \"seo_reputation_case\",\n \"seo_search_performance_daily\",\n \"seo_serp_mention\",\n \"seo_serp_opportunity\",\n \"seo_serp_result\",\n \"seo_serp_snapshot\",\n \"seo_site_geo_area\",\n \"seo_site_keyword_offering\",\n \"seo_site_keyword_value\",\n \"seo_site_offering_value\",\n \"seo_site_topic_value\",\n \"seo_site_value_combo\",\n \"seo_site_value_worth\",\n \"seo_site_vocabulary\",\n \"seo_source_request\",\n \"seo_starter_pack\",\n \"seo_starter_pack_item\",\n \"seo_story_angle\",\n \"seo_topic\",\n \"seo_topical_map\",\n \"seo_tracker_story\",\n \"seo_web_analytics_daily\",\n \"share_link\",\n \"shareable_resource_registry\",\n \"shared_canvas_item\",\n \"short_link\",\n \"shortcut_category\",\n \"sign_in_fk_legacy\",\n \"skill\",\n \"skill_category\",\n \"skill_detail\",\n \"skill_render_definition\",\n \"sms_consent\",\n \"sms_conversation\",\n \"sms_message\",\n \"sms_message_media\",\n \"sms_notification\",\n \"sms_notification_preference\",\n \"sms_phone_number\",\n \"sms_rate_limits\",\n \"sms_webhook_logs\",\n \"soft_delete_cascade_job\",\n \"soft_delete_edge\",\n \"source_authority\",\n \"space_payload\",\n \"stage_ref_kind\",\n \"stamped_write_table\",\n \"structure\",\n \"structured_list\",\n \"studio_cleaned_segments\",\n \"studio_concept_items\",\n \"studio_documents\",\n \"studio_module_segments\",\n \"studio_raw_segments\",\n \"studio_recording_chunks\",\n \"studio_recording_segments\",\n \"studio_run\",\n \"studio_session\",\n \"studio_session_settings\",\n \"study_attempt\",\n \"study_goal\",\n \"study_media\",\n \"study_plan\",\n \"study_plan_block\",\n \"study_plan_day\",\n \"study_reminder_context\",\n \"study_reminder_delivery\",\n \"study_session\",\n \"study_source_chunk\",\n \"study_streak\",\n \"study_structured_section\",\n \"superseded_policy\",\n \"surface\",\n \"system_announcement\",\n \"system_context_item\",\n \"system_error\",\n \"system_orgs\",\n \"system_write_failure\",\n \"t13_backfill_ledger\",\n \"t13_default_ledger\",\n \"t13_row_column_events\",\n \"tag\",\n \"task\",\n \"task_user_state\",\n \"taxonomy_node\",\n \"team\",\n \"template_context_items\",\n \"template_scope_types\",\n \"templates\",\n \"test_handset_inbox\",\n \"test_handset_verification\",\n \"thread\",\n \"tool\",\n \"tool_binding\",\n \"tool_bundle\",\n \"tool_call\",\n \"tool_definition_version\",\n \"tool_executor\",\n \"tool_surface_defaults\",\n \"tool_test_sample\",\n \"tool_ui\",\n \"tool_ui_incident\",\n \"tool_ui_version\",\n \"topic_placement_queue\",\n \"transcript\",\n \"trigger_event\",\n \"udt_dataset_fields\",\n \"udt_dataset_row_versions\",\n \"udt_dataset_rows\",\n \"udt_dataset_template\",\n \"udt_dataset_template_fields\",\n \"udt_document\",\n \"udt_document_snapshot\",\n \"udt_structured_list_items\",\n \"udt_workbook_snapshot\",\n \"ui_client\",\n \"ui_surface_action\",\n \"ui_surface_agent_pref\",\n \"ui_surface_agent_role\",\n \"ui_surface_client_tool\",\n \"ui_surface_config\",\n \"ui_surface_item_type\",\n \"ui_surface_value\",\n \"ui_surface_write_target\",\n \"univer_payload\",\n \"unsubscribe_token\",\n \"uploads_inflight\",\n \"user\",\n \"user_achievement\",\n \"user_active_context\",\n \"user_analysis_preference\",\n \"user_email_preference\",\n \"user_entity_state\",\n \"user_feedback\",\n \"user_follows\",\n \"user_form_profile\",\n \"user_markdown_sample\",\n \"user_memory\",\n \"user_preference\",\n \"user_profile\",\n \"user_secret\",\n \"user_secret_audit\",\n \"user_secret_grant\",\n \"user_stat\",\n \"user_storage_usage\",\n \"user_surface_state\",\n \"vault_fill_approvals\",\n \"vault_fill_devices\",\n \"vault_fill_nonces\",\n \"visibility_cache\",\n \"visibility_epoch\",\n \"voice\",\n \"war_room\",\n \"wbx_demo\",\n \"wbx_guidance\",\n \"wbx_highlight\",\n \"wbx_pattern\",\n \"wbx_recipe\",\n \"wbx_screenshot\",\n \"wbx_seo_audit\",\n \"wc_claim\",\n \"wc_impairment_definition\",\n \"wc_injury\",\n \"wc_report\",\n \"web_analysis_item\",\n \"web_brand\",\n \"web_brand_asset\",\n \"web_brand_offering\",\n \"web_business_fact\",\n \"web_business_location\",\n \"web_channel_analytics_daily\",\n \"web_crawl_event\",\n \"web_crawl_preset\",\n \"web_crawl_schedule\",\n \"web_crawl_session\",\n \"web_crawl_url\",\n \"web_discovered_item\",\n \"web_finding\",\n \"web_gsc_page_stat\",\n \"web_link_edge\",\n \"web_listing_publisher\",\n \"web_location_listing\",\n \"web_news_item\",\n \"web_offering_template\",\n \"web_page\",\n \"web_page_content\",\n \"web_page_evidence\",\n \"web_page_sitemap\",\n \"web_property\",\n \"web_provider\",\n \"web_result\",\n \"web_screenshot\",\n \"web_site\",\n \"web_site_endpoint_rule\",\n \"web_site_item_config\",\n \"web_site_offering\",\n \"web_sitemap\",\n \"web_snapshot\",\n \"web_tag_manager_snapshot\",\n \"web_voice_fingerprint\",\n \"web_youtube_video\",\n \"webhook_deliveries\",\n \"webhook_dispatch_state\",\n \"webhooks\",\n \"wf_node_data_slot\",\n \"work_claim\",\n \"work_item\",\n \"workbook\",\n \"worker_heartbeat\",\n \"workflow\",\n \"workflow_card\",\n \"workflow_checkpoint\",\n \"workflow_comparison\",\n \"workflow_definition_version\",\n \"workflow_idempotency\",\n \"workflow_job\",\n \"workflow_node_events\",\n \"workflow_node_outcome\",\n \"workflow_plan\",\n \"workflow_plan_event\",\n \"workflow_plan_sample\",\n \"workflow_recovery_audit\",\n \"workflow_run\",\n \"workflow_run_cost\",\n \"workflow_run_facts\",\n \"workflow_run_log\",\n \"workflow_runtime_surface\",\n \"workflow_template\",\n \"workflow_trigger\",\n \"workflow_trigger_fire\",\n \"workflow_work_item\",\n \"working_document\",\n \"write_guard_key\",\n \"youtube_quota_day\",\n \"youtube_search\",\n \"youtube_video\",\n] as const;\n\nexport type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number][\"code\"];\nexport type StoreDoorName = (typeof STORE_DOORS)[number][\"name\"];\nexport type EntityToken = (typeof ENTITY_TOKENS)[number];\nexport type KernelTableName = (typeof KERNEL_TABLES)[number][\"name\"];\n","// src/vocabulary.ts — @ai-matrx/records\n//\n// THE CLOSED VOCABULARIES. Every list here is a word set the STORE enforces,\n// and the store is the only place any of them is decided. The literal values\n// are not typed by hand: `src/store.generated.ts` is regenerated from the live\n// catalogue by `pnpm records:generate`, and `pnpm check:store-registry` fails\n// the build the moment this package and the database disagree. What lives HERE\n// is the type layer over those literals, so a wrong word is a compile error in\n// a consumer rather than a `23514` at three in the morning.\n\nimport {\n ACTOR_VOCABULARY,\n ABSENCE_REASONS,\n VALUE_ENVELOPE_KEYS,\n VALUE_ALTERNATE_KEYS,\n STORAGE_MODES,\n RULE_USES,\n PER_VALUE_ACCESS_WORDS,\n PARITY_FIELD_TYPES,\n DECLARABLE_FIELD_KINDS,\n RULE_NODE_KINDS,\n RETIRED_ACTOR_WORDS,\n} from \"./store.generated\";\n\n/**\n * VAL-8. Who wrote a value. `user`, `agent`, `system` — enforced by every write\n * door, and the three retired words (`human`, `ai`, `code`) are translated by\n * the store's own `custom.actor_word`, never by a caller.\n */\nexport type Actor = (typeof ACTOR_VOCABULARY)[number];\n\n/** The words the store still accepts and rewrites, mapped to what they become. */\nexport type RetiredActorWord = keyof typeof RETIRED_ACTOR_WORDS;\n\n/**\n * VAL-2. Why a value is missing. A value is never blank for an unexplained\n * reason: it either holds something or it says one of these four words.\n */\nexport type AbsenceReason = (typeof ABSENCE_REASONS)[number];\n\n/** The closed key set of one value envelope (VAL-1 … VAL-4). */\nexport type ValueEnvelopeKey = (typeof VALUE_ENVELOPE_KEYS)[number];\n\n/** The closed key set of one ranked alternate (VAL-3). */\nexport type ValueAlternateKey = (typeof VALUE_ALTERNATE_KEYS)[number];\n\n/**\n * REC-4. `heavy` is indexed storage with Rules on write; `light` is\n * whole-document storage with Rules on read. Per Table, one store.\n */\nexport type StorageMode = (typeof STORAGE_MODES)[number];\n\n/** REC-15. One Rule object, four uses. */\nexport type RuleUse = (typeof RULE_USES)[number];\n\n/**\n * VAL-5 / VAL-6. The words that may NOT appear inside a value envelope:\n * Visibility and access belong to a Field and to a Record, never to a value.\n * The store refuses each of them by name and so does this package's mirror.\n */\nexport type PerValueAccessWord = (typeof PER_VALUE_ACCESS_WORDS)[number];\n\n/** FLD-11. The parity floor: the field type a person picks in the UI. */\nexport type ParityFieldType = (typeof PARITY_FIELD_TYPES)[number][\"parity_type\"];\n\n/**\n * THE ONE REGISTRY, as a type: every kind a column can be DECLARED as.\n *\n * `ParityFieldType` above is the parity FLOOR — the answer to \"which of the fourteen\n * is this field\". It is not the answer to \"what may somebody pick\", and reading it as\n * though it were is exactly how `signature` came to be a field shape the store accepted\n * (`custom.doc_sign` takes no other) and no screen could offer: VERIFIER-10, F6.\n * `custom.field_kinds()` is the registry, and this is generated from it.\n */\nexport type DeclarableFieldKind = (typeof DECLARABLE_FIELD_KINDS)[number][\"kind\"];\n\n/** FLD-1. The five behaviours a Field can have. One, exactly, and closed. */\nexport type FieldBehavior = (typeof PARITY_FIELD_TYPES)[number][\"behavior\"];\n\n/** The node kinds `custom.rule_eval` evaluates. */\nexport type RuleNodeKind = (typeof RULE_NODE_KINDS)[number][\"node\"];\n\n/**\n * REC-32. The seven table types, closed. The parenthesised names are the\n * retired ones the doctrine records; never coin an eighth.\n */\nexport const TABLE_TYPES = [\n \"entity\",\n \"detail\",\n \"reference\",\n \"ledger\",\n \"restricted\",\n \"system\",\n \"deprecated\",\n] as const;\nexport type TableType = (typeof TABLE_TYPES)[number];\n\n/** REC-33. The two origins. A table we ship in schema `custom` is `standard`. */\nexport const TABLE_ORIGINS = [\"standard\", \"custom\"] as const;\nexport type TableOrigin = (typeof TABLE_ORIGINS)[number];\n\n/** REL-1. Ownership is one fact, stored once, read from the field's side. */\nexport const RELATION_FLAVORS = [\"owned\", \"referenced\"] as const;\nexport type RelationFlavor = (typeof RELATION_FLAVORS)[number];\n\n/** REL-2. What happens to the far side, separate from flavour. */\nexport const ON_DELETE = [\"cascade\", \"set_null\", \"restrict\"] as const;\nexport type OnDelete = (typeof ON_DELETE)[number];\n\n/** REL-3. A snapshot is a frozen copy in the relation's payload, never a pointer. */\nexport const RELATION_BINDINGS = [\"live\", \"snapshot\"] as const;\nexport type RelationBinding = (typeof RELATION_BINDINGS)[number];\n\n/** REL-7. */\nexport const RELATION_CARDINALITIES = [\"one\", \"many\"] as const;\nexport type RelationCardinality = (typeof RELATION_CARDINALITIES)[number];\n\n/** FLD-7. Where a Field's values come from. */\nexport const FIELD_SOURCES = [\"manual\", \"formula\", \"agent\", \"synced\"] as const;\nexport type FieldSource = (typeof FIELD_SOURCES)[number];\n\n/** FLD-9. A Formula declares whether it computes on read or on write. */\nexport const COMPUTE_ON = [\"read\", \"write\"] as const;\nexport type ComputeOn = (typeof COMPUTE_ON)[number];\n\n/**\n * AGT-7 / FLD-12. A Field's sensitivity sets a ceiling a merge field can never\n * widen — and these are THE STORE'S four words, checked against its own guard.\n *\n * This list used to read `standard · sensitive · secret`, which the store has\n * never accepted: writing a Field with `sensitivity: \"standard\"` is refused\n * with \"the field <name> has to say how sensitive its values are, and it says\n * standard\". The knob `custom/field_sensitivity_levels` keys off these same\n * four words to decide which level may read and edit each one, so a package\n * carrying three different words could never have agreed with it. Corrected\n * against the live store, 2026-09-18.\n */\nexport const FIELD_SENSITIVITIES = [\"public\", \"internal\", \"confidential\", \"restricted\"] as const;\nexport type FieldSensitivity = (typeof FIELD_SENSITIVITIES)[number];\n\n/** DYN-17 / §D. Which tier a MERGE FIELD's value is delivered in. */\nexport const DELIVERIES = [\"inline\", \"on_demand\", \"auto\"] as const;\nexport type Delivery = (typeof DELIVERIES)[number];\n\n/**\n * FLD-12. WHETHER AN AGENT MAY SEE A FIELD'S VALUES, and these are the STORE'S\n * four words — not the merge field's delivery tiers.\n *\n * `Field.context_policy` used to be typed as `Delivery` here, which is a\n * different question with a different vocabulary: writing a Field with\n * `context_policy: \"inline\"` is refused with \"the field <name> has to say\n * whether an agent may see its values, and it says inline\". Delivery is about\n * HOW MUCH of a value a merge field carries into a turn; this is about WHETHER\n * the value reaches an agent at all, and conflating them let a screen offer a\n * word the store has never accepted. Corrected against the live store,\n * 2026-09-18.\n */\nexport const CONTEXT_POLICIES = [\"include\", \"summarize\", \"exclude\", \"on_request\"] as const;\nexport type ContextPolicy = (typeof CONTEXT_POLICIES)[number];\n\n/** DYN-3. The eight sources, closed. Relationships and rules are not sources. */\nexport const MERGE_FIELD_SOURCES = [\n \"literal\",\n \"record\",\n \"state\",\n \"actor\",\n \"platform\",\n \"user_input\",\n \"tool\",\n \"derived\",\n] as const;\nexport type MergeFieldSource = (typeof MERGE_FIELD_SOURCES)[number];\n\n/** DYN-4. What a merge field resolves INTO. The consumer never learns which. */\nexport const MERGE_FIELD_SEMANTIC_TYPES = [\n \"value\",\n \"reference\",\n \"resolver\",\n \"computed\",\n \"collection\",\n] as const;\nexport type MergeFieldSemanticType = (typeof MERGE_FIELD_SEMANTIC_TYPES)[number];\n\n/** DYNAMIC-VALUES §A. Any number of these; never fused into the source. */\nexport const MERGE_FIELD_MODIFIERS = [\n \"scoped\",\n \"temporal\",\n \"collection\",\n \"live\",\n \"fallback\",\n \"formatted\",\n \"required\",\n] as const;\nexport type MergeFieldModifier = (typeof MERGE_FIELD_MODIFIERS)[number];\n\n/** DYN-12. The five override policies. Exactly one, and it outranks the ladder. */\nexport const OVERRIDE_POLICIES = [\n \"must_supply\",\n \"shown_overridable\",\n \"shown_locked\",\n \"server_fixed\",\n \"derived\",\n] as const;\nexport type OverridePolicy = (typeof OVERRIDE_POLICIES)[number];\n\n/** DYNAMIC-VALUES §C. What a resolved merge field's freshness was. */\nexport const FRESHNESS = [\"live\", \"cached\", \"snapshot\"] as const;\nexport type Freshness = (typeof FRESHNESS)[number];\n\n/** REC-1. How a Table shows itself. */\nexport const TABLE_DISPLAYS = [\"list\", \"grid\", \"board\", \"calendar\", \"timeline\"] as const;\nexport type TableDisplay = (typeof TABLE_DISPLAYS)[number];\n","// src/use-cases/validate.ts — @ai-matrx/records/use-cases\n//\n// THE FORCING FUNCTION FOR A DATASET.\n//\n// A use-case file is data, and data has no compiler beyond its types: TypeScript\n// will happily accept a template whose relationship points at a table that does\n// not exist, whose row carries a field nobody declared, whose `select` field\n// offers no choices, or whose pipeline names a stage the field will not accept.\n// Every one of those produces a seed run that half-works and a screenshot that\n// quietly lies.\n//\n// So this validator is the gate, and the suite runs it over EVERY registered use\n// case. It refuses in the store's own spirit: by sentence, naming the thing that\n// is wrong and what to do about it — never a bare code.\n//\n// It checks three kinds of thing:\n// · THE LAW — the sentence is there, the data is free of placeholder junk.\n// · THE SHAPE — field types are words the store resolves, tables declare\n// their title field, choices exist where a choice is required.\n// · THE GRAPH — relationships, relation fields, row references, the form,\n// the pipeline, the dashboard question, the document's merge\n// fields and the notification rule all name things that exist.\n\nimport { DECLARABLE_FIELD_KINDS, PARITY_FIELD_TYPES, STORAGE_MODES } from \"../store.generated\";\nimport {\n CONTEXT_POLICIES,\n FIELD_SENSITIVITIES,\n ON_DELETE,\n RELATION_CARDINALITIES,\n RELATION_FLAVORS,\n TABLE_DISPLAYS,\n TABLE_TYPES,\n} from \"../vocabulary\";\nimport { describePlaceholder, findPlaceholders } from \"./placeholders\";\nimport type { UseCase, UseCaseField, UseCaseTable } from \"./types\";\n\n/** The plain synonyms `custom._field_document_for` resolves besides the parity types. */\nconst PLAIN_TYPE_WORDS = [\n \"number\",\n \"integer\",\n \"decimal\",\n \"float\",\n \"long_text\",\n \"string\",\n] as const;\n\n/**\n * Every word a `parityType` may be: the parity types, every kind the declaration door\n * publishes (`custom.field_kinds()` — entity_reference, signature, long_text …, which a\n * lane-8 template needs for S4 and e-sign), their behaviours, the synonyms.\n */\nexport const RESOLVABLE_FIELD_TYPE_WORDS: readonly string[] = [\n ...new Set([\n ...PARITY_FIELD_TYPES.map((t) => t.parity_type),\n ...DECLARABLE_FIELD_KINDS.map((k) => k.kind),\n ...PARITY_FIELD_TYPES.map((t) => t.behavior),\n ...PLAIN_TYPE_WORDS,\n ]),\n];\n\n/** The parity types whose value IS a choice, and therefore need a choice list. */\nconst CHOICE_TYPES = new Set([\"select\", \"multi_select\", \"list\"]);\n/** The parity types that point at another table. */\nconst RELATION_TYPES = new Set([\"relation\", \"attachment\", \"member\"]);\n\n/**\n * The minimum a seeded business needs before a screen looks like it is working\n * rather than like a fixture. Below this, a screenshot shows an empty state.\n *\n * It was 8 until a real dataset argued with it: a whole-house renovation has SIX\n * ROOMS, and demanding eight would have meant inventing two rooms that do not\n * exist — which is the exact failure this whole library is against. Six rooms on\n * a board is a working project, not an empty screen. So the floor is what a\n * screen genuinely needs, and the suite keeps the stronger check where it\n * belongs: at least 20 rows across the whole use case.\n */\nexport const MIN_ROWS_IN_PRIMARY_TABLE = 5;\n\n/** A refusal: what is wrong, where, and what to do. */\nexport interface UseCaseProblem {\n /** Dotted path into the use case: \"tables[1].fields[3].choices\". */\n at: string;\n /** The sentence. Always says what to do, never only what is wrong. */\n says: string;\n}\n\nexport interface UseCaseVerdict {\n ok: boolean;\n problems: UseCaseProblem[];\n}\n\nfunction fieldsByKey(table: UseCaseTable): Map<string, UseCaseField> {\n return new Map(table.fields.map((f) => [f.key, f]));\n}\n\n/**\n * The test-fixture classification, written where a NAME goes.\n *\n * Both shapes the crews actually shipped: the parenthesised suffix\n * (\"Birchwood Ave Renovation (test fixture)\") and the prefix, where the word is\n * simply the first word of the name (\"Fixture Hands & Hope Alliance\"). The\n * prefix form is invisible to the whole-document junk sweep, which is why this\n * check reads the name fields themselves.\n */\nconst FIXTURE_IN_NAME = /\\(\\s*test\\s+fixture\\s*\\)|\\btest[\\s_-]fixture\\b|^\\s*fixtures?\\b/i;\n\n/**\n * Every place in a use case whose value is a NAME a person reads on a screen —\n * the business, its tables and their labels, the form, the pipeline, the\n * document template, the dashboard question. Paired with its dotted path so the\n * refusal can say exactly which name it means.\n */\nfunction nameFields(useCase: UseCase): Array<[string, string | undefined]> {\n const out: Array<[string, string | undefined]> = [\n [\"business.name\", useCase.business?.name],\n [\"business.legalName\", useCase.business?.legalName],\n [\"form.name\", useCase.form?.name],\n [\"pipeline.name\", useCase.pipeline?.name],\n ];\n useCase.tables?.forEach((table, ti) => {\n out.push([`tables[${ti}].name`, table.name]);\n out.push([`tables[${ti}].labelSingular`, table.labelSingular]);\n out.push([`tables[${ti}].labelPlural`, table.labelPlural]);\n });\n return out;\n}\n\n/**\n * Check one use case. Returns every problem rather than the first, because a\n * crew fixing a dataset wants the whole list in one pass.\n */\nexport function validateUseCase(useCase: UseCase): UseCaseVerdict {\n const problems: UseCaseProblem[] = [];\n const say = (at: string, says: string) => problems.push({ at, says });\n\n // ── THE LAW ───────────────────────────────────────────────────────────────\n\n const sentence = (useCase.useCase ?? \"\").trim();\n if (sentence.length < 40) {\n say(\n \"useCase\",\n \"The use case needs ONE full sentence at the top saying who the user is, what business they run, and what job this feature does for them. \" +\n `This one is ${sentence.length} characters, which is not that sentence.`,\n );\n }\n if (sentence && !/[.!?]$/.test(sentence)) {\n say(\"useCase\", \"The use-case sentence should read as a sentence and end in a full stop.\");\n }\n\n // The junk check runs over the WHOLE template, values and labels alike.\n // Row KEYS are local handles (\"visit-001\"), never shown; the sweep reads what a screen shows.\n const shown = { ...useCase, tables: useCase.tables?.map((t) => ({ ...t, rows: t.rows?.map((r) => ({ values: r.values })) })) };\n for (const hit of findPlaceholders(JSON.stringify(shown, null, 1))) {\n say(useCase.id, describePlaceholder(hit));\n }\n\n // THE CHAIR'S RULING, 2026-09-21: \"test fixture\" is a CLASSIFICATION the\n // organization carries in its kind/metadata — the `test_fixture` flag in its\n // settings, which is also how cleanup finds it. It is NEVER part of a name.\n // A name is what the owner reads on the screen, and a screen that says\n // \"Birchwood Ave Renovation (test fixture)\" has told him the product is a\n // rehearsal. The generic junk sweep above catches the parenthesised form\n // anywhere; this names the NAME it is in, and catches the \"Fixture …\" prefix\n // that sweep cannot see, because there the word IS the first word of a name.\n for (const [at, value] of nameFields(useCase)) {\n if (!value) continue;\n if (FIXTURE_IN_NAME.test(value)) {\n say(\n at,\n `\"${value}\" carries the test-fixture classification in a name. ` +\n \"Name it after the business this use case is about, and carry the classification where it belongs — \" +\n \"`test_fixture: true` in the organization's settings, which is also how cleanup finds it (never by a junk name).\",\n );\n }\n }\n\n if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(useCase.id ?? \"\")) {\n say(\"id\", `The id \"${useCase.id}\" should be kebab-case, like \"harbor-dental-new-patient-intake\".`);\n }\n if (!useCase.cleanupTag) {\n say(\n \"cleanupTag\",\n \"Every use case needs a cleanup tag: it is written into the test organization's settings so cleanup finds it by tag and never by a junk name.\",\n );\n }\n if (useCase.provenance?.noRealPeople !== true) {\n say(\n \"provenance.noRealPeople\",\n \"State in the data that every person, address, phone and mailbox here is invented and belongs to nobody.\",\n );\n }\n if (useCase.provenance?.kind === \"public-data\" && !useCase.provenance.source) {\n say(\"provenance.source\", \"A use case drawn from public data has to name the dataset it came from.\");\n }\n\n // ── THE SHAPE ─────────────────────────────────────────────────────────────\n\n if (!useCase.tables?.length) {\n say(\"tables\", \"A use case needs at least one table — the business's own records.\");\n return { ok: false, problems };\n }\n\n const tablesByToken = new Map(useCase.tables.map((t) => [t.token, t]));\n if (tablesByToken.size !== useCase.tables.length) {\n say(\"tables\", \"Two tables share a token. Each table's token is its address and has to be unique.\");\n }\n\n useCase.tables.forEach((table, ti) => {\n const at = `tables[${ti}] (${table.token})`;\n if (!/^[a-z][a-z0-9_]*$/.test(table.token ?? \"\")) {\n say(`${at}.token`, `\"${table.token}\" should be snake_case and start with a letter.`);\n }\n if (!TABLE_TYPES.includes(table.type)) {\n say(`${at}.type`, `\"${table.type}\" is not one of the seven table types: ${TABLE_TYPES.join(\", \")}.`);\n }\n if (!TABLE_DISPLAYS.includes(table.display)) {\n say(`${at}.display`, `\"${table.display}\" is not one of: ${TABLE_DISPLAYS.join(\", \")}.`);\n }\n if (!STORAGE_MODES.includes(table.weight)) {\n say(`${at}.weight`, `\"${table.weight}\" is not one of: ${STORAGE_MODES.join(\", \")}.`);\n }\n\n const keyed = fieldsByKey(table);\n if (keyed.size !== table.fields.length) {\n say(`${at}.fields`, \"Two fields share a key. A field key is unique within its table.\");\n }\n if (!keyed.has(table.titleField)) {\n say(\n `${at}.titleField`,\n `The title field \"${table.titleField}\" is not one of this table's fields — without it a record cannot be a chip.`,\n );\n }\n\n table.fields.forEach((field, fi) => {\n const fat = `${at}.fields[${fi}] (${field.key})`;\n if (!/^[a-z][a-z0-9_]*$/.test(field.key ?? \"\")) {\n say(`${fat}.key`, `\"${field.key}\" should be snake_case and start with a letter.`);\n }\n if (!RESOLVABLE_FIELD_TYPE_WORDS.includes(field.parityType)) {\n say(\n `${fat}.parityType`,\n `The store does not resolve the type word \"${field.parityType}\". Use one of: ${RESOLVABLE_FIELD_TYPE_WORDS.join(\", \")}.`,\n );\n }\n if (!FIELD_SENSITIVITIES.includes(field.sensitivity)) {\n say(\n `${fat}.sensitivity`,\n `The store refuses a field that does not say how sensitive its values are. Use one of: ${FIELD_SENSITIVITIES.join(\", \")}.`,\n );\n }\n if (!CONTEXT_POLICIES.includes(field.contextPolicy)) {\n say(\n `${fat}.contextPolicy`,\n `The store refuses a field that does not say whether an agent may see its values. Use one of: ${CONTEXT_POLICIES.join(\", \")}.`,\n );\n }\n if (CHOICE_TYPES.has(field.parityType) && !field.choices?.length) {\n say(\n `${fat}.choices`,\n \"A choice field has to list the business's real words, in the order they really happen — 'Scheduled, Confirmed, Seen, No-show'.\",\n );\n }\n if (RELATION_TYPES.has(field.parityType) && field.relationTarget && !tablesByToken.has(field.relationTarget)) {\n say(`${fat}.relationTarget`, `It points at the table \"${field.relationTarget}\", which this use case does not declare.`);\n }\n if (field.parityType === \"currency\" && !field.unit) {\n say(`${fat}.unit`, \"A currency field carries its currency as the unit — the unit changes the meaning.\");\n }\n });\n\n // ── the rows ──\n const rowKeys = new Set<string>();\n table.rows.forEach((row, ri) => {\n const rat = `${at}.rows[${ri}] (${row.key})`;\n if (!row.key) say(`${rat}.key`, \"Every row needs a stable local key so relationships can point at it.\");\n if (rowKeys.has(row.key)) say(`${rat}.key`, `The row key \"${row.key}\" is used twice in this table.`);\n rowKeys.add(row.key);\n for (const valueKey of Object.keys(row.values ?? {})) {\n if (!keyed.has(valueKey)) {\n say(`${rat}.values.${valueKey}`, `This row sets \"${valueKey}\", which the table does not declare as a field.`);\n }\n }\n for (const field of table.fields) {\n if (field.required && (row.values?.[field.key] === undefined || row.values?.[field.key] === null)) {\n say(`${rat}.values.${field.key}`, `\"${field.label}\" is required, and this row leaves it empty.`);\n }\n const value = row.values?.[field.key];\n if (value !== undefined && field.choices?.length && !field.multi) {\n if (typeof value === \"string\" && !field.choices.includes(value)) {\n say(\n `${rat}.values.${field.key}`,\n `\"${value}\" is not one of \"${field.label}\"'s choices (${field.choices.join(\", \")}).`,\n );\n }\n }\n }\n });\n });\n\n // The table the screens are really about should look like a working business.\n const primary = useCase.tables[0];\n if (primary && primary.rows.length < MIN_ROWS_IN_PRIMARY_TABLE) {\n say(\n `tables[0] (${primary.token}).rows`,\n `${primary.rows.length} rows makes the screen look empty. Seed at least ${MIN_ROWS_IN_PRIMARY_TABLE} — dozens is better.`,\n );\n }\n\n // ── THE GRAPH ─────────────────────────────────────────────────────────────\n\n const resolveField = (tableToken: string, fieldKey: string): UseCaseField | undefined =>\n tablesByToken.get(tableToken)?.fields.find((f) => f.key === fieldKey);\n\n useCase.relationships?.forEach((rel, i) => {\n const at = `relationships[${i}]`;\n if (!tablesByToken.has(rel.fromTable)) {\n say(`${at}.fromTable`, `There is no table \"${rel.fromTable}\" in this use case.`);\n return;\n }\n if (!tablesByToken.has(rel.toTable)) {\n say(`${at}.toTable`, `There is no table \"${rel.toTable}\" in this use case.`);\n }\n const field = resolveField(rel.fromTable, rel.fromField);\n if (!field) {\n say(`${at}.fromField`, `The table \"${rel.fromTable}\" does not declare a field \"${rel.fromField}\".`);\n } else if (!RELATION_TYPES.has(field.parityType)) {\n say(\n `${at}.fromField`,\n `\"${rel.fromField}\" is a ${field.parityType} field, so it cannot hold a relation. Declare it as a relation.`,\n );\n } else if (field.relationTarget && field.relationTarget !== rel.toTable) {\n say(\n `${at}.fromField`,\n `The field points at \"${field.relationTarget}\" but the relationship says \"${rel.toTable}\". They have to agree.`,\n );\n }\n if (!RELATION_FLAVORS.includes(rel.flavor)) {\n say(`${at}.flavor`, `\"${rel.flavor}\" is not one of: ${RELATION_FLAVORS.join(\", \")}.`);\n }\n if (!RELATION_CARDINALITIES.includes(rel.cardinality)) {\n say(`${at}.cardinality`, `\"${rel.cardinality}\" is not one of: ${RELATION_CARDINALITIES.join(\", \")}.`);\n }\n if (!ON_DELETE.includes(rel.onDelete)) {\n say(`${at}.onDelete`, `\"${rel.onDelete}\" is not one of: ${ON_DELETE.join(\", \")}.`);\n }\n if (!rel.describes || rel.describes.length < 15) {\n say(`${at}.describes`, \"Say the domain truth in a sentence — 'an invoice belongs to the job it bills'.\");\n }\n\n // Every row's relation value has to resolve to a row in the target table.\n const target = tablesByToken.get(rel.toTable);\n const targetKeys = new Set(target?.rows.map((r) => r.key) ?? []);\n tablesByToken.get(rel.fromTable)?.rows.forEach((row, ri) => {\n const value = row.values?.[rel.fromField];\n if (value === undefined || value === null) return;\n for (const ref of Array.isArray(value) ? value : [value]) {\n if (typeof ref === \"string\" && !targetKeys.has(ref)) {\n say(\n `tables (${rel.fromTable}).rows[${ri}].values.${rel.fromField}`,\n `It points at the row \"${ref}\", which does not exist in \"${rel.toTable}\".`,\n );\n }\n }\n });\n });\n\n // ── the form ──\n const form = useCase.form;\n if (!form) {\n say(\"form\", \"A use case owes a form a practitioner in this business would really put in front of someone.\");\n } else {\n if (!tablesByToken.has(form.table)) {\n say(\"form.table\", `The form collects into \"${form.table}\", which this use case does not declare.`);\n } else {\n form.fields?.forEach((ff, i) => {\n if (!resolveField(form.table, ff.fieldKey)) {\n say(`form.fields[${i}]`, `The form asks for \"${ff.fieldKey}\", which \"${form.table}\" does not declare.`);\n }\n });\n }\n if (!form.fields?.length) say(\"form.fields\", \"The form has to ask for something.\");\n if (!form.confirmation) say(\"form.confirmation\", \"Say what the person sees after they submit, in real words.\");\n }\n\n // ── the pipeline ──\n const pipeline = useCase.pipeline;\n if (!pipeline) {\n say(\"pipeline\", \"A use case owes the real lifecycle a record moves through in this business.\");\n } else {\n const stageField = resolveField(pipeline.table, pipeline.stageField);\n if (!tablesByToken.has(pipeline.table)) {\n say(\"pipeline.table\", `The pipeline runs on \"${pipeline.table}\", which this use case does not declare.`);\n } else if (!stageField) {\n say(\"pipeline.stageField\", `\"${pipeline.table}\" does not declare a field \"${pipeline.stageField}\".`);\n } else if (!stageField.choices?.length) {\n say(\"pipeline.stageField\", `\"${pipeline.stageField}\" has to be a choice field so a record can hold a stage.`);\n } else {\n pipeline.stages?.forEach((stage, i) => {\n if (!stageField.choices?.includes(stage.key)) {\n say(\n `pipeline.stages[${i}]`,\n `The stage \"${stage.key}\" is not one of \"${pipeline.stageField}\"'s choices (${stageField.choices?.join(\", \")}).`,\n );\n }\n });\n }\n if ((pipeline.stages?.length ?? 0) < 3) {\n say(\"pipeline.stages\", \"A lifecycle worth showing has at least three stages the staff actually say out loud.\");\n }\n }\n\n // ── the dashboard question ──\n const question = useCase.dashboardQuestion;\n if (!question) {\n say(\"dashboardQuestion\", \"A use case owes the question this business's owner really asks on Monday morning.\");\n } else {\n if (!question.question?.trim().endsWith(\"?\")) {\n say(\"dashboardQuestion.question\", \"Write it as the question they would actually say, ending in a question mark.\");\n }\n if (!tablesByToken.has(question.table)) {\n say(\"dashboardQuestion.table\", `It reads \"${question.table}\", which this use case does not declare.`);\n } else {\n if (question.aggregate !== \"count\" && !question.of) {\n say(\"dashboardQuestion.of\", `A ${question.aggregate} has to name the field it aggregates.`);\n }\n for (const [prop, key] of [\n [\"of\", question.of],\n [\"groupBy\", question.groupBy],\n ] as const) {\n if (key && !resolveField(question.table, key)) {\n say(`dashboardQuestion.${prop}`, `\"${question.table}\" does not declare a field \"${key}\".`);\n }\n }\n }\n if (!question.whyItMatters) {\n say(\"dashboardQuestion.whyItMatters\", \"Say what they DO differently depending on the answer.\");\n }\n }\n\n // ── the document template ──\n const doc = useCase.documentTemplate;\n if (!doc) {\n say(\"documentTemplate\", \"A use case owes a document this business really sends.\");\n } else {\n if (!tablesByToken.has(doc.table)) {\n say(\"documentTemplate.table\", `It is built from \"${doc.table}\", which this use case does not declare.`);\n }\n const declared = new Set(doc.mergeFields?.map((m) => m.key) ?? []);\n const used = new Set(\n [...`${doc.title}\\n${doc.body}`.matchAll(/\\{\\{\\s*([a-z0-9_.]+)\\s*\\}\\}/gi)]\n .map((m) => m[1])\n .filter((key): key is string => key !== undefined),\n );\n for (const key of used) {\n if (!declared.has(key)) {\n say(\"documentTemplate.body\", `The document uses {{${key}}} but does not declare it as a merge field.`);\n }\n }\n for (const merge of doc.mergeFields ?? []) {\n if (!used.has(merge.key)) {\n say(\"documentTemplate.mergeFields\", `It declares {{${merge.key}}} but the document never uses it.`);\n }\n const isSpecial = merge.from === \"business\" || merge.from === \"today\" || merge.from.startsWith(\"business.\");\n if (!isSpecial && tablesByToken.has(doc.table) && !resolveField(doc.table, merge.from)) {\n say(\n \"documentTemplate.mergeFields\",\n `{{${merge.key}}} reads \"${merge.from}\", which \"${doc.table}\" does not declare (use a field key, or \"business\"/\"today\").`,\n );\n }\n }\n if ((doc.body ?? \"\").length < 80) {\n say(\"documentTemplate.body\", \"Write the prose this business would really send, not a stub.\");\n }\n }\n\n // ── the notification rule ──\n const rule = useCase.notificationRule;\n if (!rule) {\n say(\"notificationRule\", \"A use case owes the one automatic message this business sets up on day one.\");\n } else {\n if (!tablesByToken.has(rule.when.table)) {\n say(\"notificationRule.when.table\", `It watches \"${rule.when.table}\", which this use case does not declare.`);\n } else {\n if (rule.when.field && !resolveField(rule.when.table, rule.when.field)) {\n say(\"notificationRule.when.field\", `\"${rule.when.table}\" does not declare a field \"${rule.when.field}\".`);\n }\n if (rule.when.event === \"stage_entered\" && !rule.when.stage) {\n say(\"notificationRule.when.stage\", \"A stage trigger has to say which stage it fires on.\");\n }\n if ((rule.when.event === \"due\" || rule.when.event === \"overdue\") && !rule.when.field) {\n say(\"notificationRule.when.field\", \"A due trigger has to name the date field it watches.\");\n }\n }\n if (!rule.message) say(\"notificationRule.message\", \"Write the message this business would really send.\");\n if (!rule.audience) say(\"notificationRule.audience\", \"Say who it reaches, in the business's own words.\");\n }\n\n return { ok: problems.length === 0, problems };\n}\n\n/**\n * Validate, and throw with every problem listed. This is what a seeder calls\n * before it writes anything to a live organization — a half-valid dataset is\n * worse than none, because it produces a screen that looks like it worked.\n */\nexport function assertUseCase(useCase: UseCase): void {\n const verdict = validateUseCase(useCase);\n if (verdict.ok) return;\n const lines = verdict.problems.map((p) => ` · ${p.at}: ${p.says}`);\n throw new Error(\n `The use case \"${useCase.id}\" is not ready to seed — ${verdict.problems.length} problem(s):\\n${lines.join(\"\\n\")}`,\n );\n}\n","// src/use-cases/registry.ts — @ai-matrx/records/use-cases\n//\n// THE REGISTER OF REAL USE CASES.\n//\n// One line per use case, and that line is the ONLY thing a crew adds besides\n// its own file. There is deliberately no duplicated metadata here — no industry\n// column, no business name, no row counts — because a second copy of a fact is\n// a second copy that goes stale. Everything a caller wants to list is derived\n// by loading the file (`listUseCases`).\n//\n// The loaders are dynamic imports so a consumer that shows ONE business does not\n// pull fourteen of them into its bundle. `loadAllUseCases` is for the suite, the\n// seeders and the census — all of which run in Node and want the lot.\n\nimport type { UseCase, UseCaseSummary } from \"./types\";\n\n/**\n * Every registered use case, by id. ADD YOUR LINE HERE and nowhere else.\n *\n * Keep it alphabetical — it is read by people looking for an industry.\n */\nexport const USE_CASE_LOADERS: Record<string, () => Promise<{ useCase: UseCase }>> = {\n \"alvarado-chen-kitchen-weekly-cooking\": () => import(\"./alvarado-chen-kitchen-weekly-cooking\"),\n \"birchwood-avenue-renovation-budget\": () => import(\"./birchwood-avenue-renovation-budget\"),\n \"harbor-dental-new-patient-intake\": () => import(\"./harbor-dental-new-patient-intake\"),\n \"ridgeline-physical-therapy-plan-of-care\": () => import(\"./ridgeline-physical-therapy-plan-of-care\"),\n};\n\n/** The ids, sorted, so any listing is stable. */\nexport function useCaseIds(): string[] {\n return Object.keys(USE_CASE_LOADERS).sort();\n}\n\n/** Load one by id. Throws by name when it is not registered. */\nexport async function loadUseCase(id: string): Promise<UseCase> {\n const loader = USE_CASE_LOADERS[id];\n if (!loader) {\n throw new Error(\n `There is no use case registered as \"${id}\". Registered: ${useCaseIds().join(\", \")}.`,\n );\n }\n const module = await loader();\n return module.useCase;\n}\n\n/** Load all of them. For the suite, the seeders and the census. */\nexport async function loadAllUseCases(): Promise<UseCase[]> {\n return Promise.all(useCaseIds().map((id) => loadUseCase(id)));\n}\n\n/** Summarize one without the caller walking its tables. */\nexport function summarize(useCase: UseCase): UseCaseSummary {\n return {\n id: useCase.id,\n useCase: useCase.useCase,\n industry: useCase.industry,\n businessName: useCase.business.name,\n tableCount: useCase.tables.length,\n rowCount: useCase.tables.reduce((total, table) => total + table.rows.length, 0),\n };\n}\n\n/** Every use case, summarized. Loads all of them, so call it server-side. */\nexport async function listUseCases(): Promise<UseCaseSummary[]> {\n return (await loadAllUseCases()).map(summarize);\n}\n\n/**\n * Pick the use case for a given consumer, deterministically.\n *\n * The law says to ROTATE across industries so the platform is exercised by many\n * kinds of business rather than one toy. A suite, a demo or a screenshot script\n * passes a stable name for itself and always gets the same business — stable\n * enough to assert on, different enough across consumers that the platform gets\n * exercised broadly.\n */\nexport function useCaseFor(consumer: string): string {\n const ids = useCaseIds();\n let hash = 0;\n for (let i = 0; i < consumer.length; i += 1) {\n hash = (hash * 31 + consumer.charCodeAt(i)) >>> 0;\n }\n const id = ids[hash % ids.length];\n if (!id) {\n throw new Error(\n `No use cases are registered, so there is nothing to give \"${consumer}\". Add one to USE_CASE_LOADERS.`,\n );\n }\n return id;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAwBa,SAkTN;AA1UP;AAAA;AAAA;AAwBO,IAAM,UAAmB;AAAA,MAC9B,IAAI;AAAA,MACJ,SACE;AAAA,MACF,UAAU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;AAAA,IACZ,SAASA,SAAQ;AAAA,IACjB,UAAUA,SAAQ;AAAA,IAClB,cAAcA,SAAQ,SAAS;AAAA,IAC/B,YAAYA,SAAQ,OAAO;AAAA,IAC3B,UAAUA,SAAQ,OAAO,OAAO,CAAC,OAAO,UAAU,QAAQ,MAAM,KAAK,QAAQ,CAAC;AAAA,EAChF;AACF;AAGA,eAAsB,eAA0C;AAC9D,UAAQ,MAAM,gBAAgB,GAAG,IAAI,SAAS;AAChD;AAWO,SAAS,WAAW,UAA0B;AACnD,QAAM,MAAM,WAAW;AACvB,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK,GAAG;AAC3C,WAAQ,OAAO,KAAK,SAAS,WAAW,CAAC,MAAO;AAAA,EAClD;AACA,QAAM,KAAK,IAAI,OAAO,IAAI,MAAM;AAChC,MAAI,CAAC,IAAI;AACP,UAAM,IAAI;AAAA,MACR,6DAA6D,QAAQ;AAAA,IACvE;AAAA,EACF;AACA,SAAO;AACT;","names":["useCase","useCase","useCase","useCase","module","useCase"]}
1
+ {"version":3,"sources":["../../src/use-cases/alvarado-chen-kitchen-weekly-cooking.ts","../../src/use-cases/birchwood-avenue-renovation-budget.ts","../../src/use-cases/harbor-dental-new-patient-intake.ts","../../src/use-cases/ridgeline-physical-therapy-plan-of-care.ts","../../src/use-cases/index.ts","../../src/use-cases/placeholders.ts","../../src/store.generated.ts","../../src/vocabulary.ts","../../src/use-cases/validate.ts","../../src/use-cases/registry.ts"],"sourcesContent":["// src/use-cases/alvarado-chen-kitchen-weekly-cooking.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Priya and Daniel Alvarado-Chen cook for a family of five, and\n// they use this to keep the recipes they actually make, what goes into each one,\n// and the week's shopping list that falls out of the meals they have planned —\n// instead of three notebooks, a photo of a card and a text message at the shop.\n//\n// The law welcomes personal life, and a household is the honest test of a\n// platform that claims anyone can model their own work: nobody here has a job\n// title, a CRM or a pipeline consultant.\n//\n// PROVENANCE. Tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/family-recipe-collection.json`.\n// Fixed on adoption: the household was \"The Alvarado-Chen Kitchen (test\n// fixture)\" — a test organization carries the use case's own name and is found\n// for cleanup by its tag, never by a junk suffix. Relations pointed at a\n// recipe's TITLE rather than at the row. The business identity, relationships,\n// form, pipeline, dashboard question, document and notification rule were\n// written for this file.\n//\n// Everyone here is invented.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"alvarado-chen-kitchen-weekly-cooking\",\n useCase:\n \"Priya and Daniel Alvarado-Chen cook for a family of five, and they use this to keep the recipes they actually make, the ingredients each one needs, and the weekly shopping list that falls out of the meals they have planned, instead of three notebooks and a text message at the shop.\",\n industry: \"Household cooking\",\n cleanupTag: \"use-case:alvarado-chen-kitchen-weekly-cooking\",\n\n business: {\n name: \"The Alvarado-Chen Kitchen\",\n describes: \"A household of five that cooks most nights and shops once a week across three shops.\",\n address: {\n line1: \"68 Winterbourne Road\",\n city: \"Oak Park\",\n region: \"IL\",\n postalCode: \"60302\",\n country: \"US\",\n },\n phone: \"+1 708 555 0126\",\n email: \"kitchen@alvaradochen.net\",\n timezone: \"America/Chicago\",\n },\n\n tables: [\n {\n token: \"recipes\",\n name: \"Recipes\",\n labelSingular: \"Recipe\",\n labelPlural: \"Recipes\",\n type: \"entity\",\n display: \"grid\",\n weight: \"heavy\",\n ordered: false,\n icon: \"chef-hat\",\n titleField: \"title\",\n describes: \"Every dish the household actually cooks, with who brought it in and how long it takes.\",\n fields: [\n { key: \"title\", label: \"Recipe\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"category\", label: \"Course\", parityType: \"select\", choices: [\"Breakfast\", \"Main Course\", \"Side Dish\", \"Soup\", \"Dessert\", \"Sauce/Condiment\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"cuisine\", label: \"Cuisine\", parityType: \"select\", choices: [\"Mexican\", \"Chinese\", \"Italian\", \"American\", \"Middle Eastern\", \"Indian\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"prep_minutes\", label: \"Prep time\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"cook_minutes\", label: \"Cook time\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"servings\", label: \"Serves\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"source\", label: \"Where it came from\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contributed_by\", label: \"Brought in by\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"date_added\", label: \"Added\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"recipe-chilaquiles-verdes\", values: {\"title\": \"Chilaquiles Verdes\", \"category\": \"Breakfast\", \"cuisine\": \"Mexican\", \"prep_minutes\": 15, \"cook_minutes\": 20, \"servings\": 4, \"source\": \"Grandma Alvarado's recipe box, card #12\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-01-08\"} },\n { key: \"recipe-kung-pao-chicken\", values: {\"title\": \"Kung Pao Chicken\", \"category\": \"Main Course\", \"cuisine\": \"Chinese\", \"prep_minutes\": 20, \"cook_minutes\": 15, \"servings\": 4, \"source\": \"Adapted from Fuchsia Dunlop's Land of Fish and Rice\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-01-15\"} },\n { key: \"recipe-slow-braised-short-rib-ragu\", values: {\"title\": \"Slow-Braised Short Rib Ragu\", \"category\": \"Main Course\", \"cuisine\": \"Italian\", \"prep_minutes\": 25, \"cook_minutes\": 210, \"servings\": 6, \"source\": \"Sunday dinner tradition, no written source\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-02-02\"} },\n { key: \"recipe-mapo-tofu\", values: {\"title\": \"Mapo Tofu\", \"category\": \"Main Course\", \"cuisine\": \"Chinese\", \"prep_minutes\": 10, \"cook_minutes\": 15, \"servings\": 3, \"source\": \"Wei's mother, dictated over the phone\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-02-10\"} },\n { key: \"recipe-elote-street-corn-salad\", values: {\"title\": \"Elote Street Corn Salad\", \"category\": \"Side Dish\", \"cuisine\": \"Mexican\", \"prep_minutes\": 15, \"cook_minutes\": 10, \"servings\": 6, \"source\": \"Farmers market recipe card\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-03-01\"} },\n { key: \"recipe-pozole-rojo\", values: {\"title\": \"Pozole Rojo\", \"category\": \"Soup\", \"cuisine\": \"Mexican\", \"prep_minutes\": 30, \"cook_minutes\": 180, \"servings\": 8, \"source\": \"Family recipe, three generations\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-03-14\"} },\n { key: \"recipe-hot-and-sour-soup\", values: {\"title\": \"Hot and Sour Soup\", \"category\": \"Soup\", \"cuisine\": \"Chinese\", \"prep_minutes\": 15, \"cook_minutes\": 20, \"servings\": 4, \"source\": \"Wei Chen's own recipe\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-03-22\"} },\n { key: \"recipe-tres-leches-cake\", values: {\"title\": \"Tres Leches Cake\", \"category\": \"Dessert\", \"cuisine\": \"Mexican\", \"prep_minutes\": 30, \"cook_minutes\": 35, \"servings\": 12, \"source\": \"Grandma Alvarado's recipe box, card #4\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-04-05\"} },\n { key: \"recipe-cacio-e-pepe\", values: {\"title\": \"Cacio e Pepe\", \"category\": \"Main Course\", \"cuisine\": \"Italian\", \"prep_minutes\": 5, \"cook_minutes\": 15, \"servings\": 2, \"source\": \"Weeknight standby, no written source\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-04-12\"} },\n { key: \"recipe-chana-masala\", values: {\"title\": \"Chana Masala\", \"category\": \"Main Course\", \"cuisine\": \"Indian\", \"prep_minutes\": 15, \"cook_minutes\": 30, \"servings\": 4, \"source\": \"Learned from neighbor Priya\", \"contributed_by\": \"Wei Chen\", \"date_added\": \"2026-05-01\"} },\n { key: \"recipe-salsa-verde-cruda\", values: {\"title\": \"Salsa Verde Cruda\", \"category\": \"Sauce/Condiment\", \"cuisine\": \"Mexican\", \"prep_minutes\": 10, \"cook_minutes\": 0, \"servings\": 8, \"source\": \"Grandma Alvarado's recipe box, card #1\", \"contributed_by\": \"Rosa Alvarado\", \"date_added\": \"2026-05-10\"} },\n { key: \"recipe-shakshuka\", values: {\"title\": \"Shakshuka\", \"category\": \"Breakfast\", \"cuisine\": \"Middle Eastern\", \"prep_minutes\": 10, \"cook_minutes\": 25, \"servings\": 4, \"source\": \"Ottolenghi's Jerusalem, adapted\", \"contributed_by\": \"Marco Alvarado\", \"date_added\": \"2026-05-18\"} },\n ],\n },\n {\n token: \"ingredients\",\n name: \"Ingredients\",\n labelSingular: \"Ingredient\",\n labelPlural: \"Ingredients\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"carrot\",\n titleField: \"ingredient_name\",\n describes: \"What goes into each recipe, in the amounts the recipe is written for.\",\n fields: [\n { key: \"recipe\", label: \"Recipe\", parityType: \"relation\", required: true, relationTarget: \"recipes\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"ingredient_name\", label: \"Ingredient\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quantity\", label: \"Quantity\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"unit\", label: \"Unit\", parityType: \"select\", choices: [\"cup\", \"tbsp\", \"tsp\", \"oz\", \"lb\", \"clove\", \"whole\", \"can\", \"pinch\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"notes\", label: \"Notes\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"ingredient-corn-tortillas-cut-into-wedges-and-fried\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"corn tortillas, cut into wedges and fried\", \"quantity\": 12, \"unit\": \"whole\", \"notes\": \"day-old tortillas fry crisper\"} },\n { key: \"ingredient-tomatillos\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"tomatillos\", \"quantity\": 1, \"unit\": \"lb\", \"notes\": \"husked and rinsed\"} },\n { key: \"ingredient-serrano-peppers\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"serrano peppers\", \"quantity\": 2, \"unit\": \"whole\", \"notes\": \"seeds removed for less heat\"} },\n { key: \"ingredient-queso-fresco\", values: {\"recipe\": \"recipe-chilaquiles-verdes\", \"ingredient_name\": \"queso fresco\", \"quantity\": 4, \"unit\": \"oz\", \"notes\": \"crumbled for topping\"} },\n { key: \"ingredient-chicken-thighs-diced\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"chicken thighs, diced\", \"quantity\": 1.5, \"unit\": \"lb\", \"notes\": \"boneless, skinless\"} },\n { key: \"ingredient-dried-red-chilies\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"dried red chilies\", \"quantity\": 8, \"unit\": \"whole\", \"notes\": \"adjust to taste\"} },\n { key: \"ingredient-roasted-peanuts\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"roasted peanuts\", \"quantity\": 0.5, \"unit\": \"cup\", \"notes\": \"\"} },\n { key: \"ingredient-sichuan-peppercorns\", values: {\"recipe\": \"recipe-kung-pao-chicken\", \"ingredient_name\": \"Sichuan peppercorns\", \"quantity\": 1, \"unit\": \"tsp\", \"notes\": \"toasted and cracked\"} },\n { key: \"ingredient-bone-in-short-ribs\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"bone-in short ribs\", \"quantity\": 3, \"unit\": \"lb\", \"notes\": \"trimmed of excess fat\"} },\n { key: \"ingredient-san-marzano-tomatoes\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"San Marzano tomatoes\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"28 oz can, crushed by hand\"} },\n { key: \"ingredient-red-wine\", values: {\"recipe\": \"recipe-slow-braised-short-rib-ragu\", \"ingredient_name\": \"red wine\", \"quantity\": 1, \"unit\": \"cup\", \"notes\": \"something drinkable\"} },\n { key: \"ingredient-soft-tofu-cubed\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"soft tofu, cubed\", \"quantity\": 14, \"unit\": \"oz\", \"notes\": \"one package\"} },\n { key: \"ingredient-doubanjiang-fermented-chili-bean-paste\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"doubanjiang (fermented chili bean paste)\", \"quantity\": 2, \"unit\": \"tbsp\", \"notes\": \"Pixian brand preferred\"} },\n { key: \"ingredient-ground-pork\", values: {\"recipe\": \"recipe-mapo-tofu\", \"ingredient_name\": \"ground pork\", \"quantity\": 0.5, \"unit\": \"lb\", \"notes\": \"\"} },\n { key: \"ingredient-corn-kernels-charred\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"corn kernels, charred\", \"quantity\": 4, \"unit\": \"cup\", \"notes\": \"grilled or pan-charred\"} },\n { key: \"ingredient-cotija-cheese\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"cotija cheese\", \"quantity\": 0.5, \"unit\": \"cup\", \"notes\": \"crumbled\"} },\n { key: \"ingredient-lime\", values: {\"recipe\": \"recipe-elote-street-corn-salad\", \"ingredient_name\": \"lime\", \"quantity\": 2, \"unit\": \"whole\", \"notes\": \"juiced\"} },\n { key: \"ingredient-pork-shoulder\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"pork shoulder\", \"quantity\": 3, \"unit\": \"lb\", \"notes\": \"cut into large chunks\"} },\n { key: \"ingredient-hominy\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"hominy\", \"quantity\": 2, \"unit\": \"can\", \"notes\": \"29 oz cans, drained\"} },\n { key: \"ingredient-guajillo-chilies\", values: {\"recipe\": \"recipe-pozole-rojo\", \"ingredient_name\": \"guajillo chilies\", \"quantity\": 6, \"unit\": \"whole\", \"notes\": \"stemmed and seeded\"} },\n { key: \"ingredient-wood-ear-mushrooms-dried\", values: {\"recipe\": \"recipe-hot-and-sour-soup\", \"ingredient_name\": \"wood ear mushrooms, dried\", \"quantity\": 0.25, \"unit\": \"cup\", \"notes\": \"rehydrated and sliced\"} },\n { key: \"ingredient-white-pepper\", values: {\"recipe\": \"recipe-hot-and-sour-soup\", \"ingredient_name\": \"white pepper\", \"quantity\": 1, \"unit\": \"tsp\", \"notes\": \"the 'hot' in hot and sour\"} },\n { key: \"ingredient-evaporated-milk\", values: {\"recipe\": \"recipe-tres-leches-cake\", \"ingredient_name\": \"evaporated milk\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"12 oz can\"} },\n { key: \"ingredient-sweetened-condensed-milk\", values: {\"recipe\": \"recipe-tres-leches-cake\", \"ingredient_name\": \"sweetened condensed milk\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"14 oz can\"} },\n { key: \"ingredient-pecorino-romano-grated\", values: {\"recipe\": \"recipe-cacio-e-pepe\", \"ingredient_name\": \"pecorino romano, grated\", \"quantity\": 1.5, \"unit\": \"cup\", \"notes\": \"finely grated, not shredded\"} },\n { key: \"ingredient-chickpeas\", values: {\"recipe\": \"recipe-chana-masala\", \"ingredient_name\": \"chickpeas\", \"quantity\": 2, \"unit\": \"can\", \"notes\": \"15 oz cans, drained\"} },\n { key: \"ingredient-garam-masala\", values: {\"recipe\": \"recipe-chana-masala\", \"ingredient_name\": \"garam masala\", \"quantity\": 1, \"unit\": \"tbsp\", \"notes\": \"\"} },\n { key: \"ingredient-tomatillos-raw\", values: {\"recipe\": \"recipe-salsa-verde-cruda\", \"ingredient_name\": \"tomatillos, raw\", \"quantity\": 1, \"unit\": \"lb\", \"notes\": \"quartered\"} },\n { key: \"ingredient-eggs\", values: {\"recipe\": \"recipe-shakshuka\", \"ingredient_name\": \"eggs\", \"quantity\": 6, \"unit\": \"whole\", \"notes\": \"cracked directly into sauce\"} },\n { key: \"ingredient-crushed-tomatoes\", values: {\"recipe\": \"recipe-shakshuka\", \"ingredient_name\": \"crushed tomatoes\", \"quantity\": 1, \"unit\": \"can\", \"notes\": \"28 oz can\"} },\n ],\n },\n {\n token: \"shopping_lists\",\n name: \"Shopping lists\",\n labelSingular: \"Shopping list\",\n labelPlural: \"Shopping lists\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: false,\n icon: \"shopping-cart\",\n titleField: \"list_name\",\n describes: \"One list per shop per week, built from the recipes planned for that week.\",\n fields: [\n { key: \"list_name\", label: \"List\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"week_of\", label: \"Week of\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"store\", label: \"Shop\", parityType: \"select\", choices: [\"Fresh Market Co-op\", \"Lucky Star Asian Grocery\", \"Mercado Alvarado\", \"Costco\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Planning\", \"Ready to Shop\", \"Shopping\", \"Done\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"list-week-of-jun-1-mexican-night-weekday-soup\", values: {\"list_name\": \"Week of Jun 1 — Mexican night + weekday soup\", \"week_of\": \"2026-06-01\", \"store\": \"Mercado Alvarado\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-8-chinese-takeout-at-home\", values: {\"list_name\": \"Week of Jun 8 — Chinese takeout-at-home\", \"week_of\": \"2026-06-08\", \"store\": \"Lucky Star Asian Grocery\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", values: {\"list_name\": \"Week of Jun 15 — Sunday ragu + easy weeknights\", \"week_of\": \"2026-06-15\", \"store\": \"Fresh Market Co-op\", \"status\": \"Done\"} },\n { key: \"list-week-of-jun-22-birthday-cake-week\", values: {\"list_name\": \"Week of Jun 22 — Birthday cake week\", \"week_of\": \"2026-06-22\", \"store\": \"Costco\", \"status\": \"Ready to Shop\"} },\n { key: \"list-week-of-jun-29-pozole-for-the-in-laws\", values: {\"list_name\": \"Week of Jun 29 — Pozole for the in-laws\", \"week_of\": \"2026-06-29\", \"store\": \"Mercado Alvarado\", \"status\": \"Planning\"} },\n ],\n },\n {\n token: \"shopping_list_items\",\n name: \"List items\",\n labelSingular: \"List item\",\n labelPlural: \"List items\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"list-checks\",\n titleField: \"ingredient_name\",\n describes: \"What is actually on a list, by aisle, and whether it is already in the trolley.\",\n fields: [\n { key: \"shopping_list\", label: \"Shopping list\", parityType: \"relation\", required: true, relationTarget: \"shopping_lists\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"ingredient_name\", label: \"Ingredient\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quantity\", label: \"Quantity\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"unit\", label: \"Unit\", parityType: \"select\", choices: [\"cup\", \"tbsp\", \"tsp\", \"oz\", \"lb\", \"clove\", \"whole\", \"can\", \"pinch\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"aisle\", label: \"Aisle\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"checked\", label: \"In the trolley\", parityType: \"select\", choices: [\"Yes\", \"No\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"item-tomatillos\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"tomatillos\", \"quantity\": 2, \"unit\": \"lb\", \"aisle\": \"Produce\", \"checked\": \"Yes\"} },\n { key: \"item-corn-tortillas\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"corn tortillas\", \"quantity\": 2, \"unit\": \"whole\", \"aisle\": \"Bakery\", \"checked\": \"Yes\"} },\n { key: \"item-queso-fresco\", values: {\"shopping_list\": \"list-week-of-jun-1-mexican-night-weekday-soup\", \"ingredient_name\": \"queso fresco\", \"quantity\": 8, \"unit\": \"oz\", \"aisle\": \"Dairy\", \"checked\": \"Yes\"} },\n { key: \"item-chicken-thighs\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"chicken thighs\", \"quantity\": 1.5, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"Yes\"} },\n { key: \"item-dried-red-chilies\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"dried red chilies\", \"quantity\": 1, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"Yes\"} },\n { key: \"item-sichuan-peppercorns\", values: {\"shopping_list\": \"list-week-of-jun-8-chinese-takeout-at-home\", \"ingredient_name\": \"Sichuan peppercorns\", \"quantity\": 1, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"No\"} },\n { key: \"item-bone-in-short-ribs\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"bone-in short ribs\", \"quantity\": 3, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"Yes\"} },\n { key: \"item-san-marzano-tomatoes\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"San Marzano tomatoes\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Canned Goods\", \"checked\": \"Yes\"} },\n { key: \"item-pecorino-romano\", values: {\"shopping_list\": \"list-week-of-jun-15-sunday-ragu-easy-weeknights\", \"ingredient_name\": \"pecorino romano\", \"quantity\": 1, \"unit\": \"lb\", \"aisle\": \"Dairy\", \"checked\": \"No\"} },\n { key: \"item-evaporated-milk\", values: {\"shopping_list\": \"list-week-of-jun-22-birthday-cake-week\", \"ingredient_name\": \"evaporated milk\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Baking\", \"checked\": \"No\"} },\n { key: \"item-sweetened-condensed-milk\", values: {\"shopping_list\": \"list-week-of-jun-22-birthday-cake-week\", \"ingredient_name\": \"sweetened condensed milk\", \"quantity\": 2, \"unit\": \"can\", \"aisle\": \"Baking\", \"checked\": \"No\"} },\n { key: \"item-pork-shoulder\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"pork shoulder\", \"quantity\": 3, \"unit\": \"lb\", \"aisle\": \"Meat\", \"checked\": \"No\"} },\n { key: \"item-hominy\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"hominy\", \"quantity\": 4, \"unit\": \"can\", \"aisle\": \"Canned Goods\", \"checked\": \"No\"} },\n { key: \"item-guajillo-chilies\", values: {\"shopping_list\": \"list-week-of-jun-29-pozole-for-the-in-laws\", \"ingredient_name\": \"guajillo chilies\", \"quantity\": 6, \"unit\": \"oz\", \"aisle\": \"International\", \"checked\": \"No\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"An ingredient belongs to the recipe it is part of and means nothing without it.\",\n fromTable: \"ingredients\",\n fromField: \"recipe\",\n toTable: \"recipes\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"ingredients\",\n },\n {\n describes: \"A line on the shopping list belongs to the list it is written on.\",\n fromTable: \"shopping_list_items\",\n fromField: \"shopping_list\",\n toTable: \"shopping_lists\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"items\",\n },\n ],\n\n form: {\n token: \"alvarado_chen_add_a_recipe\",\n name: \"Add a recipe to the family collection\",\n describes:\n \"What anyone in the family fills in when a dish is worth keeping — including the grandparents, which is why it asks who brought it in.\",\n audience: \"member\",\n table: \"recipes\",\n fields: [\n { fieldKey: \"title\", label: \"What is it called?\", required: true },\n { fieldKey: \"category\", label: \"Course\", required: true },\n { fieldKey: \"cuisine\", label: \"Cuisine\" },\n { fieldKey: \"prep_minutes\", label: \"Prep time in minutes\", help: \"Chopping and mixing — everything before it goes on the heat.\" },\n { fieldKey: \"cook_minutes\", label: \"Cook time in minutes\" },\n { fieldKey: \"servings\", label: \"How many does it serve?\", required: true },\n { fieldKey: \"source\", label: \"Where did it come from?\", help: \"A book, a website, or a person. We like knowing.\" },\n { fieldKey: \"contributed_by\", label: \"Who brought it in?\", required: true },\n ],\n submitLabel: \"Add it to the collection\",\n confirmation:\n \"Added. Put the ingredients in next, and it will start showing up on the shopping list when you plan it for a week.\",\n },\n\n pipeline: {\n token: \"alvarado_chen_weekly_shop\",\n name: \"The weekly shop\",\n describes:\n \"A list's life is four days long and everybody in the house touches it. The stages exist so nobody buys the same bag of rice twice.\",\n table: \"shopping_lists\",\n stageField: \"status\",\n stages: [\n { key: \"Planning\", label: \"Planning\", describes: \"Meals are still being chosen, so the list is still growing. Nobody shops from it yet.\", typicalDurationDays: 3 },\n { key: \"Ready to Shop\", label: \"Ready to shop\", describes: \"The meals are settled and the list is complete. This is the state it is in when somebody picks up their keys.\", typicalDurationDays: 1 },\n { key: \"Shopping\", label: \"Shopping\", describes: \"Somebody is in the shop ticking things off. Anything added now is a genuine omission, not a change of plan.\", typicalDurationDays: 1 },\n { key: \"Done\", label: \"Done\", describes: \"Everything is home. Unticked items roll onto next week rather than being lost.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"Which of our recipes can we actually cook on a Tuesday?\",\n whyItMatters:\n \"Weeknight cooking fails on time, not on ideas. Knowing the average cook time by course is what stops a two-hour braise being planned for a school night, and it is the number that decides what goes on the list.\",\n table: \"recipes\",\n aggregate: \"avg\",\n of: \"cook_minutes\",\n groupBy: \"category\",\n answerUnit: \"minutes\",\n },\n\n documentTemplate: {\n token: \"alvarado_chen_recipe_card\",\n name: \"Printable recipe card\",\n describes:\n \"What gets printed and stuck to the fridge door, or sent to someone who asked for the recipe after dinner. It keeps the attribution, because half the collection came from somebody's mother.\",\n table: \"recipes\",\n title: \"{{recipe_title}} — serves {{servings}}\",\n body: [\n \"{{recipe_title}}\",\n \"\",\n \"{{course}} · {{cuisine}} · serves {{servings}}\",\n \"Prep {{prep_time}} minutes, cook {{cook_time}} minutes.\",\n \"\",\n \"From {{source}}, brought into the family by {{contributed_by}}.\",\n \"\",\n \"Ingredients are on the back. If you halve it, do not halve the salt by the same amount — taste it instead.\",\n \"\",\n \"{{household}} · printed {{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"recipe_title\", from: \"title\", describes: \"The dish.\" },\n { key: \"course\", from: \"category\", describes: \"Which part of the meal it is.\" },\n { key: \"cuisine\", from: \"cuisine\", describes: \"Where it comes from.\" },\n { key: \"servings\", from: \"servings\", describes: \"How many it feeds, so it can be scaled.\" },\n { key: \"prep_time\", from: \"prep_minutes\", describes: \"Minutes before it goes on the heat.\" },\n { key: \"cook_time\", from: \"cook_minutes\", describes: \"Minutes on the heat.\" },\n { key: \"source\", from: \"source\", describes: \"The book, site or person it came from.\" },\n { key: \"contributed_by\", from: \"contributed_by\", describes: \"Who brought it into the family.\" },\n { key: \"household\", from: \"business\", describes: \"Whose kitchen this is.\" },\n { key: \"today\", from: \"today\", describes: \"When the card was printed.\" },\n ],\n },\n\n notificationRule: {\n token: \"alvarado_chen_list_is_ready\",\n name: \"The list is ready to shop\",\n describes:\n \"The one message this household would genuinely set up: whoever is going to the shop needs to know the list stopped changing, because the whole failure mode is leaving with a list somebody was still editing.\",\n when: {\n table: \"shopping_lists\",\n event: \"stage_entered\",\n stage: \"Ready to Shop\",\n },\n audience: \"whoever is doing the shop this week\",\n channel: \"in_app\",\n message:\n \"{{list_name}} for the week of {{week_of}} is finished and ready — {{store}}. Tick things off as you go so nobody buys them twice.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/birchwood-avenue-renovation-budget.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Marguerite Oyelowo is renovating a 1920s house one room at a\n// time, and she uses this to hold every contractor quote against the room it is\n// for and every receipt against the budget she set — so that \"are we over?\" has\n// an answer instead of an argument.\n//\n// A homeowner is not a company, and that is the point: the platform is only\n// true to its claim if somebody with no staff and no software budget can model\n// their own project in it.\n//\n// PROVENANCE. Tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/home-renovation.json`.\n// Fixed on adoption: the project was \"Birchwood Ave Renovation (test fixture)\";\n// relations pointed at a room's NAME and a contractor's COMPANY NAME rather than\n// at the row; and the crew's `insured` boolean became a two-way choice, because\n// THE STORE HAS NO BOOLEAN — its thirteen parity types are closed and none of\n// them is a checkbox, so a yes/no is a choice of two. The business identity,\n// relationships, form, pipeline, dashboard question, document and notification\n// rule were written for this file.\n//\n// Every contractor, licence number and mailbox here is invented.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"birchwood-avenue-renovation-budget\",\n useCase:\n \"Marguerite Oyelowo is renovating a 1920s house one room at a time, and she uses this to hold every contractor quote against the room it is for and every receipt against the budget she set, so that whether the job is over budget has an answer instead of an argument.\",\n industry: \"Home renovation\",\n cleanupTag: \"use-case:birchwood-avenue-renovation-budget\",\n\n business: {\n name: \"Birchwood Avenue Renovation\",\n describes: \"A owner-managed whole-house renovation of a 1920s four-bedroom, run room by room over about a year.\",\n address: {\n line1: \"417 Birchwood Avenue\",\n city: \"Providence\",\n region: \"RI\",\n postalCode: \"02906\",\n country: \"US\",\n },\n phone: \"+1 401 555 0188\",\n email: \"marguerite@birchwoodreno.net\",\n timezone: \"America/New_York\",\n },\n\n tables: [\n {\n token: \"rooms\",\n name: \"Rooms\",\n labelSingular: \"Room\",\n labelPlural: \"Rooms\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: true,\n icon: \"door-open\",\n titleField: \"room_name\",\n describes: \"The house, room by room: what is being done to each one, when, and for how much.\",\n fields: [\n { key: \"room_name\", label: \"Room\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"project_scope\", label: \"Scope of work\", parityType: \"long_text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_start\", label: \"Target start\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_end\", label: \"Target finish\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Planning\", \"Quoting\", \"In Progress\", \"Complete\", \"On Hold\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"budget\", label: \"Budget\", parityType: \"currency\", unit: \"USD\", format: \"currency\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n ],\n rows: [\n { key: \"room-kitchen\", values: {\"room_name\": \"Kitchen\", \"project_scope\": \"Full gut renovation: new cabinets, quartz counters, relocate island, new appliances.\", \"target_start\": \"2026-04-01\", \"target_end\": \"2026-06-15\", \"status\": \"Complete\", \"budget\": 48000.0} },\n { key: \"room-primary-bathroom\", values: {\"room_name\": \"Primary Bathroom\", \"project_scope\": \"Replace tub with walk-in shower, new vanity, heated tile floor.\", \"target_start\": \"2026-06-20\", \"target_end\": \"2026-08-01\", \"status\": \"In Progress\", \"budget\": 22500.0} },\n { key: \"room-basement\", values: {\"room_name\": \"Basement\", \"project_scope\": \"Finish unfinished basement into family room and home office, add egress window.\", \"target_start\": \"2026-08-10\", \"target_end\": \"2026-11-15\", \"status\": \"Quoting\", \"budget\": 61000.0} },\n { key: \"room-guest-bathroom\", values: {\"room_name\": \"Guest Bathroom\", \"project_scope\": \"Cosmetic refresh: new vanity, paint, light fixtures.\", \"target_start\": \"2026-09-01\", \"target_end\": \"2026-09-20\", \"status\": \"Planning\", \"budget\": 6500.0} },\n { key: \"room-backyard-deck\", values: {\"room_name\": \"Backyard Deck\", \"project_scope\": \"Tear off old wood deck, build composite deck with pergola.\", \"target_start\": \"2026-05-01\", \"target_end\": \"2026-06-01\", \"status\": \"Complete\", \"budget\": 18000.0} },\n { key: \"room-garage\", values: {\"room_name\": \"Garage\", \"project_scope\": \"Epoxy floor, built-in storage, new insulated door.\", \"target_start\": \"2026-10-01\", \"target_end\": \"2026-10-20\", \"status\": \"On Hold\", \"budget\": 9500.0} },\n ],\n },\n {\n token: \"contractors\",\n name: \"Contractors\",\n labelSingular: \"Contractor\",\n labelPlural: \"Contractors\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"hard-hat\",\n titleField: \"company_name\",\n describes: \"Everyone quoting or working on the job, with the licence and insurance details that matter if something goes wrong.\",\n fields: [\n { key: \"company_name\", label: \"Company\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"trade\", label: \"Trade\", parityType: \"select\", choices: [\"General Contractor\", \"Plumbing\", \"Electrical\", \"Flooring\", \"Painting\", \"HVAC\", \"Carpentry\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contact_name\", label: \"Contact\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"phone\", label: \"Phone\", parityType: \"phone\", format: \"phone\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"email\", label: \"Email\", parityType: \"email\", format: \"email\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"license_number\", label: \"Licence number\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"insured\", label: \"Insured\", parityType: \"select\", choices: [\"Yes\", \"No\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"contractor-ferro-sons-construction\", values: {\"company_name\": \"Ferro & Sons Construction\", \"trade\": \"General Contractor\", \"contact_name\": \"Dominic Ferro\", \"phone\": \"555-330-1001\", \"email\": \"dominic@northshoremail.com\", \"license_number\": \"GC-88213-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-redline-plumbing-co\", values: {\"company_name\": \"Redline Plumbing Co.\", \"trade\": \"Plumbing\", \"contact_name\": \"Tanya Iversen\", \"phone\": \"555-330-1002\", \"email\": \"tanya@northshoremail.com\", \"license_number\": \"PL-44029-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-voltway-electric\", values: {\"company_name\": \"Voltway Electric\", \"trade\": \"Electrical\", \"contact_name\": \"Emeka Osayande\", \"phone\": \"555-330-1003\", \"email\": \"emeka@northshoremail.com\", \"license_number\": \"EL-90117-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-hearthstone-flooring\", values: {\"company_name\": \"Hearthstone Flooring\", \"trade\": \"Flooring\", \"contact_name\": \"Bianca Moretti\", \"phone\": \"555-330-1004\", \"email\": \"bianca@northshoremail.com\", \"license_number\": \"FL-22850-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-clearcoat-painting\", values: {\"company_name\": \"Clearcoat Painting\", \"trade\": \"Painting\", \"contact_name\": \"Sam Delacroix\", \"phone\": \"555-330-1005\", \"email\": \"sam@northshoremail.com\", \"license_number\": \"PT-10442-OH\", \"insured\": \"No\"} },\n { key: \"contractor-northgate-hvac\", values: {\"company_name\": \"Northgate HVAC\", \"trade\": \"HVAC\", \"contact_name\": \"Renata Kowalczyk\", \"phone\": \"555-330-1006\", \"email\": \"renata@northshoremail.com\", \"license_number\": \"HV-77302-OH\", \"insured\": \"Yes\"} },\n { key: \"contractor-millbrook-carpentry\", values: {\"company_name\": \"Millbrook Carpentry\", \"trade\": \"Carpentry\", \"contact_name\": \"Julius Wexford\", \"phone\": \"555-330-1007\", \"email\": \"julius@northshoremail.com\", \"license_number\": \"CP-55671-OH\", \"insured\": \"Yes\"} },\n ],\n },\n {\n token: \"quotes\",\n name: \"Quotes\",\n labelSingular: \"Quote\",\n labelPlural: \"Quotes\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"file-text\",\n titleField: \"quote_amount\",\n describes: \"What each trade said each room would cost, and whether that price is still good.\",\n fields: [\n { key: \"room\", label: \"Room\", parityType: \"relation\", required: true, relationTarget: \"rooms\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"contractor\", label: \"Contractor\", parityType: \"relation\", required: true, relationTarget: \"contractors\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"quote_amount\", label: \"Quote\", parityType: \"currency\", unit: \"USD\", format: \"currency\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"quote_date\", label: \"Quoted on\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Pending\", \"Accepted\", \"Rejected\", \"Expired\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"valid_until\", label: \"Valid until\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"quote-46500-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 46500.0, \"quote_date\": \"2026-02-14\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-14\"} },\n { key: \"quote-3200-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-redline-plumbing-co\", \"quote_amount\": 3200.0, \"quote_date\": \"2026-02-20\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-20\"} },\n { key: \"quote-2800-0\", values: {\"room\": \"room-kitchen\", \"contractor\": \"contractor-voltway-electric\", \"quote_amount\": 2800.0, \"quote_date\": \"2026-02-20\", \"status\": \"Accepted\", \"valid_until\": \"2026-03-20\"} },\n { key: \"quote-21000-0\", values: {\"room\": \"room-primary-bathroom\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 21000.0, \"quote_date\": \"2026-05-10\", \"status\": \"Accepted\", \"valid_until\": \"2026-06-10\"} },\n { key: \"quote-4100-0\", values: {\"room\": \"room-primary-bathroom\", \"contractor\": \"contractor-redline-plumbing-co\", \"quote_amount\": 4100.0, \"quote_date\": \"2026-05-11\", \"status\": \"Accepted\", \"valid_until\": \"2026-06-11\"} },\n { key: \"quote-58000-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 58000.0, \"quote_date\": \"2026-07-20\", \"status\": \"Pending\", \"valid_until\": \"2026-08-20\"} },\n { key: \"quote-12500-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-millbrook-carpentry\", \"quote_amount\": 12500.0, \"quote_date\": \"2026-07-22\", \"status\": \"Pending\", \"valid_until\": \"2026-08-22\"} },\n { key: \"quote-6800-0\", values: {\"room\": \"room-basement\", \"contractor\": \"contractor-northgate-hvac\", \"quote_amount\": 6800.0, \"quote_date\": \"2026-07-25\", \"status\": \"Pending\", \"valid_until\": \"2026-08-25\"} },\n { key: \"quote-1800-0\", values: {\"room\": \"room-guest-bathroom\", \"contractor\": \"contractor-hearthstone-flooring\", \"quote_amount\": 1800.0, \"quote_date\": \"2026-07-28\", \"status\": \"Pending\", \"valid_until\": \"2026-08-28\"} },\n { key: \"quote-17200-0\", values: {\"room\": \"room-backyard-deck\", \"contractor\": \"contractor-millbrook-carpentry\", \"quote_amount\": 17200.0, \"quote_date\": \"2026-03-05\", \"status\": \"Accepted\", \"valid_until\": \"2026-04-05\"} },\n { key: \"quote-19800-0\", values: {\"room\": \"room-backyard-deck\", \"contractor\": \"contractor-ferro-sons-construction\", \"quote_amount\": 19800.0, \"quote_date\": \"2026-03-02\", \"status\": \"Rejected\", \"valid_until\": \"2026-04-02\"} },\n { key: \"quote-2100-0\", values: {\"room\": \"room-garage\", \"contractor\": \"contractor-clearcoat-painting\", \"quote_amount\": 2100.0, \"quote_date\": \"2026-01-15\", \"status\": \"Expired\", \"valid_until\": \"2026-02-15\"} },\n ],\n },\n {\n token: \"purchases\",\n name: \"Purchases\",\n labelSingular: \"Purchase\",\n labelPlural: \"Purchases\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"receipt\",\n titleField: \"item_description\",\n describes: \"Every pound spent against the project, so the budget is a fact rather than a feeling.\",\n fields: [\n { key: \"room\", label: \"Room\", parityType: \"relation\", required: true, relationTarget: \"rooms\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"item_description\", label: \"What was bought\", parityType: \"text\", required: true, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"vendor\", label: \"Vendor\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"purchase_date\", label: \"Bought on\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"amount\", label: \"Amount\", parityType: \"currency\", unit: \"USD\", format: \"currency\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"category\", label: \"Category\", parityType: \"select\", choices: [\"Materials\", \"Fixtures\", \"Labor\", \"Permits\", \"Appliances\", \"Design/Design Fees\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"receipt_number\", label: \"Receipt\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"purchase-custom-shaker-cabinets-painted-alabaster\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Custom shaker cabinets, painted 'Alabaster'\", \"vendor\": \"Millbrook Cabinetry Supply\", \"purchase_date\": \"2026-04-05\", \"amount\": 14200.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10021\"} },\n { key: \"purchase-quartz-countertop-calacatta-gold-42-sq-ft\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Quartz countertop, 'Calacatta Gold' 42 sq ft\", \"vendor\": \"Stone Depot\", \"purchase_date\": \"2026-04-18\", \"amount\": 5900.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10022\"} },\n { key: \"purchase-range-refrigerator-dishwasher-package\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Range, refrigerator, dishwasher package\", \"vendor\": \"Coldstream Appliance Center\", \"purchase_date\": \"2026-04-22\", \"amount\": 8700.0, \"category\": \"Appliances\", \"receipt_number\": \"RCT-10023\"} },\n { key: \"purchase-building-permit-kitchen-remodel\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Building permit — kitchen remodel\", \"vendor\": \"City of Fairmont Permits Office\", \"purchase_date\": \"2026-03-28\", \"amount\": 450.0, \"category\": \"Permits\", \"receipt_number\": \"RCT-10024\"} },\n { key: \"purchase-ferro-sons-final-labor-invoice\", values: {\"room\": \"room-kitchen\", \"item_description\": \"Ferro & Sons — final labor invoice\", \"vendor\": \"Ferro & Sons Construction\", \"purchase_date\": \"2026-06-15\", \"amount\": 15800.0, \"category\": \"Labor\", \"receipt_number\": \"RCT-10025\"} },\n { key: \"purchase-walk-in-shower-kit-with-frameless-glass\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Walk-in shower kit with frameless glass\", \"vendor\": \"Stone Depot\", \"purchase_date\": \"2026-06-25\", \"amount\": 4300.0, \"category\": \"Fixtures\", \"receipt_number\": \"RCT-10026\"} },\n { key: \"purchase-heated-floor-mat-system-45-sq-ft\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Heated floor mat system, 45 sq ft\", \"vendor\": \"WarmFloor Direct\", \"purchase_date\": \"2026-06-28\", \"amount\": 1650.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10027\"} },\n { key: \"purchase-floating-double-vanity-60-inch\", values: {\"room\": \"room-primary-bathroom\", \"item_description\": \"Floating double vanity, 60 inch\", \"vendor\": \"Millbrook Cabinetry Supply\", \"purchase_date\": \"2026-07-02\", \"amount\": 2200.0, \"category\": \"Fixtures\", \"receipt_number\": \"RCT-10028\"} },\n { key: \"purchase-composite-decking-600-sq-ft-weathered-teak\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Composite decking, 600 sq ft, 'Weathered Teak'\", \"vendor\": \"Deckmaster Supply\", \"purchase_date\": \"2026-05-05\", \"amount\": 8900.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10029\"} },\n { key: \"purchase-cedar-pergola-kit-12x14\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Cedar pergola kit, 12x14\", \"vendor\": \"Deckmaster Supply\", \"purchase_date\": \"2026-05-08\", \"amount\": 3200.0, \"category\": \"Materials\", \"receipt_number\": \"RCT-10030\"} },\n { key: \"purchase-millbrook-carpentry-labor-and-install\", values: {\"room\": \"room-backyard-deck\", \"item_description\": \"Millbrook Carpentry — labor and install\", \"vendor\": \"Millbrook Carpentry\", \"purchase_date\": \"2026-06-01\", \"amount\": 4900.0, \"category\": \"Labor\", \"receipt_number\": \"RCT-10031\"} },\n { key: \"purchase-design-consultation-fixture-layout\", values: {\"room\": \"room-guest-bathroom\", \"item_description\": \"Design consultation — fixture layout\", \"vendor\": \"Bianca Moretti Interiors\", \"purchase_date\": \"2026-07-30\", \"amount\": 350.0, \"category\": \"Design/Design Fees\", \"receipt_number\": \"RCT-10032\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A quote is for exactly one room, and it is meaningless once that room is out of scope.\",\n fromTable: \"quotes\",\n fromField: \"room\",\n toTable: \"rooms\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"quotes\",\n },\n {\n describes: \"A quote comes from one contractor, who goes on existing after the quote is rejected.\",\n fromTable: \"quotes\",\n fromField: \"contractor\",\n toTable: \"contractors\",\n flavor: \"referenced\",\n cardinality: \"one\",\n onDelete: \"restrict\",\n inverseKey: \"quotes_given\",\n },\n {\n describes: \"A purchase is charged against the room it was bought for, which is how the budget stays honest.\",\n fromTable: \"purchases\",\n fromField: \"room\",\n toTable: \"rooms\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"purchases\",\n },\n ],\n\n form: {\n token: \"birchwood_contractor_details\",\n name: \"Contractor details and insurance\",\n describes:\n \"What a trade fills in before they are allowed to quote. It asks for the licence number and the insurance because those are the two things nobody can produce after something goes wrong.\",\n audience: \"public\",\n table: \"contractors\",\n fields: [\n { fieldKey: \"company_name\", label: \"Company name\", required: true },\n { fieldKey: \"trade\", label: \"Trade\", required: true },\n { fieldKey: \"contact_name\", label: \"Who should I ask for?\", required: true },\n { fieldKey: \"phone\", label: \"Best number\", required: true },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"license_number\", label: \"Licence number\", required: true, help: \"I check this with the state board before accepting a quote.\" },\n { fieldKey: \"insured\", label: \"Do you carry liability insurance?\", required: true, help: \"I will ask for the certificate before work starts.\" },\n ],\n submitLabel: \"Send my details\",\n confirmation:\n \"Thank you. I will check the licence and come back to you about which rooms I would like quoted, usually within a few days.\",\n },\n\n pipeline: {\n token: \"birchwood_room_progress\",\n name: \"Room by room\",\n describes:\n \"Where each room stands. The board exists because a whole-house renovation is really five small projects at different stages, and the only way to stay sane is to look at them side by side.\",\n table: \"rooms\",\n stageField: \"status\",\n stages: [\n { key: \"Planning\", label: \"Planning\", describes: \"Scope is still being decided. Nothing has been priced, so the budget figure is a guess.\", typicalDurationDays: 21 },\n { key: \"Quoting\", label: \"Quoting\", describes: \"Trades are pricing it. Leaves when a quote is accepted — or when every quote comes back over budget and the scope goes back to Planning.\", typicalDurationDays: 21 },\n { key: \"In Progress\", label: \"In progress\", describes: \"Work has started and receipts are landing against this room. This is where the budget is actually won or lost.\", typicalDurationDays: 45 },\n { key: \"On Hold\", label: \"On hold\", describes: \"Stopped for money, a permit or a lead time. Named honestly so it is not mistaken for progress.\", typicalDurationDays: 30 },\n { key: \"Complete\", label: \"Complete\", describes: \"Finished, paid and signed off. The room's spend is final and can be compared against what was budgeted.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"What have I actually spent on each room so far?\",\n whyItMatters:\n \"The budget was set room by room, so the only useful comparison is room by room. This is the number that decides whether the next room starts on schedule or waits, and it is the one thing a spreadsheet stops being trusted for once there are more than about thirty receipts.\",\n table: \"purchases\",\n aggregate: \"sum\",\n of: \"amount\",\n groupBy: \"room\",\n answerUnit: \"USD\",\n },\n\n documentTemplate: {\n token: \"birchwood_quote_acceptance\",\n name: \"Quote acceptance\",\n describes:\n \"Sent to a contractor when their price is accepted. It restates the number, the room and the date the quote was given, because a renovation dispute is almost always about which version of the price was agreed.\",\n table: \"quotes\",\n title: \"Accepting your quote of {{amount}}\",\n body: [\n \"Thank you for quoting.\",\n \"\",\n \"I am accepting your price of {{amount}}, quoted on {{quoted_on}} and valid until {{valid_until}}, for the work we discussed.\",\n \"\",\n \"Before anything starts I will need a copy of your certificate of insurance. Materials I have bought myself are already on site; anything else is yours to supply and appears on your invoice, not on my receipts.\",\n \"\",\n \"If the scope changes once the wall is open — and on a house this age it usually does — please price the change and send it to me before carrying it out. I would rather approve a second number than argue about a bigger one later.\",\n \"\",\n \"{{project}}\",\n \"{{project_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"amount\", from: \"quote_amount\", describes: \"The accepted price, restated so there is one version of it.\" },\n { key: \"quoted_on\", from: \"quote_date\", describes: \"Which quote this is, when a trade has given several.\" },\n { key: \"valid_until\", from: \"valid_until\", describes: \"The date the price was good until.\" },\n { key: \"project\", from: \"business\", describes: \"The project name.\" },\n { key: \"project_phone\", from: \"business\", describes: \"The number to call back on.\" },\n { key: \"today\", from: \"today\", describes: \"The date of acceptance.\" },\n ],\n },\n\n notificationRule: {\n token: \"birchwood_quote_expiring\",\n name: \"A quote is about to expire\",\n describes:\n \"Quotes are good for thirty days and a renovation moves slower than that, so the default outcome is re-pricing everything at a worse number. A week's warning is what prevents it, and it is the first thing any homeowner would automate.\",\n when: {\n table: \"quotes\",\n event: \"due\",\n field: \"valid_until\",\n daysBefore: 7,\n },\n audience: \"the homeowner\",\n channel: \"email\",\n message:\n \"The quote of {{quote_amount}} expires on {{valid_until}} — about a week from now. Accept it, or ask for it to be held, before it has to be re-priced.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/harbor-dental-new-patient-intake.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Renata Okonkwo runs the front desk at Harbor Dental Group, a\n// six-chair family dental practice, and she uses this to take a new patient\n// from the first phone call through forms, insurance verification and a booked\n// first visit without anything falling between the cracks.\n//\n// Every person, address, phone number, mailbox and member id below is invented.\n// Nothing here is copied from a real patient, a real practice or a real inbox.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"harbor-dental-new-patient-intake\",\n useCase:\n \"Renata Okonkwo runs the front desk at Harbor Dental Group, a six-chair family dental practice, and she uses this to take a new patient from the first phone call through forms, insurance verification and a booked first visit without anything falling between the cracks.\",\n industry: \"Dentistry\",\n cleanupTag: \"use-case:harbor-dental-new-patient-intake\",\n\n business: {\n name: \"Harbor Dental Group\",\n legalName: \"Harbor Dental Group, PLLC\",\n describes: \"A six-chair family dental practice doing general dentistry, hygiene and same-day crowns.\",\n address: {\n line1: \"1840 Waterfront Parkway\",\n line2: \"Suite 210\",\n city: \"Bellingham\",\n region: \"WA\",\n postalCode: \"98225\",\n country: \"US\",\n },\n phone: \"+1 360 555 0142\",\n website: \"https://harbordentalgroup.com\",\n email: \"frontdesk@harbordentalgroup.com\",\n timezone: \"America/Los_Angeles\",\n },\n\n tables: [\n {\n token: \"patient\",\n name: \"Patients\",\n labelSingular: \"Patient\",\n labelPlural: \"Patients\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"user-round\",\n titleField: \"full_name\",\n describes: \"Everyone the practice treats, from the first enquiry through to an active chart.\",\n fields: [\n {\n key: \"full_name\",\n label: \"Patient name\",\n parityType: \"text\",\n required: true,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"chart_number\",\n label: \"Chart number\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n help: \"Assigned when the chart is opened. Printed on every claim and referral.\",\n },\n {\n key: \"date_of_birth\",\n label: \"Date of birth\",\n parityType: \"datetime\",\n format: \"date\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n help: \"Carriers verify eligibility on name plus date of birth, so it has to be exact.\",\n },\n {\n key: \"phone\",\n label: \"Mobile phone\",\n parityType: \"phone\",\n format: \"phone\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"email\",\n label: \"Email\",\n parityType: \"email\",\n format: \"email\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"street\",\n label: \"Street address\",\n parityType: \"text\",\n sensitivity: \"confidential\",\n contextPolicy: \"exclude\",\n },\n {\n key: \"city\",\n label: \"City\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"region\",\n label: \"State\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"postal_code\",\n label: \"ZIP\",\n parityType: \"text\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"intake_stage\",\n label: \"Intake stage\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Enquiry\",\n \"Forms sent\",\n \"Forms received\",\n \"Insurance verified\",\n \"First visit booked\",\n \"Active patient\",\n ],\n help: \"Where this person is between the first call and a chart the hygienist can work from.\",\n },\n {\n key: \"insurance_carrier\",\n label: \"Insurance carrier\",\n parityType: \"select\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\"Delta Dental\", \"Cigna Dental\", \"MetLife\", \"Guardian\", \"Aetna\", \"Self-pay\"],\n },\n {\n key: \"member_id\",\n label: \"Member ID\",\n parityType: \"text\",\n sensitivity: \"restricted\",\n contextPolicy: \"exclude\",\n help: \"Never leaves the practice. Needed to verify eligibility before the first visit.\",\n },\n {\n key: \"primary_dentist\",\n label: \"Primary dentist\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Dr. Alina Reyes\", \"Dr. Marcus Webb\"],\n },\n {\n key: \"allergies\",\n label: \"Known allergies\",\n parityType: \"multi_select\",\n multi: true,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\n \"Penicillin\",\n \"Latex\",\n \"Codeine\",\n \"Sulfa drugs\",\n \"Local anaesthetic\",\n \"None reported\",\n ],\n help: \"Read out loud at chairside before any injection.\",\n },\n {\n key: \"balance_due\",\n label: \"Balance due\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"referred_by\",\n label: \"How they found us\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Existing patient referral\",\n \"Insurance directory\",\n \"Web search\",\n \"Walk-in\",\n \"Employer benefits fair\",\n ],\n },\n {\n key: \"front_desk_notes\",\n label: \"Front desk notes\",\n parityType: \"long_text\",\n sensitivity: \"confidential\",\n contextPolicy: \"on_request\",\n },\n ],\n rows: [\n {\n key: \"patient-rivera-marisol\",\n values: {\n full_name: \"Marisol Rivera\",\n chart_number: \"HD-10428\",\n date_of_birth: \"1988-03-17\",\n phone: \"+1 360 555 0184\",\n email: \"m.rivera@northshoremail.com\",\n street: \"4417 Chuckanut Ridge Road\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-884201773\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Penicillin\"],\n balance_due: 0,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Prefers early morning. Two children also seen here.\",\n },\n },\n {\n key: \"patient-oyelaran-tunde\",\n values: {\n full_name: \"Tunde Oyelaran\",\n chart_number: \"HD-10431\",\n date_of_birth: \"1975-11-02\",\n phone: \"+1 360 555 0219\",\n email: \"toyelaran@baysidedesignco.com\",\n street: \"902 Eldridge Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4471209\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 142.5,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Travels for work; wants visits batched into one afternoon.\",\n },\n },\n {\n key: \"patient-halvorsen-britt\",\n values: {\n full_name: \"Britt Halvorsen\",\n chart_number: \"HD-10455\",\n date_of_birth: \"1992-07-26\",\n phone: \"+1 360 555 0177\",\n email: \"britt.halvorsen@cascadiaoutfitters.com\",\n street: \"215 Harris Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"First visit booked\",\n insurance_carrier: \"MetLife\",\n member_id: \"ML-63902118\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Latex\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Latex allergy flagged to the back office; nitrile only.\",\n },\n },\n {\n key: \"patient-nakamura-kenji\",\n values: {\n full_name: \"Kenji Nakamura\",\n chart_number: \"HD-10460\",\n date_of_birth: \"1964-01-09\",\n phone: \"+1 360 555 0263\",\n email: \"k.nakamura@harborviewcpa.com\",\n street: \"1130 Yew Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Insurance verified\",\n insurance_carrier: \"Guardian\",\n member_id: \"GD-20117744\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Codeine\"],\n balance_due: 0,\n referred_by: \"Employer benefits fair\",\n front_desk_notes: \"Eligibility confirmed through December. Waiting on his schedule to book.\",\n },\n },\n {\n key: \"patient-abadi-leila\",\n values: {\n full_name: \"Leila Abadi\",\n chart_number: \"HD-10462\",\n date_of_birth: \"1997-05-30\",\n phone: \"+1 360 555 0308\",\n email: \"leila.abadi@westwindstudio.com\",\n street: \"77 Fairhaven Parkway\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Forms received\",\n insurance_carrier: \"Aetna\",\n member_id: \"AE-55823094\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Forms in. Needs eligibility checked before we offer a slot.\",\n },\n },\n {\n key: \"patient-delacroix-yvon\",\n values: {\n full_name: \"Yvon Delacroix\",\n chart_number: \"HD-10466\",\n date_of_birth: \"1981-09-14\",\n phone: \"+1 360 555 0341\",\n email: \"yvon.delacroix@pugetsoundfreight.com\",\n street: \"3320 Northwest Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Forms sent\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-884977120\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Packet emailed Tuesday. Follow up if nothing back by Friday.\",\n },\n },\n {\n key: \"patient-strand-ingrid\",\n values: {\n full_name: \"Ingrid Strand\",\n chart_number: \"HD-10470\",\n date_of_birth: \"1955-12-04\",\n phone: \"+1 360 555 0392\",\n email: \"ingrid.strand@northshoremail.com\",\n street: \"618 Alabama Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Self-pay\",\n member_id: \"\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"Sulfa drugs\", \"Local anaesthetic\"],\n balance_due: 880,\n referred_by: \"Walk-in\",\n front_desk_notes: \"On a payment plan for the crown. Anaesthetic sensitivity — Dr. Reyes is aware.\",\n },\n },\n {\n key: \"patient-mbeki-sipho\",\n values: {\n full_name: \"Sipho Mbeki\",\n chart_number: \"HD-10473\",\n date_of_birth: \"2001-02-21\",\n phone: \"+1 360 555 0415\",\n email: \"sipho.mbeki@wwu-alumni.com\",\n street: \"1502 Indian Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Enquiry\",\n insurance_carrier: \"Self-pay\",\n member_id: \"\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Called about a chipped incisor. Quoted the emergency exam fee.\",\n },\n },\n {\n key: \"patient-kowalczyk-agata\",\n values: {\n full_name: \"Agata Kowalczyk\",\n chart_number: \"HD-10477\",\n date_of_birth: \"1986-06-11\",\n phone: \"+1 360 555 0448\",\n email: \"a.kowalczyk@evergreenlabsupply.com\",\n street: \"2245 Cornwall Avenue\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4488317\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 64,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Night guard impressions taken; lab case out.\",\n },\n },\n {\n key: \"patient-ferreira-joao\",\n values: {\n full_name: \"João Ferreira\",\n chart_number: \"HD-10481\",\n date_of_birth: \"1970-08-19\",\n phone: \"+1 360 555 0472\",\n email: \"joao.ferreira@harborlinemarine.com\",\n street: \"840 Marine Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Insurance verified\",\n insurance_carrier: \"MetLife\",\n member_id: \"ML-63988402\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Penicillin\", \"Latex\"],\n balance_due: 0,\n referred_by: \"Employer benefits fair\",\n front_desk_notes: \"Two allergies on file. Wants the first available Thursday.\",\n },\n },\n {\n key: \"patient-whitehorse-dara\",\n values: {\n full_name: \"Dara Whitehorse\",\n chart_number: \"HD-10484\",\n date_of_birth: \"1994-04-07\",\n phone: \"+1 360 555 0501\",\n email: \"dara.whitehorse@salishseaarts.com\",\n street: \"506 Girard Street\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"First visit booked\",\n insurance_carrier: \"Guardian\",\n member_id: \"GD-20166018\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Web search\",\n front_desk_notes: \"Booked for the new patient exam and a cleaning back to back.\",\n },\n },\n {\n key: \"patient-oconnell-brigid\",\n values: {\n full_name: \"Brigid O'Connell\",\n chart_number: \"HD-10489\",\n date_of_birth: \"1959-10-23\",\n phone: \"+1 360 555 0533\",\n email: \"brigid.oconnell@northshoremail.com\",\n street: \"3901 Sunset Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Active patient\",\n insurance_carrier: \"Delta Dental\",\n member_id: \"DD-885013366\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"Codeine\"],\n balance_due: 310.75,\n referred_by: \"Existing patient referral\",\n front_desk_notes: \"Crown seat next month. Balance is the patient portion from the last claim.\",\n },\n },\n {\n key: \"patient-tran-hieu\",\n values: {\n full_name: \"Hieu Tran\",\n chart_number: \"HD-10492\",\n date_of_birth: \"1990-12-15\",\n phone: \"+1 360 555 0566\",\n email: \"hieu.tran@baysidedesignco.com\",\n street: \"1215 Lakeway Drive\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98229\",\n intake_stage: \"Forms received\",\n insurance_carrier: \"Aetna\",\n member_id: \"AE-55901287\",\n primary_dentist: \"Dr. Alina Reyes\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Insurance directory\",\n front_desk_notes: \"Medical history mentions a heart murmur — confirm premedication with Dr. Reyes.\",\n },\n },\n {\n key: \"patient-bergstrom-annika\",\n values: {\n full_name: \"Annika Bergström\",\n chart_number: \"HD-10496\",\n date_of_birth: \"1983-02-08\",\n phone: \"+1 360 555 0590\",\n email: \"annika.bergstrom@cascadiaoutfitters.com\",\n street: \"705 Samish Way\",\n city: \"Bellingham\",\n region: \"WA\",\n postal_code: \"98225\",\n intake_stage: \"Enquiry\",\n insurance_carrier: \"Cigna Dental\",\n member_id: \"CG-4491550\",\n primary_dentist: \"Dr. Marcus Webb\",\n allergies: [\"None reported\"],\n balance_due: 0,\n referred_by: \"Walk-in\",\n front_desk_notes: \"Came in over lunch asking about whitening. Packet not sent yet.\",\n },\n },\n ],\n },\n\n {\n token: \"visit\",\n name: \"Visits\",\n labelSingular: \"Visit\",\n labelPlural: \"Visits\",\n type: \"entity\",\n display: \"calendar\",\n weight: \"heavy\",\n ordered: true,\n icon: \"calendar-clock\",\n titleField: \"summary\",\n describes: \"Every booked chair appointment, what it is for, who is in the chair and who is treating.\",\n fields: [\n {\n key: \"summary\",\n label: \"Appointment\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"patient\",\n label: \"Patient\",\n parityType: \"relation\",\n required: true,\n relationTarget: \"patient\",\n relationMax: 1,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"appointment_at\",\n label: \"Date and time\",\n parityType: \"datetime\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"duration_minutes\",\n label: \"Chair time\",\n parityType: \"integer\",\n unit: \"min\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"procedure\",\n label: \"Procedure\",\n parityType: \"select\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n choices: [\n \"New patient exam\",\n \"Adult prophylaxis\",\n \"Child prophylaxis\",\n \"Composite filling\",\n \"Crown preparation\",\n \"Crown seat\",\n \"Root canal\",\n \"Extraction\",\n \"Emergency exam\",\n ],\n },\n {\n key: \"provider\",\n label: \"Provider\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\n \"Dr. Alina Reyes\",\n \"Dr. Marcus Webb\",\n \"Priya Chandra, RDH\",\n \"Tomas Lindgren, RDH\",\n ],\n },\n {\n key: \"operatory\",\n label: \"Operatory\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Op A\", \"Op B\", \"Op C\", \"Op D\", \"Op E\", \"Op F\"],\n },\n {\n key: \"visit_status\",\n label: \"Status\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Scheduled\", \"Confirmed\", \"Checked in\", \"Completed\", \"No-show\", \"Cancelled\"],\n },\n {\n key: \"fee\",\n label: \"Fee\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n ],\n rows: [\n {\n key: \"visit-rivera-prophy-sep\",\n values: {\n summary: \"Adult cleaning — M. Rivera\",\n patient: \"patient-rivera-marisol\",\n appointment_at: \"2026-09-08T08:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Completed\",\n fee: 138,\n },\n },\n {\n key: \"visit-oyelaran-crown-prep\",\n values: {\n summary: \"Crown prep, lower right — T. Oyelaran\",\n patient: \"patient-oyelaran-tunde\",\n appointment_at: \"2026-09-10T13:30:00-07:00\",\n duration_minutes: 90,\n procedure: \"Crown preparation\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Completed\",\n fee: 1240,\n },\n },\n {\n key: \"visit-strand-crown-seat\",\n values: {\n summary: \"Crown seat — I. Strand\",\n patient: \"patient-strand-ingrid\",\n appointment_at: \"2026-09-14T10:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"Crown seat\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Completed\",\n fee: 880,\n },\n },\n {\n key: \"visit-kowalczyk-prophy\",\n values: {\n summary: \"Adult cleaning — A. Kowalczyk\",\n patient: \"patient-kowalczyk-agata\",\n appointment_at: \"2026-09-15T09:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Completed\",\n fee: 138,\n },\n },\n {\n key: \"visit-oconnell-filling\",\n values: {\n summary: \"Composite filling, upper left — B. O'Connell\",\n patient: \"patient-oconnell-brigid\",\n appointment_at: \"2026-09-16T14:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"Composite filling\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Completed\",\n fee: 412,\n },\n },\n {\n key: \"visit-mbeki-emergency\",\n values: {\n summary: \"Emergency exam, chipped incisor — S. Mbeki\",\n patient: \"patient-mbeki-sipho\",\n appointment_at: \"2026-09-17T16:30:00-07:00\",\n duration_minutes: 30,\n procedure: \"Emergency exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op E\",\n visit_status: \"No-show\",\n fee: 95,\n },\n },\n {\n key: \"visit-rivera-filling\",\n values: {\n summary: \"Composite filling, lower left — M. Rivera\",\n patient: \"patient-rivera-marisol\",\n appointment_at: \"2026-09-18T08:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"Composite filling\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Completed\",\n fee: 386,\n },\n },\n {\n key: \"visit-halvorsen-new-patient\",\n values: {\n summary: \"New patient exam — B. Halvorsen\",\n patient: \"patient-halvorsen-britt\",\n appointment_at: \"2026-09-23T09:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Confirmed\",\n fee: 215,\n },\n },\n {\n key: \"visit-halvorsen-prophy\",\n values: {\n summary: \"Adult cleaning — B. Halvorsen\",\n patient: \"patient-halvorsen-britt\",\n appointment_at: \"2026-09-23T10:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Confirmed\",\n fee: 138,\n },\n },\n {\n key: \"visit-whitehorse-new-patient\",\n values: {\n summary: \"New patient exam — D. Whitehorse\",\n patient: \"patient-whitehorse-dara\",\n appointment_at: \"2026-09-24T11:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Alina Reyes\",\n operatory: \"Op A\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-whitehorse-prophy\",\n values: {\n summary: \"Adult cleaning — D. Whitehorse\",\n patient: \"patient-whitehorse-dara\",\n appointment_at: \"2026-09-24T12:00:00-07:00\",\n duration_minutes: 50,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Scheduled\",\n fee: 138,\n },\n },\n {\n key: \"visit-oconnell-crown-seat\",\n values: {\n summary: \"Crown seat — B. O'Connell\",\n patient: \"patient-oconnell-brigid\",\n appointment_at: \"2026-10-06T14:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"Crown seat\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Scheduled\",\n fee: 1180,\n },\n },\n {\n key: \"visit-ferreira-new-patient\",\n values: {\n summary: \"New patient exam — J. Ferreira\",\n patient: \"patient-ferreira-joao\",\n appointment_at: \"2026-10-08T15:00:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op E\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-nakamura-new-patient\",\n values: {\n summary: \"New patient exam — K. Nakamura\",\n patient: \"patient-nakamura-kenji\",\n appointment_at: \"2026-10-09T08:30:00-07:00\",\n duration_minutes: 60,\n procedure: \"New patient exam\",\n provider: \"Dr. Marcus Webb\",\n operatory: \"Op D\",\n visit_status: \"Scheduled\",\n fee: 215,\n },\n },\n {\n key: \"visit-tran-child-prophy\",\n values: {\n summary: \"Child cleaning — H. Tran, daughter\",\n patient: \"patient-tran-hieu\",\n appointment_at: \"2026-10-13T16:00:00-07:00\",\n duration_minutes: 40,\n procedure: \"Child prophylaxis\",\n provider: \"Priya Chandra, RDH\",\n operatory: \"Op B\",\n visit_status: \"Scheduled\",\n fee: 112,\n },\n },\n {\n key: \"visit-kowalczyk-cancelled\",\n values: {\n summary: \"Night guard delivery — A. Kowalczyk\",\n patient: \"patient-kowalczyk-agata\",\n appointment_at: \"2026-09-19T11:30:00-07:00\",\n duration_minutes: 30,\n procedure: \"Adult prophylaxis\",\n provider: \"Tomas Lindgren, RDH\",\n operatory: \"Op C\",\n visit_status: \"Cancelled\",\n fee: 0,\n },\n },\n ],\n },\n\n {\n token: \"insurance_claim\",\n name: \"Insurance claims\",\n labelSingular: \"Claim\",\n labelPlural: \"Claims\",\n type: \"ledger\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"file-text\",\n titleField: \"claim_number\",\n describes: \"What was billed to a carrier for a completed visit, and what came back.\",\n fields: [\n {\n key: \"claim_number\",\n label: \"Claim number\",\n parityType: \"text\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"visit\",\n label: \"Visit\",\n parityType: \"relation\",\n required: true,\n relationTarget: \"visit\",\n relationMax: 1,\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"carrier\",\n label: \"Carrier\",\n parityType: \"select\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Delta Dental\", \"Cigna Dental\", \"MetLife\", \"Guardian\", \"Aetna\"],\n },\n {\n key: \"submitted_on\",\n label: \"Submitted\",\n parityType: \"datetime\",\n format: \"date\",\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n },\n {\n key: \"billed_amount\",\n label: \"Billed\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"allowed_amount\",\n label: \"Carrier allowed\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"patient_portion\",\n label: \"Patient portion\",\n parityType: \"currency\",\n unit: \"USD\",\n format: \"currency\",\n sensitivity: \"confidential\",\n contextPolicy: \"summarize\",\n },\n {\n key: \"claim_status\",\n label: \"Claim status\",\n parityType: \"select\",\n required: true,\n sensitivity: \"internal\",\n contextPolicy: \"include\",\n choices: [\"Prepared\", \"Submitted\", \"In review\", \"Paid\", \"Denied\", \"Appealed\"],\n },\n ],\n rows: [\n {\n key: \"claim-rivera-prophy\",\n values: {\n claim_number: \"HD-CLM-24118\",\n visit: \"visit-rivera-prophy-sep\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-09\",\n billed_amount: 138,\n allowed_amount: 138,\n patient_portion: 0,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-oyelaran-crown-prep\",\n values: {\n claim_number: \"HD-CLM-24123\",\n visit: \"visit-oyelaran-crown-prep\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-11\",\n billed_amount: 1240,\n allowed_amount: 1097.5,\n patient_portion: 142.5,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-kowalczyk-prophy\",\n values: {\n claim_number: \"HD-CLM-24131\",\n visit: \"visit-kowalczyk-prophy\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-16\",\n billed_amount: 138,\n allowed_amount: 74,\n patient_portion: 64,\n claim_status: \"Paid\",\n },\n },\n {\n key: \"claim-oconnell-filling\",\n values: {\n claim_number: \"HD-CLM-24136\",\n visit: \"visit-oconnell-filling\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-17\",\n billed_amount: 412,\n allowed_amount: 310.75,\n patient_portion: 310.75,\n claim_status: \"In review\",\n },\n },\n {\n key: \"claim-rivera-filling\",\n values: {\n claim_number: \"HD-CLM-24140\",\n visit: \"visit-rivera-filling\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-19\",\n billed_amount: 386,\n allowed_amount: 386,\n patient_portion: 0,\n claim_status: \"Submitted\",\n },\n },\n {\n key: \"claim-strand-crown-seat\",\n values: {\n claim_number: \"HD-CLM-24127\",\n visit: \"visit-strand-crown-seat\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-15\",\n billed_amount: 880,\n allowed_amount: 0,\n patient_portion: 880,\n claim_status: \"Denied\",\n },\n },\n {\n key: \"claim-oyelaran-resubmit\",\n values: {\n claim_number: \"HD-CLM-24144\",\n visit: \"visit-oyelaran-crown-prep\",\n carrier: \"Cigna Dental\",\n submitted_on: \"2026-09-20\",\n billed_amount: 142.5,\n allowed_amount: 0,\n patient_portion: 142.5,\n claim_status: \"Appealed\",\n },\n },\n {\n key: \"claim-oconnell-crown-predetermination\",\n values: {\n claim_number: \"HD-CLM-24149\",\n visit: \"visit-oconnell-crown-seat\",\n carrier: \"Delta Dental\",\n submitted_on: \"2026-09-21\",\n billed_amount: 1180,\n allowed_amount: 0,\n patient_portion: 0,\n claim_status: \"Prepared\",\n },\n },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A visit belongs to the patient who sits in the chair, and it dies with their chart.\",\n fromTable: \"visit\",\n fromField: \"patient\",\n toTable: \"patient\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"visits\",\n },\n {\n describes: \"A claim bills exactly one completed visit, and it cannot outlive the visit it bills.\",\n fromTable: \"insurance_claim\",\n fromField: \"visit\",\n toTable: \"visit\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"claims\",\n },\n ],\n\n form: {\n token: \"harbor_dental_new_patient_intake\",\n name: \"Harbor Dental new-patient intake\",\n describes:\n \"The packet the front desk emails after the first call. The patient fills it in before they arrive so the hygienist is not taking a medical history in the chair.\",\n audience: \"public\",\n table: \"patient\",\n fields: [\n { fieldKey: \"full_name\", label: \"Your full legal name\", required: true, help: \"As it appears on your insurance card.\" },\n { fieldKey: \"date_of_birth\", label: \"Date of birth\", required: true },\n { fieldKey: \"phone\", label: \"Mobile number\", required: true, help: \"We text appointment reminders to this number.\" },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"street\", label: \"Street address\", required: true },\n { fieldKey: \"city\", label: \"City\", required: true },\n { fieldKey: \"region\", label: \"State\", required: true },\n { fieldKey: \"postal_code\", label: \"ZIP\", required: true },\n { fieldKey: \"insurance_carrier\", label: \"Dental insurance carrier\", help: \"Choose Self-pay if you do not have dental coverage.\" },\n { fieldKey: \"member_id\", label: \"Member ID\", help: \"On the front of your card. We use it to check your benefits before your visit.\" },\n { fieldKey: \"allergies\", label: \"Any known allergies\", help: \"Select all that apply. We read this out before any injection.\" },\n { fieldKey: \"referred_by\", label: \"How did you hear about us?\" },\n ],\n submitLabel: \"Send my intake form\",\n confirmation:\n \"Thank you — we have your forms. We will check your benefits with your carrier and call you within two business days to find a first appointment that works.\",\n },\n\n pipeline: {\n token: \"harbor_dental_intake_pipeline\",\n name: \"New-patient intake\",\n describes:\n \"The six steps between a stranger calling and a chart the hygienist can work from. Renata works this board every morning.\",\n table: \"patient\",\n stageField: \"intake_stage\",\n stages: [\n {\n key: \"Enquiry\",\n label: \"Enquiry\",\n describes: \"They called or walked in. Nothing has been sent yet. Moves on when the intake packet goes out.\",\n typicalDurationDays: 1,\n },\n {\n key: \"Forms sent\",\n label: \"Forms sent\",\n describes: \"The packet is with them. Chase at three days; most people fill it in the evening they get it.\",\n typicalDurationDays: 3,\n },\n {\n key: \"Forms received\",\n label: \"Forms received\",\n describes: \"Medical history is in. Anything flagged goes to the treating dentist before we book.\",\n typicalDurationDays: 1,\n },\n {\n key: \"Insurance verified\",\n label: \"Insurance verified\",\n describes: \"Eligibility and remaining annual maximum confirmed with the carrier, so nobody is surprised by a bill.\",\n typicalDurationDays: 2,\n },\n {\n key: \"First visit booked\",\n label: \"First visit booked\",\n describes: \"Exam and cleaning are on the schedule and confirmed. Moves on the day they are seen.\",\n typicalDurationDays: 14,\n },\n {\n key: \"Active patient\",\n label: \"Active patient\",\n describes: \"Seen at least once and on recall. They leave this stage only if they transfer out.\",\n },\n ],\n },\n\n dashboardQuestion: {\n question: \"How many people have sent their forms back but still are not on the schedule?\",\n whyItMatters:\n \"Everyone sitting between 'Forms received' and 'First visit booked' is someone who already chose us and is quietly going cold. If the number climbs above about six, Renata blocks an hour to call them before the week gets away.\",\n table: \"patient\",\n aggregate: \"count\",\n groupBy: \"intake_stage\",\n filter: \"intake_stage is 'Forms received' or 'Insurance verified'\",\n answerUnit: \"patients\",\n },\n\n documentTemplate: {\n token: \"harbor_dental_welcome_letter\",\n name: \"New patient welcome letter\",\n describes:\n \"Goes out the moment a first visit is booked. It confirms who they will see, what to bring and what the first appointment actually involves, which is the single biggest reason people no-show.\",\n table: \"patient\",\n title: \"Welcome to {{practice_name}}, {{patient_name}}\",\n body: [\n \"Dear {{patient_name}},\",\n \"\",\n \"Thank you for choosing {{practice_name}}. Your chart is open under number {{chart_number}} and you will be seeing {{dentist}}.\",\n \"\",\n \"Your first appointment is a full examination with digital x-rays, followed by a cleaning with one of our hygienists. Together they take about two hours, so please allow for that.\",\n \"\",\n \"Please bring a photo ID and your {{carrier}} card. We have already checked your benefits, so we can tell you what is covered before any work is agreed — we do not start treatment you have not said yes to.\",\n \"\",\n \"If anything about your health has changed since you filled in your forms, tell the front desk when you arrive. It matters more than people expect.\",\n \"\",\n \"We look forward to meeting you.\",\n \"\",\n \"{{practice_name}}\",\n \"{{practice_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"patient_name\", from: \"full_name\", describes: \"How we address them in the letter.\" },\n { key: \"chart_number\", from: \"chart_number\", describes: \"So the letter and the chart agree if they call about it.\" },\n { key: \"dentist\", from: \"primary_dentist\", describes: \"The dentist they are assigned to.\" },\n { key: \"carrier\", from: \"insurance_carrier\", describes: \"Tells them which card to bring.\" },\n { key: \"practice_name\", from: \"business\", describes: \"The practice name.\" },\n { key: \"practice_phone\", from: \"business\", describes: \"The front desk number.\" },\n { key: \"today\", from: \"today\", describes: \"The date the letter went out.\" },\n ],\n },\n\n notificationRule: {\n token: \"harbor_dental_visit_reminder\",\n name: \"Day-before appointment reminder\",\n describes:\n \"A no-show costs the practice the whole chair hour and the hygienist's time. A text the day before is the cheapest thing that prevents it, and it is the first automation any practice turns on.\",\n when: {\n table: \"visit\",\n event: \"due\",\n field: \"appointment_at\",\n daysBefore: 1,\n },\n audience: \"the patient in the chair\",\n channel: \"sms\",\n message:\n \"Harbor Dental: a reminder that you are booked with {{provider}} tomorrow at {{appointment_time}}. Reply C to confirm or call 360 555 0142 if you need to move it.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"lane REAL-DATA (records use-case library)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/ridgeline-physical-therapy-plan-of-care.ts — @ai-matrx/records/use-cases\n//\n// THE USE CASE: Sasha Lindqvist runs Ridgeline Physical Therapy single-handed,\n// and she uses this to carry a patient from a physician's referral through a\n// course of visits to a treatment goal that is either met or honestly written\n// off — without losing track of who is overdue for a re-evaluation.\n//\n// PROVENANCE. The tables, fields and rows come from the data crew's dataset\n// `matrx-frontend/scripts/campaign-tests/use-cases/physical-therapy-clinic.json`.\n// Three things were fixed on adoption, each a law the crew's file broke:\n// · the organization was \"Ridgeline Physical Therapy (test fixture)\" — a test\n// organization carries the use case's own name and is found for cleanup by\n// its tag, never by a junk suffix;\n// · patient mailboxes were on `@example-mail.test`, which reads as fake on the\n// screen the owner is looking at;\n// · relations pointed at a patient's NAME, which is not a handle — they now\n// point at the row.\n// Everything the crew's format has no room for — the business identity, the\n// relationship declarations, the form, the pipeline, the dashboard question, the\n// document and the notification rule — was written for this file.\n//\n// Every person, mailbox and phone number below is invented and belongs to nobody.\n\nimport type { UseCase } from \"./types\";\n\nexport const useCase: UseCase = {\n id: \"ridgeline-physical-therapy-plan-of-care\",\n useCase:\n \"Sasha Lindqvist runs Ridgeline Physical Therapy single-handed, and she uses this to carry a patient from a physician's referral through a course of visits to a treatment goal that is either met or honestly written off, without losing track of who is overdue for a re-evaluation.\",\n industry: \"Physical therapy\",\n cleanupTag: \"use-case:ridgeline-physical-therapy-plan-of-care\",\n\n business: {\n name: \"Ridgeline Physical Therapy\",\n legalName: \"Ridgeline Physical Therapy, LLC\",\n describes: \"A solo outpatient physical therapy practice doing orthopaedic and post-surgical rehabilitation.\",\n address: {\n line1: \"3114 Foothill Boulevard\",\n line2: \"Suite B\",\n city: \"Boise\",\n region: \"ID\",\n postalCode: \"83702\",\n country: \"US\",\n },\n phone: \"+1 208 555 0173\",\n website: \"https://ridgelinept.com\",\n email: \"frontdesk@ridgelinept.com\",\n timezone: \"America/Boise\",\n },\n\n tables: [\n {\n token: \"patients\",\n name: \"Patients\",\n labelSingular: \"Patient\",\n labelPlural: \"Patients\",\n type: \"entity\",\n display: \"list\",\n weight: \"heavy\",\n ordered: false,\n icon: \"user-round\",\n titleField: \"full_name\",\n describes: \"Everyone on the caseload, from referral through discharge.\",\n fields: [\n { key: \"full_name\", label: \"Patient name\", parityType: \"text\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"date_of_birth\", label: \"Date of birth\", parityType: \"datetime\", format: \"date\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"phone\", label: \"Phone\", parityType: \"phone\", format: \"phone\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"email\", label: \"Email\", parityType: \"email\", format: \"email\", sensitivity: \"confidential\", contextPolicy: \"exclude\" },\n { key: \"referring_physician\", label: \"Referring physician\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"primary_diagnosis\", label: \"Primary diagnosis\", parityType: \"text\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"insurance_provider\", label: \"Insurance\", parityType: \"select\", choices: [\"Aetna\", \"Blue Cross Blue Shield\", \"UnitedHealthcare\", \"Cigna\", \"Medicare\", \"Self-pay\"], sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"intake_date\", label: \"Intake date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Active\", \"Discharged\", \"On Hold\", \"Referred Out\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"patient-nora-castellan\", values: {\"full_name\": \"Nora Castellan\", \"date_of_birth\": \"1978-03-14\", \"phone\": \"555-201-3341\", \"email\": \"nora.castellan@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Rotator cuff tendinopathy, right shoulder\", \"insurance_provider\": \"Aetna\", \"intake_date\": \"2026-06-02\", \"status\": \"Active\"} },\n { key: \"patient-devon-ashworth\", values: {\"full_name\": \"Devon Ashworth\", \"date_of_birth\": \"1991-11-02\", \"phone\": \"555-201-3342\", \"email\": \"devon.ashworth@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"ACL reconstruction, post-op (6 weeks)\", \"insurance_provider\": \"Blue Cross Blue Shield\", \"intake_date\": \"2026-06-05\", \"status\": \"Active\"} },\n { key: \"patient-priya-vantana\", values: {\"full_name\": \"Priya Vantana\", \"date_of_birth\": \"1965-07-22\", \"phone\": \"555-201-3343\", \"email\": \"priya.vantana@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Chronic low back pain, L4-L5 disc bulge\", \"insurance_provider\": \"Medicare\", \"intake_date\": \"2026-05-19\", \"status\": \"Active\"} },\n { key: \"patient-isaiah-broome\", values: {\"full_name\": \"Isaiah Broome\", \"date_of_birth\": \"2002-01-30\", \"phone\": \"555-201-3344\", \"email\": \"isaiah.broome@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Grade II ankle sprain, left\", \"insurance_provider\": \"UnitedHealthcare\", \"intake_date\": \"2026-07-01\", \"status\": \"Discharged\"} },\n { key: \"patient-marguerite-solano\", values: {\"full_name\": \"Marguerite Solano\", \"date_of_birth\": \"1954-09-08\", \"phone\": \"555-201-3345\", \"email\": \"marguerite.solano@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"Total knee replacement, post-op (3 weeks)\", \"insurance_provider\": \"Medicare\", \"intake_date\": \"2026-06-20\", \"status\": \"Active\"} },\n { key: \"patient-tobias-reinholt\", values: {\"full_name\": \"Tobias Reinholt\", \"date_of_birth\": \"1988-04-17\", \"phone\": \"555-201-3346\", \"email\": \"tobias.reinholt@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Cervical radiculopathy, C6\", \"insurance_provider\": \"Cigna\", \"intake_date\": \"2026-07-10\", \"status\": \"Active\"} },\n { key: \"patient-odalys-fenmore\", values: {\"full_name\": \"Odalys Fenmore\", \"date_of_birth\": \"1997-12-25\", \"phone\": \"555-201-3347\", \"email\": \"odalys.fenmore@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Patellofemoral pain syndrome, bilateral\", \"insurance_provider\": \"Self-pay\", \"intake_date\": \"2026-07-15\", \"status\": \"On Hold\"} },\n { key: \"patient-wendell-okafor\", values: {\"full_name\": \"Wendell Okafor\", \"date_of_birth\": \"1972-02-11\", \"phone\": \"555-201-3348\", \"email\": \"wendell.okafor@northshoremail.com\", \"referring_physician\": \"Dr. Marcus Feld\", \"primary_diagnosis\": \"Plantar fasciitis, right heel\", \"insurance_provider\": \"Aetna\", \"intake_date\": \"2026-06-28\", \"status\": \"Active\"} },\n { key: \"patient-camille-duprez\", values: {\"full_name\": \"Camille Duprez\", \"date_of_birth\": \"1983-06-04\", \"phone\": \"555-201-3349\", \"email\": \"camille.duprez@northshoremail.com\", \"referring_physician\": \"Dr. Lena Ostrowski\", \"primary_diagnosis\": \"Lumbar spinal stenosis\", \"insurance_provider\": \"Blue Cross Blue Shield\", \"intake_date\": \"2026-05-30\", \"status\": \"Active\"} },\n { key: \"patient-griffin-alderete\", values: {\"full_name\": \"Griffin Alderete\", \"date_of_birth\": \"1995-10-19\", \"phone\": \"555-201-3350\", \"email\": \"griffin.alderete@northshoremail.com\", \"referring_physician\": \"Dr. Amina Reyes\", \"primary_diagnosis\": \"Achilles tendinopathy, left\", \"insurance_provider\": \"UnitedHealthcare\", \"intake_date\": \"2026-07-18\", \"status\": \"Referred Out\"} },\n ],\n },\n {\n token: \"appointments\",\n name: \"Visits\",\n labelSingular: \"Visit\",\n labelPlural: \"Visits\",\n type: \"entity\",\n display: \"calendar\",\n weight: \"heavy\",\n ordered: true,\n icon: \"calendar-clock\",\n titleField: \"visit_type\",\n describes: \"Every booked appointment, what kind of visit it is and whether it happened.\",\n fields: [\n { key: \"patient\", label: \"Patient\", parityType: \"relation\", required: true, relationTarget: \"patients\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"appointment_date\", label: \"Date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"appointment_time\", label: \"Time\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"visit_type\", label: \"Visit type\", parityType: \"select\", required: true, choices: [\"Initial Evaluation\", \"Follow-up\", \"Re-evaluation\", \"Discharge Visit\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"therapist_name\", label: \"Therapist\", parityType: \"text\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"duration_minutes\", label: \"Length\", parityType: \"integer\", unit: \"min\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Scheduled\", \"Completed\", \"No-show\", \"Cancelled\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"notes\", label: \"Visit notes\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"on_request\" },\n ],\n rows: [\n { key: \"appointment-01\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-02\", \"appointment_time\": \"09:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"AROM shoulder flexion limited to 110 deg, pain 6/10 with overhead reach.\"} },\n { key: \"appointment-02\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-09\", \"appointment_time\": \"09:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Progressing isometrics, pain down to 4/10.\"} },\n { key: \"appointment-03\", values: {\"patient\": \"patient-nora-castellan\", \"appointment_date\": \"2026-06-16\", \"appointment_time\": \"09:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Scheduled\", \"notes\": \"\"} },\n { key: \"appointment-04\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-05\", \"appointment_time\": \"13:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Quad lag present, effusion mild. Cleared for closed-chain work.\"} },\n { key: \"appointment-05\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-12\", \"appointment_time\": \"13:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Quad lag resolving, full passive extension achieved.\"} },\n { key: \"appointment-06\", values: {\"patient\": \"patient-devon-ashworth\", \"appointment_date\": \"2026-06-19\", \"appointment_time\": \"13:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"No-show\", \"notes\": \"Patient did not call.\"} },\n { key: \"appointment-07\", values: {\"patient\": \"patient-priya-vantana\", \"appointment_date\": \"2026-05-19\", \"appointment_time\": \"10:30\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Positive slump test on right, centralization with extension.\"} },\n { key: \"appointment-08\", values: {\"patient\": \"patient-priya-vantana\", \"appointment_date\": \"2026-06-02\", \"appointment_time\": \"10:30\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Symptoms centralizing, tolerating prone press-ups.\"} },\n { key: \"appointment-09\", values: {\"patient\": \"patient-isaiah-broome\", \"appointment_date\": \"2026-07-01\", \"appointment_time\": \"15:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Grade II sprain, moderate swelling, weight-bearing as tolerated.\"} },\n { key: \"appointment-10\", values: {\"patient\": \"patient-isaiah-broome\", \"appointment_date\": \"2026-07-22\", \"appointment_time\": \"15:00\", \"visit_type\": \"Discharge Visit\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 30, \"status\": \"Completed\", \"notes\": \"Full ROM restored, single-leg balance 30s, discharged to home program.\"} },\n { key: \"appointment-11\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-06-20\", \"appointment_time\": \"11:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Knee flexion 85 deg, using front-wheel walker.\"} },\n { key: \"appointment-12\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-06-27\", \"appointment_time\": \"11:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Completed\", \"notes\": \"Flexion improved to 100 deg.\"} },\n { key: \"appointment-13\", values: {\"patient\": \"patient-marguerite-solano\", \"appointment_date\": \"2026-07-04\", \"appointment_time\": \"11:00\", \"visit_type\": \"Follow-up\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 45, \"status\": \"Scheduled\", \"notes\": \"\"} },\n { key: \"appointment-14\", values: {\"patient\": \"patient-tobias-reinholt\", \"appointment_date\": \"2026-07-10\", \"appointment_time\": \"08:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Positive Spurling's test right, numbness in C6 dermatome.\"} },\n { key: \"appointment-15\", values: {\"patient\": \"patient-wendell-okafor\", \"appointment_date\": \"2026-06-28\", \"appointment_time\": \"16:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Sasha Lindqvist, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Point tenderness at medial calcaneal tubercle, worse first step in AM.\"} },\n { key: \"appointment-16\", values: {\"patient\": \"patient-camille-duprez\", \"appointment_date\": \"2026-05-30\", \"appointment_time\": \"09:30\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Symptoms improve with flexion-biased posture, neurogenic claudication at 2 blocks.\"} },\n { key: \"appointment-17\", values: {\"patient\": \"patient-griffin-alderete\", \"appointment_date\": \"2026-07-18\", \"appointment_time\": \"14:00\", \"visit_type\": \"Initial Evaluation\", \"therapist_name\": \"Dr. Marcus Reid, DPT\", \"duration_minutes\": 60, \"status\": \"Completed\", \"notes\": \"Referred to orthopedic surgeon for imaging before continuing PT.\"} },\n ],\n },\n {\n token: \"treatment_plans\",\n name: \"Treatment plans\",\n labelSingular: \"Treatment plan\",\n labelPlural: \"Treatment plans\",\n type: \"entity\",\n display: \"board\",\n weight: \"heavy\",\n ordered: false,\n icon: \"clipboard-list\",\n titleField: \"diagnosis\",\n describes: \"The goal each patient is working toward, and whether they have met it.\",\n fields: [\n { key: \"patient\", label: \"Patient\", parityType: \"relation\", required: true, relationTarget: \"patients\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"diagnosis\", label: \"Diagnosis\", parityType: \"text\", required: true, sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"goal\", label: \"Goal\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"summarize\" },\n { key: \"start_date\", label: \"Start date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"target_date\", label: \"Target date\", parityType: \"datetime\", format: \"date\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"status\", label: \"Status\", parityType: \"select\", choices: [\"Active\", \"Met\", \"Modified\", \"Discontinued\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n ],\n rows: [\n { key: \"plan-nora-castellan\", values: {\"patient\": \"patient-nora-castellan\", \"diagnosis\": \"Rotator cuff tendinopathy, right shoulder\", \"goal\": \"Restore pain-free overhead reach to 160 deg flexion within 6 weeks.\", \"start_date\": \"2026-06-02\", \"target_date\": \"2026-07-14\", \"status\": \"Active\"} },\n { key: \"plan-devon-ashworth\", values: {\"patient\": \"patient-devon-ashworth\", \"diagnosis\": \"ACL reconstruction, post-op\", \"goal\": \"Return to single-leg squat and stair descent without compensation by week 12.\", \"start_date\": \"2026-06-05\", \"target_date\": \"2026-08-28\", \"status\": \"Active\"} },\n { key: \"plan-priya-vantana\", values: {\"patient\": \"patient-priya-vantana\", \"diagnosis\": \"Chronic low back pain, L4-L5 disc bulge\", \"goal\": \"Centralize symptoms and tolerate 30-minute walk without radiating pain.\", \"start_date\": \"2026-05-19\", \"target_date\": \"2026-07-19\", \"status\": \"Active\"} },\n { key: \"plan-isaiah-broome\", values: {\"patient\": \"patient-isaiah-broome\", \"diagnosis\": \"Grade II ankle sprain, left\", \"goal\": \"Full weight-bearing, return to recreational basketball.\", \"start_date\": \"2026-07-01\", \"target_date\": \"2026-07-22\", \"status\": \"Met\"} },\n { key: \"plan-marguerite-solano\", values: {\"patient\": \"patient-marguerite-solano\", \"diagnosis\": \"Total knee replacement, post-op\", \"goal\": \"Achieve 110 deg flexion and walk without assistive device by week 8.\", \"start_date\": \"2026-06-20\", \"target_date\": \"2026-08-15\", \"status\": \"Active\"} },\n { key: \"plan-tobias-reinholt\", values: {\"patient\": \"patient-tobias-reinholt\", \"diagnosis\": \"Cervical radiculopathy, C6\", \"goal\": \"Resolve numbness, restore full cervical rotation.\", \"start_date\": \"2026-07-10\", \"target_date\": \"2026-08-21\", \"status\": \"Active\"} },\n { key: \"plan-wendell-okafor\", values: {\"patient\": \"patient-wendell-okafor\", \"diagnosis\": \"Plantar fasciitis, right heel\", \"goal\": \"Pain-free first step in the morning, return to daily 3-mile walk.\", \"start_date\": \"2026-06-28\", \"target_date\": \"2026-08-09\", \"status\": \"Active\"} },\n { key: \"plan-camille-duprez\", values: {\"patient\": \"patient-camille-duprez\", \"diagnosis\": \"Lumbar spinal stenosis\", \"goal\": \"Increase walking tolerance to 6 blocks without claudication.\", \"start_date\": \"2026-05-30\", \"target_date\": \"2026-08-01\", \"status\": \"Active\"} },\n ],\n },\n {\n token: \"exercises_prescribed\",\n name: \"Home exercises\",\n labelSingular: \"Home exercise\",\n labelPlural: \"Home exercises\",\n type: \"detail\",\n display: \"list\",\n weight: \"light\",\n ordered: true,\n icon: \"dumbbell\",\n titleField: \"exercise_name\",\n describes: \"What each patient was told to do between visits, and how it progresses.\",\n fields: [\n { key: \"treatment_plan\", label: \"Treatment plan\", parityType: \"relation\", required: true, relationTarget: \"treatment_plans\", relationMax: 1, sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"exercise_name\", label: \"Exercise\", parityType: \"select\", required: true, choices: [\"Pendulum Exercise\", \"Scapular Retraction\", \"Straight Leg Raise\", \"Quadriceps Sets\", \"Heel Slides\", \"Terminal Knee Extension\", \"Prone Press-ups (McKenzie)\", \"Cat-Camel Stretch\", \"Clamshells\", \"Bridging\", \"Standing Hip Abduction\", \"Wall Sits\", \"Calf Raises\", \"Hamstring Curls\", \"Ankle Pumps\", \"Chin Tucks\"], sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"sets\", label: \"Sets\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"reps\", label: \"Reps\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"frequency_per_week\", label: \"Times per week\", parityType: \"integer\", sensitivity: \"internal\", contextPolicy: \"include\" },\n { key: \"progression_notes\", label: \"Progression notes\", parityType: \"long_text\", sensitivity: \"confidential\", contextPolicy: \"on_request\" },\n ],\n rows: [\n { key: \"exercises_prescribed-01\", values: {\"treatment_plan\": \"plan-nora-castellan\", \"exercise_name\": \"Pendulum Exercise\", \"sets\": 3, \"reps\": 15, \"frequency_per_week\": 7, \"progression_notes\": \"Started week 1, pain-free arc, add light weight at week 3.\"} },\n { key: \"exercises_prescribed-02\", values: {\"treatment_plan\": \"plan-nora-castellan\", \"exercise_name\": \"Scapular Retraction\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Using resistance band, increase band tension at week 4.\"} },\n { key: \"exercises_prescribed-03\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Quadriceps Sets\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Hold 5 seconds, progressing to straight leg raise next visit.\"} },\n { key: \"exercises_prescribed-04\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Straight Leg Raise\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"No lag observed, add ankle weight 2lb.\"} },\n { key: \"exercises_prescribed-05\", values: {\"treatment_plan\": \"plan-devon-ashworth\", \"exercise_name\": \"Terminal Knee Extension\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Using resistance band anchored behind knee.\"} },\n { key: \"exercises_prescribed-06\", values: {\"treatment_plan\": \"plan-priya-vantana\", \"exercise_name\": \"Prone Press-ups (McKenzie)\", \"sets\": 2, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"Symptoms centralizing, hold end range 2 seconds.\"} },\n { key: \"exercises_prescribed-07\", values: {\"treatment_plan\": \"plan-priya-vantana\", \"exercise_name\": \"Cat-Camel Stretch\", \"sets\": 2, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Morning stiffness reduced.\"} },\n { key: \"exercises_prescribed-08\", values: {\"treatment_plan\": \"plan-isaiah-broome\", \"exercise_name\": \"Ankle Pumps\", \"sets\": 3, \"reps\": 20, \"frequency_per_week\": 7, \"progression_notes\": \"Early edema control, progressed to standing balance week 2.\"} },\n { key: \"exercises_prescribed-09\", values: {\"treatment_plan\": \"plan-marguerite-solano\", \"exercise_name\": \"Heel Slides\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Flexion improving 5 deg/week.\"} },\n { key: \"exercises_prescribed-10\", values: {\"treatment_plan\": \"plan-marguerite-solano\", \"exercise_name\": \"Quadriceps Sets\", \"sets\": 4, \"reps\": 10, \"frequency_per_week\": 7, \"progression_notes\": \"Hold 5 seconds, no extensor lag.\"} },\n { key: \"exercises_prescribed-11\", values: {\"treatment_plan\": \"plan-tobias-reinholt\", \"exercise_name\": \"Chin Tucks\", \"sets\": 3, \"reps\": 10, \"frequency_per_week\": 6, \"progression_notes\": \"Reduces referred symptoms into arm during session.\"} },\n { key: \"exercises_prescribed-12\", values: {\"treatment_plan\": \"plan-wendell-okafor\", \"exercise_name\": \"Calf Raises\", \"sets\": 3, \"reps\": 15, \"frequency_per_week\": 5, \"progression_notes\": \"Eccentric emphasis, 3-second lower.\"} },\n { key: \"exercises_prescribed-13\", values: {\"treatment_plan\": \"plan-camille-duprez\", \"exercise_name\": \"Bridging\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Flexion-biased, tolerating well.\"} },\n { key: \"exercises_prescribed-14\", values: {\"treatment_plan\": \"plan-camille-duprez\", \"exercise_name\": \"Standing Hip Abduction\", \"sets\": 3, \"reps\": 12, \"frequency_per_week\": 5, \"progression_notes\": \"Added ankle weight this week.\"} },\n ],\n },\n ],\n\n relationships: [\n {\n describes: \"A visit belongs to the patient who attends it, and it dies with their chart.\",\n fromTable: \"appointments\",\n fromField: \"patient\",\n toTable: \"patients\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"visits\",\n },\n {\n describes: \"A treatment plan belongs to the patient it sets a goal for.\",\n fromTable: \"treatment_plans\",\n fromField: \"patient\",\n toTable: \"patients\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"treatment_plans\",\n },\n {\n describes: \"A home exercise is prescribed under exactly one treatment plan and ends with it.\",\n fromTable: \"exercises_prescribed\",\n fromField: \"treatment_plan\",\n toTable: \"treatment_plans\",\n flavor: \"owned\",\n cardinality: \"one\",\n onDelete: \"cascade\",\n inverseKey: \"exercises\",\n },\n ],\n\n form: {\n token: \"ridgeline_new_patient_referral\",\n name: \"Ridgeline new-patient referral intake\",\n describes:\n \"What a referred patient fills in before the initial evaluation, so the first visit is spent examining them rather than typing.\",\n audience: \"public\",\n table: \"patients\",\n fields: [\n { fieldKey: \"full_name\", label: \"Your full name\", required: true },\n { fieldKey: \"date_of_birth\", label: \"Date of birth\", required: true },\n { fieldKey: \"phone\", label: \"Best number to reach you\", required: true },\n { fieldKey: \"email\", label: \"Email\", required: true },\n { fieldKey: \"referring_physician\", label: \"Who referred you?\", required: true, help: \"The doctor's name on your referral, so we can send them your plan of care.\" },\n { fieldKey: \"primary_diagnosis\", label: \"What are you coming in for?\", help: \"In your own words is fine — we will write the clinical version.\" },\n { fieldKey: \"insurance_provider\", label: \"Insurance\", help: \"Choose Self-pay if you would rather not bill insurance.\" },\n ],\n submitLabel: \"Send my referral details\",\n confirmation:\n \"Thank you — we have your details. We will verify your benefits and call you within one business day to book your initial evaluation, which takes about an hour.\",\n },\n\n pipeline: {\n token: \"ridgeline_plan_of_care\",\n name: \"Plan of care\",\n describes:\n \"What happens to a treatment goal once it is written. Sasha reviews this board every Friday, because a plan that sits in Active past its target date is the one that quietly fails.\",\n table: \"treatment_plans\",\n stageField: \"status\",\n stages: [\n { key: \"Active\", label: \"Active\", describes: \"The patient is working toward the goal and attending visits. Leaves when the goal is met, changed or abandoned.\", typicalDurationDays: 42 },\n { key: \"Modified\", label: \"Modified\", describes: \"Re-evaluation changed the goal or the timeline — progress was faster or slower than predicted.\", typicalDurationDays: 21 },\n { key: \"Met\", label: \"Met\", describes: \"The measured goal was reached. This is what discharge is built on and what the referring physician is told.\" },\n { key: \"Discontinued\", label: \"Discontinued\", describes: \"Stopped without meeting the goal — the patient withdrew, was referred out, or their insurance ran out. Written down honestly rather than left Active.\" },\n ],\n },\n\n dashboardQuestion: {\n question: \"How many plans are still Active past the date I said they would be finished?\",\n whyItMatters:\n \"A plan sitting Active past its target date means a patient is being treated without anyone re-checking whether the treatment is working. Every one of those needs a re-evaluation booked this week, or a decision to change the goal.\",\n table: \"treatment_plans\",\n aggregate: \"count\",\n groupBy: \"status\",\n filter: \"status is 'Active' and target_date is before today\",\n answerUnit: \"treatment plans\",\n },\n\n documentTemplate: {\n token: \"ridgeline_plan_of_care_letter\",\n name: \"Plan of care letter to the referring physician\",\n describes:\n \"Goes back to the doctor who made the referral, at the start of care and again at discharge. Physicians refer again when they hear what happened to the last patient they sent, which makes this letter the practice's whole marketing plan.\",\n table: \"treatment_plans\",\n title: \"Plan of care — {{diagnosis}}\",\n body: [\n \"Thank you for the referral.\",\n \"\",\n \"Following evaluation I have started a course of treatment for {{diagnosis}}.\",\n \"\",\n \"Goal: {{goal}}\",\n \"\",\n \"Care began on {{start_date}} and I expect to reach that goal by {{target_date}}. The plan is currently {{status}}. The patient is on a home exercise programme between visits, and I re-evaluate objectively rather than by report.\",\n \"\",\n \"I will write again at discharge with the measured outcome. If anything in the history changes at your end, please tell me — it usually changes the plan.\",\n \"\",\n \"{{practice_name}}\",\n \"{{practice_phone}}\",\n \"{{today}}\",\n ].join(\"\\n\"),\n mergeFields: [\n { key: \"diagnosis\", from: \"diagnosis\", describes: \"What is being treated.\" },\n { key: \"goal\", from: \"goal\", describes: \"The measurable goal, in the words the physician will be told at discharge.\" },\n { key: \"start_date\", from: \"start_date\", describes: \"When care began.\" },\n { key: \"target_date\", from: \"target_date\", describes: \"When the goal is expected to be met.\" },\n { key: \"status\", from: \"status\", describes: \"Where the plan stands today.\" },\n { key: \"practice_name\", from: \"business\", describes: \"The practice name.\" },\n { key: \"practice_phone\", from: \"business\", describes: \"The number the physician's office calls back on.\" },\n { key: \"today\", from: \"today\", describes: \"The date the letter went out.\" },\n ],\n },\n\n notificationRule: {\n token: \"ridgeline_plan_past_target\",\n name: \"A plan has passed its target date\",\n describes:\n \"The one automation a solo therapist genuinely needs: nobody else is watching the caseload, so a goal that quietly slips past its date has to come and find her.\",\n when: {\n table: \"treatment_plans\",\n event: \"overdue\",\n field: \"target_date\",\n },\n audience: \"the treating therapist\",\n channel: \"in_app\",\n message:\n \"{{diagnosis}} has passed its target date of {{target_date}} and is still {{status}}. Book a re-evaluation or change the goal.\",\n },\n\n provenance: {\n kind: \"synthesized\",\n authoredBy: \"data crew (dataset) + lane REAL-DATA (business identity, relationships, form, pipeline, dashboard question, document, notification rule)\",\n authoredOn: \"2026-09-21\",\n noRealPeople: true,\n },\n};\n\nexport default useCase;\n","// src/use-cases/index.ts — @ai-matrx/records/use-cases\n//\n// THE LIBRARY OF REAL USE CASES: the one source every test, seed, demo,\n// fixture and screenshot script in the platform draws its data from.\n//\n// The owner's law, 2026-09-21 — \"before entering any test data, name the real\n// use case in one sentence: who the user is, what business they run, what job\n// this exact feature does for them.\" This package is where that sentence, and\n// the data that follows from it, lives once.\n//\n// HOW TO USE IT\n//\n// import { loadUseCase, useCaseFor } from \"@ai-matrx/records/use-cases\";\n//\n// // A suite, a demo or a screenshot script names ITSELF and gets a stable\n// // business — rotated across industries so the platform is exercised broadly.\n// const useCase = await loadUseCase(useCaseFor(\"records/door-write-suite\"));\n//\n// // Then seed through the real doors. Validate first: a half-valid dataset\n// // produces a screen that looks like it worked.\n// assertUseCase(useCase);\n//\n// HOW TO ADD ONE — see ./README.md. One file, one line in ./registry.ts.\n\nexport * from \"./types\";\nexport * from \"./placeholders\";\nexport * from \"./validate\";\nexport * from \"./registry\";\n","// src/use-cases/placeholders.ts — @ai-matrx/records/use-cases\n//\n// THE BANNED PATTERNS, IN ONE PLACE.\n//\n// The owner's law, 2026-09-21: no test, fixture, seed, demo or screenshot may\n// carry placeholder junk. This file is the single list of what \"junk\" means,\n// and it is deliberately shared by two consumers that must never disagree:\n//\n// 1. `validateUseCase` — so a use-case template that slips into junk fails\n// its own suite, in this package, at build time.\n// 2. the repo guards (`check:no-placeholder-data` in matrx-frontend and\n// aidream) — so a test or seed file anywhere in the platform fails the\n// build for the same reason, by the same rule, with the same sentence.\n//\n// WHY THE LIST IS SHORTER THAN THE BRIEF'S\n// ----------------------------------------\n// The brief also names `bar`, `widget` and `placeholder`. Each of those is a\n// real English word this platform uses constantly — a bar chart, a dashboard\n// widget, an input's placeholder attribute — and a guard that goes red on\n// `toolbar` is a guard people switch off within a day. So `bar`/`baz`/`qux` are\n// caught only as a WHOLE quoted value (\"bar\"), which is the form that is\n// actually placeholder junk, and `widget`/`placeholder` are not patterns at\n// all. The rule is: catch the junk, never the vocabulary.\n//\n// THE ESCAPE HATCH, AND WHY IT IS VISIBLE\n// ---------------------------------------\n// A line carrying `matrx-real-data:allow <reason>` is exempt. That is how the\n// one legitimate \"Dana Whitfield\" survives, how a test that asserts the guard's\n// own refusal can contain the junk it asserts on, and how a genuine third-party\n// fixture keeps its upstream values. The reason is required and it is in the\n// diff, so an exemption is a decision somebody made on purpose — never a\n// silent hole.\n\n/** One banned pattern, with the reason and what to do instead. */\nexport interface PlaceholderPattern {\n /** Stable id, used in the guard's output so a failure is greppable. */\n id: string;\n /** Matches the junk. Always global + case-insensitive. */\n test: RegExp;\n /** What is wrong with it, in one line. */\n why: string;\n /** What to write instead. */\n instead: string;\n /**\n * Skip the hit when the LINE it sits on matches this. For words that are junk\n * in one world and vocabulary in another: \"Acme\" is a cartoon company, but\n * ACME is also RFC 8555, the protocol Let's Encrypt speaks, and a guard that\n * cannot tell them apart will be told to shut up rather than obeyed.\n */\n unlessLineMatches?: RegExp;\n /** Fire only when the WHOLE text matches this (a rule about a kind of file, not a kind of line). */\n onlyInTextMatching?: RegExp;\n}\n\n/**\n * The pragma that exempts a single line. The reason is not optional: a bare\n * `matrx-real-data:allow` does not match and does not exempt anything.\n */\nexport const ALLOW_PRAGMA = /matrx-real-data:allow\\s+\\S+/i;\n\n/**\n * THE LIST. Every entry is anchored on word boundaries so it catches the token\n * and not the vocabulary it lives inside.\n */\nexport const PLACEHOLDER_PATTERNS: readonly PlaceholderPattern[] = [\n {\n id: \"acme\",\n test: /\\bacme\\b/gi,\n why: \"'Acme' is the cartoon of a company and tells the owner nothing about whether the product works.\",\n instead: \"Name the real business the use case is about — 'Harbor Dental Group', 'Blue Ridge Recycling'.\",\n // RFC 8555. \"ACME account\", \"ACME challenge\", \"Let's Encrypt\" — a real\n // protocol that happens to share the cartoon's name.\n unlessLineMatches:\n /let'?s encrypt|rfc\\s*8555|certificate|\\bacme\\s+(?:account|protocol|challenge|directory|client|server|ca)\\b|\\b(?:tls|ssl|dns-01|http-01)\\b/i,\n },\n {\n id: \"metasyntactic\",\n // foo, baz, qux, quux are never anybody's word. \"bar\" is: a bar chart, a wine bar, a\n // \"Bar\" choice on a restaurant's seating list — so it is junk only beside foo/baz,\n // and then foo/baz already catch it.\n test: /\\bfoo\\b|\\bbaz\\b|\\bqux\\b|\\bquux\\b|\\bfoobar\\b/gi,\n why: \"foo / bar / baz are stand-ins for data nobody thought about.\",\n instead: \"Use the practitioner's own word for the thing — a field is 'po_number', not 'foo'.\",\n },\n {\n id: \"lorem-ipsum\",\n test: /\\blorem\\b|\\bipsum\\b|\\bdolor sit amet\\b/gi,\n why: \"Lorem ipsum is a picture of text, not text. A screenshot of it proves nothing.\",\n instead: \"Write the sentence this business would really send.\",\n },\n {\n // TWO Zs, NOT THREE (widened 2026-09-21, lane ZZ-SWEEP-2). `ZZ W4-AGG Red`,\n // `ZZ HQ`, `zz_a_deal` are the same junk as `ZZZ …` and were the larger\n // half of it: 791 of them across 88 campaign-suite files when this widened.\n //\n // BUT A LEADING `zz` ON A DATABASE TRIGGER IS NOT A NAME, IT IS AN ORDERING\n // DEVICE. PostgreSQL fires triggers in alphabetical order of their name and\n // gives no other way to say \"last\", so this platform spells \"last\" with\n // z's: 591 live triggers across 79 distinct names — `zz0_table_owner`,\n // `zz_memo_clear_i`, `zzz_history_capture_s_u`, `zzzz_unique_rule_holds` —\n // where each extra z buys another rung. A suite that asserts which triggers\n // fire on `custom.record` MUST quote those names exactly. Reddening on them\n // would be this file's own \"catch the junk, never the vocabulary\" rule\n // broken, so a line that is talking about triggers is exempt.\n id: \"zzz-prefix\",\n test: /\\bzz+[\\s_-]/gi,\n unlessLineMatches: /\\btriggers?\\b|\\btgname\\b|\\btgrelid\\b|\\btgenabled\\b|\\bpg_trigger\\b/i,\n why: \"A 'ZZ …' / 'ZZZ …' name exists to sort test rows to the bottom and to be deleted; it makes every screen look broken.\",\n instead: \"Give it the use case's own name and find it for cleanup by the organization's cleanup tag. (On a TRIGGER the prefix is a firing-order device, not a name — say 'trigger' on the line and it is exempt.)\",\n },\n {\n // ADDED 2026-09-23, lane ORG-CLEANUP-2, after 48 organizations named \"Throwaway Dash\n // 3fee58c2\", \"Throwaway Pipe 21d0e260\" walked back onto the owner's organization\n // picker overnight and this list could not see ONE of them: 28 of the 48 carried no\n // `zz` at all. \"Throwaway\" is the word a test writes when it means \"I will delete this\n // later\", and later never comes — the row outlives the run and the screen shows it.\n //\n // `iam.placeholder_in_a_name(name, slug)` on the platform database carries the SAME\n // list and refuses these at the organization door; the two are deliberate mirrors and\n // a pattern added to one belongs in the other.\n id: \"throwaway\",\n test: /\\bthrow[\\s_-]?away\\b|\\bdisposable[\\s_-]org|\\bsafe[\\s_-]to[\\s_-]delete\\b|\\btest[\\s_-]only\\b/gi,\n why: \"'Throwaway' / 'safe to delete' is a promise to clean up later that nothing keeps — the row survives the run and shows up on the owner's screen.\",\n instead:\n \"Name it after the real business the use case is about, reuse the SAME one by slug run after run, and carry the classification in settings.test_fixture so cleanup can find it.\",\n },\n {\n id: \"test-table\",\n test: /\\btest[\\s_-]table\\b|\\bmy[\\s_-]table\\b|\\bsample[\\s_-]table\\b/gi,\n why: \"'Test table' is not a thing any business has.\",\n instead: \"Name the table the way the practitioner says it: 'Work orders', 'Patients', 'Pickup routes'.\",\n },\n {\n id: \"test-organization\",\n test: /\\btest[\\s_-]org(?:anization|anisation)?\\b|\\bdemo[\\s_-]co(?:mpany|rp)?\\b|\\bsample[\\s_-]co(?:mpany|rp)?\\b/gi,\n why: \"A test organization with a test name makes every screenshot worthless.\",\n instead: \"Give the organization the use case's business name; tag it in settings for cleanup.\",\n },\n {\n id: \"sequential-names\",\n // A LEADING ZERO is a counter (\"Job 001\", \"Order 0042\"); so is a number after a word that\n // names nothing (\"Item 3\", \"Row 12\", \"Record 7\"). A business's own numbers — \"Job 2201\",\n // \"Order 10418\" — pass here; a column whose numbers run 1, 2, 3… is caught by the template\n // validator, which can see the whole column.\n test: /\\b(?:job|item|row|record|table|field|form|task|order|client|customer|product|user|thing|entry|note|project)[\\s_-]0\\d{1,4}\\b|\\b(?:item|row|record|table|field|thing|entry)[\\s_-]\\d{1,4}\\b/gi,\n why: \"'Job 001', 'Item 3', 'Client 12' are counters wearing a name. Nothing in a real business is called that.\",\n instead: \"Use the real identifier the business uses — an invoice number, a chart number, a route name.\",\n },\n {\n id: \"example-domain\",\n test: /@example\\.(?:com|org|net)\\b|\\b[a-z0-9-]+\\.example\\b|\\bexample\\.(?:com|org|net)\\b/gi,\n why: \"A '.example' address reads as fake on the screen the owner is looking at.\",\n instead:\n \"A test PERSON comes from the persona factory (aidream/aidream/testing/persona.py, matrx-frontend scripts/lib/persona.mjs): its mailbox is on fixtures.aimatrx.com, a domain we own that can never reach a real inbox. Seed data inside a template keeps the business's own invented domain; never invent a domain a real company might own.\",\n },\n {\n id: \"doe-names\",\n test: /\\bjohn doe\\b|\\bjane doe\\b|\\bdana whitfield\\b|\\btest user\\b|\\btest patient\\b|\\btest client\\b/gi,\n why: \"A repeated stand-in person is the tell that nobody modelled the domain.\",\n instead: \"Synthesize varied, plausible people who belong to nobody — and never copy a real person.\",\n },\n {\n // THE CHAIR'S RULING, 2026-09-21. People in a template are fictional but\n // REALISTIC, and a realistic person's mailbox is a mailbox — not a mailbox\n // with a counter welded to the end of it. `linda.reyes0@…`,\n // `wei.singh.m34@…` are the tell that a loop wrote the row, and the owner\n // reads a whole column of them as one fake person repeated.\n //\n // NARROW ON PURPOSE: it fires only when the local part is name-shaped\n // (two or more words joined by . _ or -) AND ends in a bare counter. That\n // is exactly the generator's signature and leaves the real mailboxes a\n // business has — `support365@`, `ap2@`, `frontdesk@` — alone.\n id: \"suffixed-mailbox\",\n test: /\\b[a-z]+(?:[._-][a-z]+)+\\d{1,3}@/gi,\n why: \"A mailbox whose name ends in a counter (linda.reyes0@, wei.singh.m34@) is a generated row wearing a person's name.\",\n instead:\n \"Give each person their own mailbox on the fictional business's own domain — 'linda.reyes@handsandhopealliance.org' — and vary the people instead of numbering one.\",\n },\n {\n // THE CHAIR'S RULING, 2026-09-21. \"Test fixture\" is a CLASSIFICATION, and a\n // classification lives in the organization's kind/metadata — the\n // `test_fixture` flag in its settings, which is how cleanup finds it. It is\n // never part of a NAME, because a name is what the owner reads on the\n // screen and \"Birchwood Ave Renovation (test fixture)\" tells him the\n // product is a rehearsal.\n //\n // The settings KEY is the right place, so a line that is writing the key is\n // exempt; a line that is writing the words into text is not.\n id: \"fixture-in-name\",\n test: /\\(\\s*test\\s+fixture\\s*\\)|\\btest[\\s_-]fixture\\b|\\bfixture[\\s_-]org(?:anization|anisation)?\\b/gi,\n unlessLineMatches:\n /[\"'`]?test_fixture[\"'`]?\\s*[:=]|\\bp_settings\\b|\\bcleanupTag\\b|\\bsettings\\.[a-z_]*fixture\\b/i,\n why: \"'Test fixture' is a classification, not a name. In a name it tells the owner the screen he is looking at is a rehearsal.\",\n instead:\n \"Name the organization after the business the use case is about, and carry the classification in its settings (`test_fixture: true`), which is also how cleanup finds it.\",\n },\n {\n id: \"keyboard-mash\",\n test: /\\basdf+\\b|\\bqwerty\\b|\\bxxx+\\b|\\btodo name\\b|\\bfixme\\b|\\btbd\\b/gi,\n why: \"Keyboard mash and TODO markers are unfinished data shipped as if it were finished.\",\n instead: \"Write the value the business would really have there.\",\n },\n] as const;\n\n/**\n * THE ACCOUNT DOORS (junk-data-cleanup, 2026-09-30).\n *\n * `PLACEHOLDER_PATTERNS` guards data a SCREEN shows. These guard how a test, script or\n * agent makes a PERSON: agents hand-made `zzz.*@example.invalid` accounts with inline\n * scripts and MCP SQL, ran them once against the live database and never deleted them (28\n * reserved-TLD accounts, 0 of 1,520 carrying any test marker). They are applied only to\n * scripts and tests (`ACCOUNT_DOOR_SCOPE` in each guard), never product code: the\n * portal-invite route and guest sign-in create real accounts on purpose.\n *\n * The one lawful door is the persona factory (aidream/aidream/testing/persona.py,\n * matrx-frontend scripts/lib/persona.mjs): a realistic person, tagged\n * `app_metadata.test_fixture` with an expiry, on `fixtures.aimatrx.com`. The exemption is a\n * line pragma, NOT `matrx-real-data:allow`:\n *\n * matrx-fixture:rollback-only <reason> the account lives in a transaction that is rolled back\n * matrx-fixture:factory-only <reason> the factory's own call to the admin door\n * matrx-fixture:read-only <reason> the line reads or looks up an account, never creates one\n * matrx-fixture:named-permanent <reason> a NAMED permanent fixture the script tags itself (expires_at null)\n * matrx-fixture:not-a-person <reason> the name looks like a junk head but is a stub, never an account or row\n *\n * The reason is required and it is in the diff.\n */\nexport const FIXTURE_PRAGMA = /matrx-fixture:(?:rollback-only|factory-only|read-only|not-a-person|named-permanent)\\s+\\S+/i;\n\n/**\n * A file that CREATES accounts. Reserved-TLD mailboxes are everywhere in plumbing tests that mock\n * a mail parser, a proxy URL or a DSN and never touch auth; the junk-account class is the file that\n * also makes an auth user, so `reserved-tld-mailbox` fires only in such a file.\n */\nexport const ACCOUNT_CREATION_SIGNAL =\n /insert\\s+into\\s+\"?auth\"?\\.\"?users\"?|\\/auth\\/v1\\/(?:admin\\/users|signup|invite)|auth\\.admin\\.create_?user|admin\\.create_?user\\s*\\(|\\bsign_?up\\s*\\(|invite_?user_?by_?email|\\bcreate_?user\\s*\\(/i;\n\n/** A runtime-built junk head: `zzz.`, `verify-`, `fixture-`, `throwaway`, `probe-`, `tmp-`, `e2e-` + an interpolation. */\nconst JUNK_HEAD = \"(?:zz+[._-]|verify-|fixture-|throw-?away[._-]?|probe-|tmp-|e2e-)\";\nconst INTERPOLATION = \"(?:\\\\$\\\\{[^}]*\\\\}|\\\\{[^}]*\\\\}|%s|%\\\\([a-z_]+\\\\)s)\";\n\nexport const ACCOUNT_DOOR_PATTERNS: readonly PlaceholderPattern[] = [\n {\n // The census found live accounts whose names were MADE AT RUNTIME (`f\"zzz.{tag}.{n}@example.invalid\"`),\n // so no literal ever appeared in source for the text patterns above to catch.\n id: \"runtime-junk-name\",\n test: new RegExp(\n // a mailbox built from a junk head: f\"zzz.{tag}@…\", `fixture-${id}@…`, \"verify-%s@…\"\n `(?:\\\\b[fr]{1,2})?[\"'\\`]${JUNK_HEAD}[\\\\w.+-]*${INTERPOLATION}[^\"'\\`]*@` +\n // ...or a name/slug/email/title assignment that does\n `|\\\\b(?:name|slug|email|title|label)\\\\w*[\"']?\\\\s*[:=]\\\\s*(?:\\\\b[fr]{1,2})?[\"'\\`]${JUNK_HEAD}[\\\\w.+-]*${INTERPOLATION}`,\n \"gi\",\n ),\n unlessLineMatches: FIXTURE_PRAGMA,\n why: \"A name or mailbox built at runtime from zzz / verify- / fixture- / throwaway / probe- / tmp- / e2e- is a junk row nothing will ever clean up, and no source scan can see it once it exists.\",\n instead:\n \"Make the person with the persona factory (aidream/aidream/testing/persona.py or scripts/lib/persona.mjs): realistic, tagged with an expiry, and swept even if your teardown never runs.\",\n },\n {\n id: \"reserved-tld-mailbox\",\n test: /@[a-z0-9-]+(?:\\.[a-z0-9-]+)*\\.(?:invalid|test|example)\\b/gi,\n unlessLineMatches: FIXTURE_PRAGMA,\n onlyInTextMatching: ACCOUNT_CREATION_SIGNAL,\n why: \"A reserved-TLD mailbox (.invalid, .test, .example) reads as junk on every screen and, when it is a real auth user, is never deleted.\",\n instead:\n \"Use the persona factory: its mailbox is on fixtures.aimatrx.com. If the account lives only inside a transaction that is rolled back, say so on the line: matrx-fixture:rollback-only <reason>.\",\n },\n {\n id: \"raw-auth-user-creation\",\n test: /insert\\s+into\\s+\"?auth\"?\\.\"?users\"?|\\/auth\\/v1\\/admin\\/users(?!\\/)|auth\\.admin\\.create_?user\\b|admin\\.create_?user\\s*\\(/gi,\n unlessLineMatches: FIXTURE_PRAGMA,\n why: \"An auth user made outside the persona factory carries no test tag and no expiry, so it outlives the run and nobody can tell it from a person.\",\n instead:\n \"Call create_fixture_user / fixture_user (aidream/aidream/testing/persona.py) or createFixtureUser / withFixtureUser (scripts/lib/persona.mjs). A rolled-back raw insert is allowed with a trailing matrx-fixture:rollback-only <reason> on the same line.\",\n },\n] as const;\n\n/** Every account-door violation in `text`. Line-scoped: one pragma never blinds the rest of a file. */\nexport function findAccountDoorViolations(text: string): PlaceholderHit[] {\n const hits: PlaceholderHit[] = [];\n const active = ACCOUNT_DOOR_PATTERNS.filter((p) => !p.onlyInTextMatching || p.onlyInTextMatching.test(text));\n if (active.length === 0) return hits;\n text.split(\"\\n\").forEach((line, index) => {\n if (/^\\s*(?:\\/\\/|#|--|\\*|\\/\\*)/.test(line)) return; // prose, not a value\n for (const pattern of active) {\n if (pattern.unlessLineMatches?.test(line)) continue;\n pattern.test.lastIndex = 0;\n for (const match of line.matchAll(pattern.test)) {\n hits.push({ patternId: pattern.id, match: match[0], why: pattern.why, instead: pattern.instead, line: index + 1 });\n }\n }\n });\n return hits;\n}\n\n/** One hit of one pattern. */\nexport interface PlaceholderHit {\n patternId: string;\n /** The exact text that matched. */\n match: string;\n why: string;\n instead: string;\n /** 1-based line, set by `findAccountDoorViolations`. */\n line?: number;\n}\n\n/**\n * Every banned pattern in `text`, ignoring any LINE carrying the allow pragma.\n *\n * Line-scoped rather than whole-text so one exemption never blinds the rest of\n * a file, which is the failure mode of a file-level ignore comment.\n */\nexport function findPlaceholders(text: string): PlaceholderHit[] {\n const hits: PlaceholderHit[] = [];\n const lines = text.split(\"\\n\");\n for (const line of lines) {\n if (ALLOW_PRAGMA.test(line)) continue;\n for (const pattern of PLACEHOLDER_PATTERNS) {\n if (pattern.unlessLineMatches?.test(line)) continue;\n // Fresh lastIndex every line: these are global regexes and they are shared.\n pattern.test.lastIndex = 0;\n for (const match of line.matchAll(pattern.test)) {\n hits.push({\n patternId: pattern.id,\n match: match[0],\n why: pattern.why,\n instead: pattern.instead,\n });\n }\n }\n }\n return hits;\n}\n\n/** The sentence a guard or a suite prints for one hit. Never a bare code. */\nexport function describePlaceholder(hit: PlaceholderHit): string {\n return `placeholder data \"${hit.match}\" (${hit.patternId}): ${hit.why} ${hit.instead}`;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// BANNED LABELS — the junk that hides in a NAME, not in a line of text\n// ─────────────────────────────────────────────────────────────────────────────\n//\n// `PLACEHOLDER_PATTERNS` scans text. These judge ONE label at a time — a table's name, a\n// field's label, a choice, a person's name in a name column — where a single word like\n// \"Item\" or \"Value\" is the whole label and is junk precisely because it is ALL there is.\n// They are deliberately not in PLACEHOLDER_PATTERNS: the repo guards scan code, where\n// \"value\" and \"data\" are vocabulary. Both guards and the template validator import this\n// file, so what a label may be is decided once.\n\nexport type LabelKind = \"table\" | \"field\" | \"choice\" | \"person\" | \"title\";\n\nexport interface BannedLabel {\n id: string;\n test: RegExp;\n kinds: readonly LabelKind[];\n why: string;\n}\n\nconst GENERIC_NOUN = \"records?|item|values?|details?|data|info(?:rmation)?|misc(?:ellaneous)?|stuff|things?|entr(?:y|ies)|objects?|documents?|reports?\";\n\nexport const BANNED_LABELS: readonly BannedLabel[] = [\n {\n id: \"generic-noun\",\n test: new RegExp(`^\\\\s*(?:my\\\\s+|the\\\\s+|new\\\\s+|other\\\\s+)?(?:${GENERIC_NOUN})(?:\\\\s+field)?\\\\s*$`, \"i\"),\n // A TABLE called \"Records\", or the column that names each record called \"Item\", tells a\n // person nothing. An ordinary column called \"Details\" or a choice called \"Documents\" is fine.\n kinds: [\"table\", \"title\"],\n why: \"a word for any kind of thing (like \\\"Records\\\" or \\\"Details\\\"), not the name this business uses for it\",\n },\n {\n id: \"numbered-label\",\n // A COUNTER is digits, or ONE letter standing apart (\"Option A\", \"Status 1\", \"Field #3\"). A\n // plural is a word, not a counter: \"Clients\", \"Stages\", \"Technicians\" are labels a business uses.\n test: /^\\s*(?:field|column|option|choice|status|type|category|stage|step|tag|group|level|person|user|customer|client|contact|employee|staff|member|technician|agent|team)(?:\\s*#?\\s*\\d+|\\s+#?\\s*[a-z])\\s*$/i,\n kinds: [\"table\", \"field\", \"choice\", \"person\", \"title\"],\n why: \"a generic word with a number or letter after it (like \\\"Option A\\\" or \\\"Status 1\\\"), which names nothing\",\n },\n {\n id: \"other-field\",\n test: /^\\s*other\\s+(?:field|column|value|info)\\s*$/i,\n kinds: [\"field\", \"choice\"],\n why: \"'Other field' is a slot nobody designed\",\n },\n {\n id: \"role-letter-person\",\n test: /^\\s*[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)?\\s+(?:[A-Z]|\\d{1,3})\\s*$/,\n kinds: [\"person\"],\n why: \"a role and a letter ('Technician A', 'Nurse 2') is a placeholder, not a person\",\n },\n];\n\n/** The first banned-label rule `label` breaks for its kind, or null. */\nexport function findBannedLabel(label: string, kind: LabelKind): BannedLabel | null {\n for (const rule of BANNED_LABELS) if (rule.kinds.includes(kind) && rule.test.test(label)) return rule;\n return null;\n}\n","// src/store.generated.ts — @ai-matrx/records\n//\n// GENERATED. Do not edit by hand: `pnpm records:generate` rewrites it from the\n// live record store, and `pnpm check:store-registry` fails the build when this\n// file and the store disagree. Every literal below was read from the database's\n// own catalogue — the vocabularies from the store's vocabulary functions, the\n// parity types from `custom.parity_field_types()`, the doors from `pg_proc`,\n// the kernel ids from the kernel rows themselves, the tokens from\n// `platform.entity_types`.\n//\n// Counts at generation: 3 actor words, 4 absence\n// reasons, 14 parity field types, 29 declarable field kinds,\n// 76 rule node kinds,\n// 9 kernel Tables, 914 doors, 70 knobs,\n// 1102 entity tokens.\n\nexport const ACTOR_VOCABULARY = [\"user\", \"agent\", \"system\"] as const;\n\n/** The three words the store still accepts and rewrites, and what each becomes. */\nexport const RETIRED_ACTOR_WORDS = {\"ai\": \"agent\", \"code\": \"system\", \"human\": \"user\"} as const;\n\nexport const ABSENCE_REASONS = [\"never asked\", \"none\", \"refused\", \"conflicting\"] as const;\n\nexport const VALUE_ENVELOPE_KEYS = [\"ver\", \"src\", \"actor\", \"on_behalf_of\", \"at\", \"absent\", \"alternates\", \"dated\", \"pinned\"] as const;\n\nexport const VALUE_ALTERNATE_KEYS = [\"value\", \"src\", \"rank\"] as const;\n\nexport const STORAGE_MODES = [\"light\", \"heavy\"] as const;\n\nexport const RULE_USES = [\"validate\", \"compute\", \"membership\", \"applicability\"] as const;\n\nexport const PER_VALUE_ACCESS_WORDS = [\"visibility\", \"access\", \"share\", \"acl\", \"permission\", \"permissions\", \"secret\"] as const;\n\n/** FLD-11's parity floor, each with the behaviour it is MADE OF (FLD-1). */\nexport const PARITY_FIELD_TYPES = [\n { parity_type: \"attachment\", behavior: \"relation\", made_of: \"REC-31: a File record reached through a relation, target the kernel `File` Table\" },\n { parity_type: \"checkbox\", behavior: \"boolean\", made_of: \"a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two\" },\n { parity_type: \"currency\", behavior: \"range\", made_of: \"FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation\" },\n { parity_type: \"datetime\", behavior: \"range\", made_of: \"a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question\" },\n { parity_type: \"email\", behavior: \"text\", made_of: \"text whose format is email\" },\n { parity_type: \"formula\", behavior: \"formula\", made_of: \"FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval\" },\n { parity_type: \"lookup\", behavior: \"formula\", made_of: \"a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side\" },\n { parity_type: \"member\", behavior: \"relation\", made_of: \"a person: a relation whose target is the kernel `Person` Table\" },\n { parity_type: \"multi_select\", behavior: \"list\", made_of: \"many choices from the same Table — the multi modifier, never a second behaviour\" },\n { parity_type: \"percent\", behavior: \"range\", made_of: \"a number whose unit is % and whose format is percent\" },\n { parity_type: \"phone\", behavior: \"text\", made_of: \"text whose format is phone\" },\n { parity_type: \"rollup\", behavior: \"formula\", made_of: \"an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice\" },\n { parity_type: \"select\", behavior: \"list\", made_of: \"one choice from a Table shown as a list (FLD-5/FLD-6)\" },\n { parity_type: \"url\", behavior: \"text\", made_of: \"text whose format is url, with the pattern Rule that makes the format enforceable\" },\n] as const;\n\n/**\n * THE ONE REGISTRY: every kind a column can be DECLARED as, from\n * `custom.field_kinds()`. `parity` says whether the kind is one of FLD-11's parity\n * floor; the rest are the behaviours and formats the declaration door answers to and\n * nothing else enumerated — which is how `signature` came to be a shape\n * `custom.doc_sign` accepted and no screen could offer.\n */\nexport const DECLARABLE_FIELD_KINDS = [\n { kind: \"address\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format address; the value is {street, city, region, postal_code, country}, every part optional, at least one filled\" },\n { kind: \"attachment\", behavior: \"relation\", parity: true, made_of: \"REC-31: a File record reached through a relation, target the kernel `File` Table\" },\n { kind: \"barcode\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format barcode; one printable line a scanner reads, config.symbology optional (custom.barcode_symbologies()), EAN/UPC digits and check digit enforced\" },\n { kind: \"checkbox\", behavior: \"boolean\", parity: true, made_of: \"a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two\" },\n { kind: \"count\", behavior: \"formula\", parity: false, made_of: \"P4: a roll-up whose config.agg is count, with format count: how many records a many-relation points at, as a number of its own\" },\n { kind: \"created_by\", behavior: \"formula\", parity: false, made_of: \"P4: a formula Field whose config.system is created_by: who made the record, {id, name}, filled by the store from the record's writer on read and never typed\" },\n { kind: \"currency\", behavior: \"range\", parity: true, made_of: \"FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation\" },\n { kind: \"datetime\", behavior: \"range\", parity: true, made_of: \"a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question\" },\n { kind: \"duration\", behavior: \"range\", parity: false, made_of: \"P4: behaviour range, format duration, unit seconds; a length of time kept as seconds, never below zero\" },\n { kind: \"email\", behavior: \"text\", parity: true, made_of: \"text whose format is email\" },\n { kind: \"entity_reference\", behavior: \"relation\", parity: false, made_of: \"SC-R / P12: a relation whose target mode is any (REL-8), restricted by config.allowed_types to the platform kinds it may name (custom.entity_reference_kinds() — agents, notes, web sites, workbooks, datasets, conversations …); each value is {token, id}, the edge a platform.associations row record → <token>. File and Person stay relations to their kernel Tables\" },\n { kind: \"formula\", behavior: \"formula\", parity: true, made_of: \"FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval\" },\n { kind: \"long_text\", behavior: \"text\", parity: false, made_of: \"behaviour text with format long and config.multiline, for several lines rather than one\" },\n { kind: \"lookup\", behavior: \"formula\", parity: true, made_of: \"a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side\" },\n { kind: \"member\", behavior: \"relation\", parity: true, made_of: \"a person: a relation whose target is the kernel `Person` Table\" },\n { kind: \"modified_by\", behavior: \"formula\", parity: false, made_of: \"P4: a formula Field whose config.system is modified_by: who last changed the record, {id, name}, filled by the store on read and never typed\" },\n { kind: \"multi_select\", behavior: \"list\", parity: true, made_of: \"many choices from the same Table — the multi modifier, never a second behaviour\" },\n { kind: \"number\", behavior: \"range\", parity: false, made_of: \"a plain number: behaviour range with no date kind and neither the currency nor the percent format\" },\n { kind: \"percent\", behavior: \"range\", parity: true, made_of: \"a number whose unit is % and whose format is percent\" },\n { kind: \"phone\", behavior: \"text\", parity: true, made_of: \"text whose format is phone\" },\n { kind: \"rating\", behavior: \"range\", parity: false, made_of: \"P4: behaviour range, format rating; a whole number of stars from 0 to its max Rule (1 to 10, default 5), shown as stars\" },\n { kind: \"relation\", behavior: \"relation\", parity: false, made_of: \"REL / FLD-11: a relation a person aims themselves — relation_target names a Table of this organization, and it is a BEHAVIOUR, never a parity type of its own\" },\n { kind: \"rich_text\", behavior: \"text\", parity: false, made_of: \"P4: behaviour text, format rich_text; Markdown with no raw HTML and no script links, shown formatted\" },\n { kind: \"rollup\", behavior: \"formula\", parity: true, made_of: \"an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice\" },\n { kind: \"select\", behavior: \"list\", parity: true, made_of: \"one choice from a Table shown as a list (FLD-5/FLD-6)\" },\n { kind: \"signature\", behavior: \"text\", parity: false, made_of: \"VAL-10: behaviour text whose format is signature — the one shape custom.doc_sign accepts, sealed by custom.doc_signature_write and checked by custom.doc_signature_intact\" },\n { kind: \"status\", behavior: \"list\", parity: false, made_of: \"P4: a single-choice list with format status; config.status_groups puts each choice key in todo, in_progress or done (Notion's Status)\" },\n { kind: \"text\", behavior: \"text\", parity: false, made_of: \"plain text: behaviour text with no format — it carries no parity type, which is exactly what custom.parity_type answers for it\" },\n { kind: \"url\", behavior: \"text\", parity: true, made_of: \"text whose format is url, with the pattern Rule that makes the format enforceable\" },\n] as const;\n\n/** The node kinds `custom.rule_eval` evaluates, and the lane that owns each. */\nexport const RULE_NODE_KINDS = [\n { node: \"actor_at_least\", evaluated_by: \"PIPELINES\" },\n { node: \"add\", evaluated_by: \"W1-RULE\" },\n { node: \"and\", evaluated_by: \"W1-RULE\" },\n { node: \"concat\", evaluated_by: \"W1-RULE\" },\n { node: \"const\", evaluated_by: \"W1-RULE\" },\n { node: \"div\", evaluated_by: \"W1-RULE\" },\n { node: \"eq\", evaluated_by: \"W1-RULE\" },\n { node: \"field\", evaluated_by: \"W1-RULE\" },\n { node: \"fx.abs\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.add\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.and\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.arraycompact\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.arrayjoin\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.autonumber\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.average\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.blank\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.concatenate\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.contains\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.created_time\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.dateadd\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.datediff\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.datetime_format\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.day\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.div\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.eq\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.find\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.gt\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.gte\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.if\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.isblank\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.left\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.len\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lower\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lt\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.lte\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.max\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.min\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.mod\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.modified_time\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.month\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.mul\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.ne\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.neg\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.not\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.now\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.or\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.regex_match\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.right\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.round\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.sub\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.substitute\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.sum\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.switch\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.today\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.trim\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.upper\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.workday\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"fx.year\", evaluated_by: \"GRID-PRIMITIVES G3 (custom.formula_eval)\" },\n { node: \"gt\", evaluated_by: \"W1-RULE\" },\n { node: \"gte\", evaluated_by: \"W1-RULE\" },\n { node: \"length\", evaluated_by: \"W1-RULE\" },\n { node: \"lt\", evaluated_by: \"W1-RULE\" },\n { node: \"lte\", evaluated_by: \"W1-RULE\" },\n { node: \"matches\", evaluated_by: \"W1-RULE\" },\n { node: \"merge_field\", evaluated_by: \"W5-MERGE-B\" },\n { node: \"mul\", evaluated_by: \"W1-RULE\" },\n { node: \"ne\", evaluated_by: \"W1-RULE\" },\n { node: \"not\", evaluated_by: \"W1-RULE\" },\n { node: \"or\", evaluated_by: \"W1-RULE\" },\n { node: \"parent_field\", evaluated_by: \"W1-RULE-APPLY\" },\n { node: \"present\", evaluated_by: \"W1-RULE\" },\n { node: \"previous\", evaluated_by: \"PIPELINES\" },\n { node: \"sibling_count\", evaluated_by: \"STAGE-RULES\" },\n { node: \"stage_count\", evaluated_by: \"PIPELINES\" },\n { node: \"sub\", evaluated_by: \"W1-RULE\" },\n { node: \"within\", evaluated_by: \"CHAIR-FILTER\" },\n] as const;\n\n/** REC-27. The kernel, by name and by id, as the store holds it. */\nexport const KERNEL_TABLES = [\n { id: \"11111111-0000-4000-8000-000000000002\", name: \"Field\" },\n { id: \"11111111-0000-4000-8000-000000000006\", name: \"File\" },\n { id: \"11111111-0000-4000-8000-000000000009\", name: \"Merge Field\" },\n { id: \"11111111-0000-4000-8000-000000000004\", name: \"Organization\" },\n { id: \"11111111-0000-4000-8000-000000000005\", name: \"Person\" },\n { id: \"11111111-0000-4000-8000-000000000007\", name: \"Presentation\" },\n { id: \"11111111-0000-4000-8000-000000000003\", name: \"Rule\" },\n { id: \"11111111-0000-4000-8000-000000000001\", name: \"Table\" },\n { id: \"11111111-0000-4000-8000-000000000008\", name: \"Widget\" },\n] as const;\n\n/**\n * Every door the store actually has, with the argument list and the result the\n * catalogue reports. A client call whose door is not in this list is answered\n * `door_absent` by name — never a guess, never a silent no-op.\n */\nexport const STORE_DOORS = [\n { name: \"absence_reasons\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"action_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_actions jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"action_run\", args: \"p_organization_id uuid, p_action_id uuid, p_record_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"actor_vocabulary\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"actor_word\", args: \"p_declared text\", returns: \"text\", security: \"invoker\" },\n { name: \"addressed_cap\", args: \"p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"addressed_cap_specific\", args: \"p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"agent_change_approval\", args: \"p_organization uuid, p_conversation uuid DEFAULT NULL::uuid, p_table uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agent_change_trust\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agent_context\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agent_context_value\", args: \"p_doc jsonb, p_key text, p_type text, p_organization_id uuid, p_record_id uuid, p_cap bigint\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agent_context_value_cap\", args: \"p_organization_id uuid\", returns: \"bigint\", security: \"invoker\" },\n { name: \"agent_table_claim\", args: \"p_organization uuid, p_table uuid, p_conversation uuid DEFAULT NULL::uuid\", returns: \"void\", security: \"definer\" },\n { name: \"agg_assert_key\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_bucket_ordinal\", args: \"p_by text, p_window_from timestamp without time zone, p_at timestamp without time zone, p_week_start text\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_buckets\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_cadence_normalize\", args: \"p_cadence text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_calendar\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_compare_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_compare_windows\", args: \"p_organization_id uuid, p_compare jsonb, p_bucket jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_deliver\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb DEFAULT '{}'::jsonb, p_dedupe_suffix text DEFAULT NULL::text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"agg_deliver_quietly\", args: \"p_organization_id uuid, p_rule_id uuid, p_subject_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb, p_quiet_hours jsonb, p_link text, p_dedupe_suffix text DEFAULT NULL::text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"agg_delta\", args: \"p_current jsonb, p_prior jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_digest_assemble\", args: \"p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone, p_until timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_digest_due_at\", args: \"p_cadence text, p_schedule text, p_quiet jsonb, p_after timestamp with time zone\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_digest_judged_at\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_digest_run\", args: \"p_organization_id uuid, p_rule_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_run_at\", args: \"p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone, p_now timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_tick\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_digest_tick_at\", args: \"p_now timestamp with time zone, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_explain\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"agg_field_kind\", args: \"p_organization_id uuid, p_table_id uuid, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_field_value_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_fields_readable_assert\", args: \"p_organization_id uuid, p_table_id uuid, p_keys text[], p_required text DEFAULT 'viewer'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"agg_group_value\", args: \"p_value text, p_kind text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_last_digest_at\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_local_label\", args: \"p_local timestamp without time zone, p_tz text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_moment_sql\", args: \"p_key text, p_tz text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_operations\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_parse_moment\", args: \"p_raw text, p_tz text, p_what text\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_period_start\", args: \"p_local timestamp without time zone, p_by text, p_week_start text DEFAULT 'monday'::text\", returns: \"timestamp without time zone\", security: \"invoker\" },\n { name: \"agg_period_step\", args: \"p_by text\", returns: \"interval\", security: \"invoker\" },\n { name: \"agg_quiet_until\", args: \"p_quiet jsonb, p_at timestamp with time zone\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"agg_record_name\", args: \"p_organization_id uuid, p_record_id uuid, p_state jsonb DEFAULT NULL::jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_window jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_subscription_cadences\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"agg_subscription_fire\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_changed_field_ids jsonb DEFAULT '[]'::jsonb\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscription_fire_entered\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscription_tick\", args: \"p_window interval DEFAULT '00:15:00'::interval\", returns: \"integer\", security: \"invoker\" },\n { name: \"agg_subscriptions\", args: \"p_organization_id uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_cadence text DEFAULT NULL::text\", returns: \"TABLE(rule_id uuid, saved_view_id uuid, table_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, name text)\", security: \"invoker\" },\n { name: \"agg_value_sql\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_value_text\", args: \"p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"agg_view_admits\", args: \"p_organization_id uuid, p_saved_view_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"agg_view_admits_state\", args: \"p_definition jsonb, p_state jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"agg_withheld_marker\", args: \"p_organization_id uuid, p_table_id uuid, p_key text, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"agg_zero\", args: \"p_measures jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"anon_capture\", args: \"p_organization_id uuid, p_client_key text, p_table_id uuid, p_payload jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_clear\", args: \"p_organization_id uuid, p_submission_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_inbound_land\", args: \"p_address text, p_secret text, p_payload jsonb, p_raw_payload jsonb DEFAULT '{}'::jsonb, p_client_key text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"anon_publish\", args: \"p_organization_id uuid, p_form_id uuid, p_published boolean DEFAULT true\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"anon_rate_take\", args: \"p_organization_id uuid, p_form_id uuid, p_bucket text, p_token_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"anon_submissions\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, form_id uuid, inbound_id uuid, table_id uuid, source text, state text, payload jsonb, raw_payload jsonb, client_key text, record_id uuid, remote_origin text, rejection_reason text, created_at timestamp with time zone, cleared_at timestamp with time zone)\", security: \"definer\" },\n { name: \"anon_token_issue\", args: \"p_organization_id uuid, p_mode text, p_allowed_origins jsonb, p_form_id uuid DEFAULT NULL::uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid, p_expires_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"TABLE(token_id uuid, secret text)\", security: \"definer\" },\n { name: \"anon_token_revoke\", args: \"p_organization_id uuid, p_token_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"anon_token_verify\", args: \"p_secret text, p_origin text, p_required_mode text\", returns: \"TABLE(token_id uuid, organization_id uuid, form_id uuid, saved_view_id uuid, record_id uuid, mode text)\", security: \"definer\" },\n { name: \"anon_write\", args: \"p_secret text, p_origin text, p_payload jsonb, p_client_key text DEFAULT NULL::text, p_raw_payload jsonb DEFAULT '{}'::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"applicable_fields\", args: \"p_organization_id uuid, p_table_id uuid, p_record_type text DEFAULT NULL::text\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"archive_event_of\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"history.migration_log\", security: \"definer\" },\n { name: \"archived_tables_everywhere\", args: \"p_lane text DEFAULT 'org'::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_sort text DEFAULT 'archived_at'::text, p_desc boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"assert_client_may_change\", args: \"p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'editor'::permission_level, p_subject_word text DEFAULT 'record'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_client_may_open\", args: \"p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'viewer'::permission_level, p_subject_word text DEFAULT 'record'::text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_client_may_reach\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_columns_are_defined\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb\", returns: \"void\", security: \"definer\" },\n { name: \"assert_entity_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_entity_is_organization_scoped\", args: \"p_token text, p_label text, p_scoped boolean\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_may_know_table\", args: \"p_organization_id uuid, p_table_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_organization_admin\", args: \"p_organization_id uuid, p_door text, p_what text\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_organization_wall\", args: \"p_kind text, p_organization_id uuid, p_row jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"assert_public_reader_names_a_public_table\", args: \"p_organization_id uuid, p_table_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_scope_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"definer\" },\n { name: \"assert_store_door\", args: \"p_organization_id uuid, p_door text\", returns: \"void\", security: \"invoker\" },\n { name: \"automation_archive\", args: \"p_organization_id uuid, p_automation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"automation_restore\", args: \"p_organization_id uuid, p_automation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"automation_set_enabled\", args: \"p_organization_id uuid, p_automation_id uuid, p_enabled boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"automations\", args: \"p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"autonumber_backfill\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"barcode_symbologies\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { 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\" },\n { name: \"booking_confirm\", args: \"p_form_id uuid, p_hold_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(booking_ref text, record_id uuid, submission_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"booking_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_availability jsonb DEFAULT '{}'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_home_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"booking_hold\", args: \"p_form_id uuid, p_slot_key text, p_origin text, p_bucket text, p_client_key text DEFAULT NULL::text\", returns: \"TABLE(hold_id uuid, slot_key text, expires_at timestamp with time zone, member_user_id uuid, state text, message text)\", security: \"definer\" },\n { name: \"booking_manage\", args: \"p_booking_ref text, p_days integer DEFAULT NULL::integer\", returns: \"TABLE(booking_ref text, form_id uuid, title text, slot_key text, slot_at timestamp with time zone, status text, slots jsonb, availability jsonb, state text, message text)\", security: \"definer\" },\n { name: \"booking_notify\", args: \"p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid, p_event text, p_when text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"booking_public\", args: \"p_form_id uuid, p_days integer DEFAULT NULL::integer\", returns: \"TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, availability jsonb, slots jsonb, state text, message text)\", security: \"definer\" },\n { name: \"booking_reschedule\", args: \"p_booking_ref text, p_slot_key text, p_origin text, p_bucket text DEFAULT NULL::text\", returns: \"TABLE(booking_ref text, record_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"bookings\", 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, slot_minutes integer, timezone text, slot_table_id uuid, booked bigint, cancelled bigint, upcoming bigint, held bigint, next_at timestamp with time zone, state text)\", security: \"definer\" },\n { name: \"bump_epoch\", args: \"p_entity_type text, p_entity_id uuid, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"bigint\", security: \"definer\" },\n { name: \"cache_lookup\", args: \"p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid\", returns: \"permission_level\", security: \"definer\" },\n { name: \"caller_role\", args: \"\", returns: \"name\", security: \"invoker\" },\n { name: \"capture_open\", args: \"p_organization_id uuid, p_sheet_id uuid\", returns: \"TABLE(sheet_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, state text, may_capture boolean, message text)\", security: \"definer\" },\n { name: \"capture_publish\", args: \"p_organization_id uuid, p_sheet_id uuid, p_open boolean DEFAULT true\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"capture_sheet_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_sheet_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"capture_sheets\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(sheet_id uuid, table_id uuid, title text, slug text, state text, opened_at timestamp with time zone, captures bigint, replays bigint, last_capture_at timestamp with time zone, presentation jsonb)\", security: \"definer\" },\n { name: \"capture_submit\", args: \"p_organization_id uuid, p_sheet_id uuid, p_client_key text, p_payload jsonb, p_files jsonb DEFAULT '[]'::jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_location jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(record_id uuid, state text, message text, replay boolean, file_ids uuid[])\", security: \"definer\" },\n { name: \"carry_unchanged_value_stamps\", args: \"p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"carrying_edges_in\", args: \"p_organization_id uuid\", returns: \"TABLE(container_type text, container_id uuid, item_type text, item_id uuid, conveys_max permission_level)\", security: \"definer\" },\n { name: \"carrying_edges_of\", args: \"p_item_type text, p_item_id uuid\", returns: \"TABLE(container_type text, container_id uuid, conveys_max permission_level)\", security: \"definer\" },\n { name: \"checklist_declare\", args: \"p_organization_id uuid, p_spec jsonb, p_template_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_refusal\", args: \"p_spec jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"checklist_run\", args: \"p_organization_id uuid, p_run_id uuid\", returns: \"TABLE(step_id uuid, step_order integer, ref text, title text, role text, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, finished boolean, requires text, requires_key text, requires_label text, requires_id uuid, evidence jsonb, blocked_by text[], may_complete boolean, refusal text)\", security: \"definer\" },\n { name: \"checklist_runs\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_include_closed boolean DEFAULT true, p_limit integer DEFAULT 100\", returns: \"TABLE(run_id uuid, name text, template_id uuid, template text, about_record_id uuid, about text, about_table_id uuid, started_at timestamp with time zone, started_by uuid, origin text, step_count integer, done integer, overdue integer, next_step text, next_due timestamp with time zone, closed_at timestamp with time zone)\", security: \"definer\" },\n { name: \"checklist_start\", args: \"p_organization_id uuid, p_template_id uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_roles jsonb DEFAULT '{}'::jsonb, p_starting_at timestamp with time zone DEFAULT NULL::timestamp with time zone\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_step_complete\", args: \"p_organization_id uuid, p_step_id uuid, p_evidence jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_step_refusal\", args: \"p_organization_id uuid, p_step_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"checklist_steps_table\", args: \"p_organization_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"checklist_template_shape\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"checklist_templates\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, roles integer, trigger_kind text, trigger_status text, open_runs integer, total_runs integer, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"checklist_templates_archived\", args: \"p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, archived_at timestamp with time zone, archived_by uuid, table_archived boolean)\", security: \"definer\" },\n { name: \"choice_census\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"choice_field_map\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_filter_normalize\", args: \"p_map jsonb, p_filter jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_key_for\", args: \"p_organization_id uuid, p_options_table_id uuid, p_title text, p_exclude uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_key_of\", args: \"p_field jsonb, p_token text\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_nudge\", args: \"p_organization_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"choice_options\", args: \"p_organization_id uuid, p_options_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_groups\", args: \"p_map jsonb, p_groups jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_note\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_plan\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_value\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_render_with\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"choice_slug\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"choice_synonyms\", args: \"p_organization_id uuid, p_table_id uuid, p_token text\", returns: \"text[]\", security: \"invoker\" },\n { name: \"choice_synonyms_in\", args: \"p_map jsonb, p_token text\", returns: \"text[]\", security: \"invoker\" },\n { name: \"choice_value_keys\", args: \"p_field jsonb, p_value jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"choice_words\", args: \"p_field jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"client_write_grants\", args: \"\", returns: \"TABLE(role_name text, object_name text, privilege text)\", security: \"invoker\" },\n { name: \"comment_mention_deliver\", args: \"p_organization_id uuid, p_record_id uuid, p_table_id uuid, p_comment_id uuid, p_recipient uuid, p_author_name text, p_record_title text, p_body text\", returns: \"uuid\", security: \"definer\" },\n { name: \"comment_thread\", args: \"p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"comment_write\", args: \"p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid, p_mentions uuid[] DEFAULT NULL::uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"computed_block\", args: \"p_block jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"computed_provenance\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)\", security: \"definer\" },\n { name: \"confidential_anchor\", args: \"p_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"confidential_answer\", args: \"p_user uuid, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"confidential_header\", args: \"p_user uuid, p_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"confidential_names\", args: \"p_organization_id uuid, p_value jsonb, p_user uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"containment_chain\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(ancestor_id uuid, depth integer)\", security: \"invoker\" },\n { name: \"containment_depth_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"containment_edges\", args: \"p_organization_id uuid\", returns: \"TABLE(parent_id uuid, child_id uuid, via text)\", security: \"invoker\" },\n { name: \"containment_parent\", args: \"p_data jsonb\", returns: \"uuid\", security: \"invoker\" },\n { name: \"context_archived_types\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_class_for_checkout\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_compare_facts\", args: \"p_user_id uuid, p_record_ids uuid[], p_item_ids uuid[] DEFAULT NULL::uuid[], p_cells jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_archive\", args: \"p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_restore\", args: \"p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_item_row_of\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_item_write\", args: \"p_item_id uuid, p_scope_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_items\", args: \"p_scope_type_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_policy_rank\", args: \"p_policy text\", returns: \"integer\", security: \"invoker\" },\n { name: \"context_resolve\", args: \"p_bindings jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_archive\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_restore\", args: \"p_scope_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scope_write\", args: \"p_organization_id uuid, p_scope_id uuid, p_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_scopes\", args: \"p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_system_items\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tags_set\", args: \"p_entity_type text, p_entity_id uuid, p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_template_define\", args: \"p_organization_id uuid, p_definition jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_templates\", args: \"\", returns: \"SETOF jsonb\", security: \"invoker\" },\n { name: \"context_tree\", args: \"p_organization_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_search\", args: \"p_organization_ids uuid[], p_query text, p_limit integer DEFAULT 100\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_type_scopes\", args: \"p_scope_type_id uuid, p_offset integer DEFAULT 0, p_limit integer DEFAULT 200\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_tree_types\", args: \"p_organization_ids uuid[], p_with_counts boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_archive\", args: \"p_type_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_restore\", args: \"p_type_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_type_write\", args: \"p_organization_id uuid, p_type_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_value_write\", args: \"p_payload jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"context_values\", args: \"p_scope_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"context_writer\", args: \"p_organization_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"conversation_scope\", args: \"p_organization_id uuid, p_conversation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_bind\", args: \"p_organization_id uuid, p_conversation_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_context\", args: \"p_organization_id uuid, p_conversation_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8\", returns: \"jsonb\", security: \"definer\" },\n { name: \"conversation_scope_unbind\", args: \"p_organization_id uuid, p_conversation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"count_records_archived\", args: \"p_organization_id uuid, p_table_ids uuid[], p_lane text DEFAULT 'org'::text\", returns: \"TABLE(table_id uuid, n integer)\", security: \"definer\" },\n { name: \"cross_organization_links_open\", args: \"p_source_organization_id uuid, p_target_organization_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"custom_fields_tables\", args: \"\", returns: \"TABLE(token text, schema_name text, table_name text)\", security: \"invoker\" },\n { name: \"dashboard_block_normalize\", args: \"p_organization_id uuid, p_subject_table_id uuid, p_block jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dashboard_class\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboard_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_name text, p_blocks jsonb DEFAULT '[]'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_dashboard_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"dashboard_delete\", args: \"p_organization_id uuid, p_dashboard_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"dashboard_field_keys\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"dashboard_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"dashboard_moment_sql\", args: \"p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboard_restore\", args: \"p_organization_id uuid, p_dashboard_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"dashboard_run\", args: \"p_organization_id uuid, p_dashboard_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_compare jsonb DEFAULT NULL::jsonb, p_grain text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dashboard_stuck\", args: \"p_organization_id uuid, p_table_id uuid, p_state_key text, p_days integer DEFAULT 14, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 50, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, title text, state text, last_changed_at timestamp with time zone, days_unchanged numeric, measured_from text)\", security: \"definer\" },\n { name: \"dashboard_target_field_assert\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text\", returns: \"void\", security: \"invoker\" },\n { name: \"dashboard_window_sql\", args: \"p_key text, p_window jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"dashboards\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(dashboard_id uuid, table_id uuid, name text, blocks jsonb, presentation jsonb, block_count integer, version integer, created_at timestamp with time zone, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"data_home\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"data_home_changed_by\", args: \"p_asks jsonb\", returns: \"TABLE(organization_id uuid, id uuid, at timestamp with time zone, who text)\", security: \"definer\" },\n { name: \"data_home_items\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)\", security: \"definer\" },\n { name: \"data_home_slim\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_app_tables boolean DEFAULT false\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"data_home_tables\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)\", security: \"definer\" },\n { name: \"data_home_tables\", args: \"p_organization_id uuid, p_include_app_tables boolean\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, kept_by_the_app boolean, kind text, team boolean, system boolean, created_by uuid)\", security: \"invoker\" },\n { name: \"declared_conversation\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"decoration_colors\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"decoration_rule_ops\", args: \"\", returns: \"TABLE(op text, takes_value boolean, label text)\", security: \"invoker\" },\n { name: \"delete_cascade_closure\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid[]\", security: \"invoker\" },\n { name: \"delete_preview\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"delete_rule\", args: \"p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"dependency_cycle\", args: \"p_organization_id uuid, p_row custom.record\", returns: \"text[]\", security: \"invoker\" },\n { name: \"dependency_label\", args: \"p_organization_id uuid, p_node text\", returns: \"text\", security: \"invoker\" },\n { name: \"derive_visibility\", args: \"p_container_type text, p_container_id uuid\", returns: \"TABLE(item_type text, item_id uuid, depth integer, max_level permission_level)\", security: \"definer\" },\n { name: \"derived_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"derived_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"derived_values_of\", args: \"v_rec custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"display_format_ids\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"doc_content_hash\", args: \"p_body text\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_format_value\", args: \"p_field_data jsonb, p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_letterhead\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_name_token_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_name_tokens\", args: \"p_body text\", returns: \"TABLE(ordinal integer, raw text)\", security: \"invoker\" },\n { name: \"doc_render_body\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_render_document\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_render_read\", args: \"p_organization_id uuid, p_render_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_render_write\", args: \"p_organization_id uuid, p_template_id uuid, p_record_id uuid, p_table_id uuid, p_template_version integer, p_body text, p_content_hash text\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_renders\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(render_id uuid, template_id uuid, record_id uuid, table_id uuid, template_version integer, body text, content_hash text, rendered_at timestamp with time zone)\", security: \"definer\" },\n { name: \"doc_sign\", args: \"p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_signature_field_ok\", args: \"p_field_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"doc_signature_intact\", args: \"p_organization_id uuid, p_signature_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"doc_signature_read\", args: \"p_organization_id uuid, p_signature_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_signature_write\", args: \"p_organization_id uuid, p_render_id uuid, p_record_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid, p_document_hash text, p_document_version integer\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_signatures\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(signature_id uuid, render_id uuid, record_id uuid, field_key text, signer_name text, signer_user_id uuid, signed_at timestamp with time zone, document_hash text, document_version integer)\", security: \"definer\" },\n { name: \"doc_template_delete\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"doc_template_read\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"doc_template_restore\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"doc_template_save\", args: \"p_organization_id uuid, p_table_id uuid, p_name text, p_body text, p_template_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"doc_templates\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(template_id uuid, renders_table_id uuid, name text, body text, template_version integer, token_count bigint, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"doc_token_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"doc_tokens\", args: \"p_body text\", returns: \"TABLE(ordinal integer, raw text, field_id uuid)\", security: \"invoker\" },\n { name: \"doc_unresolved_tokens\", args: \"p_organization_id uuid, p_table_id uuid, p_body text\", returns: \"TABLE(raw text, field_id uuid, why text)\", security: \"invoker\" },\n { name: \"door_reads_only\", args: \"p_door text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"doors_not_deciding_the_caller\", args: \"\", returns: \"TABLE(function_name text, identity_args text)\", security: \"invoker\" },\n { name: \"doors_not_deciding_the_record\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_not_masking_fields\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_not_on_one_ladder\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"doors_refusing_in_another_doors_name\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"enrich_declare\", args: \"p_organization_id uuid, p_field_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { 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\" },\n { name: \"enrich_land\", args: \"p_organization_id uuid, p_field_id uuid, p_results jsonb, p_run jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_normalize\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_pin\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_pinned boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"enrich_run_class\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"enrich_runs\", args: \"p_organization_id uuid, p_field_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50\", returns: \"TABLE(run_id uuid, field_id uuid, field_key text, model text, trigger_word text, rows_seen integer, rows_written integer, rows_absent integer, rows_below_floor integer, rows_pinned integer, rows_refused integer, cost_cents numeric, cost_per_row_cents numeric, ran_at timestamp with time zone)\", security: \"definer\" },\n { name: \"enrich_sensitivity_rank\", args: \"p_word text\", returns: \"integer\", security: \"invoker\" },\n { name: \"enrich_triggers\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"enrichments\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(field_id uuid, table_id uuid, field_key text, label text, enrichment jsonb, enabled boolean, review_interval_days integer, rows_total integer, rows_filled integer, rows_stale integer, rows_pinned integer, rows_absent integer, runs integer, cost_cents numeric, cost_per_row_cents numeric, last_run_at timestamp with time zone, last_run jsonb)\", security: \"definer\" },\n { name: \"entity_back_links\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_limit integer DEFAULT 50, p_cursor text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_declare\", args: \"p_organization_id uuid, p_token text, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_field_protect_arman_explicitly_approved\", args: \"p_field_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_retire\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_field_rights\", args: \"p_organization_id uuid, p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_field_update\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"entity_fields\", args: \"p_organization_id uuid, p_token text\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"entity_fields_across\", args: \"p_token text, p_organization_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_read_mask\", args: \"p_organization_id uuid, p_token text, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_record_home\", args: \"p_token text, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_record_read\", args: \"p_organization_id uuid, p_token text, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_records_find\", args: \"p_organization_id uuid, p_token text, p_key text, p_value jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_kinds\", args: \"\", returns: \"TABLE(token text, label text, category text)\", security: \"definer\" },\n { name: \"entity_reference_render\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_render_with\", args: \"p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_rows\", args: \"p_organization_id uuid, p_token text, p_ids uuid[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_reference_search\", args: \"p_organization_id uuid, p_tokens text[], p_search text DEFAULT NULL::text, p_limit integer DEFAULT 20\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_reference_target\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_reference_words\", args: \"p_organization_id uuid, p_refs jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"entity_row_propose\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean, p_note text DEFAULT NULL::text, p_conversation_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_row_write\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"entity_seat_level\", args: \"p_organization_id uuid, p_token text, p_record_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"entity_table\", args: \"p_token text\", returns: \"TABLE(token text, schema_name text, table_name text, type text, title_column text, label text, has_organization boolean, has_deleted_at boolean)\", security: \"definer\" },\n { name: \"entity_value_write\", args: \"p_organization_id uuid, p_token text, p_record_id uuid, p_patch jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"export_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"export_records\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000\", returns: \"TABLE(id uuid, document jsonb)\", security: \"invoker\" },\n { name: \"external_foreign_table_findings\", args: \"\", returns: \"SETOF text\", security: \"definer\" },\n { name: \"external_history_event\", args: \"p_organization_id uuid, p_link_id uuid, p_operation text\", returns: \"bigint\", security: \"definer\" },\n { name: \"external_rows\", args: \"p_organization_id uuid, p_source_id uuid\", returns: \"SETOF jsonb\", security: \"definer\" },\n { name: \"external_source_declare\", args: \"p_organization_id uuid, p_tier text, p_connection_token text, p_external_schema text, p_external_table text, p_link_template text\", returns: \"uuid\", security: \"definer\" },\n { name: \"external_stub_upsert\", args: \"p_organization_id uuid, p_source_id uuid, p_table_id uuid, p_external_key text, p_link_url text, p_cached_title text\", returns: \"uuid\", security: \"definer\" },\n { name: \"external_tier_contract\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"external_write_through\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb\", returns: \"void\", security: \"definer\" },\n { name: \"external_writes_set\", args: \"p_organization_id uuid, p_source_id uuid, p_enabled boolean\", returns: \"boolean\", security: \"definer\" },\n { name: \"far_value\", args: \"p_organization_id uuid, p_record_id uuid, p_key text, p_reader jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"field_access\", args: \"p_user uuid, p_field_id uuid, p_token text, p_row_id uuid, p_action text, p_audit boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_add_rung\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"field_behaviour\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_choice_usage\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_context_policy_floor\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid\", returns: \"TABLE(context_policy text, reads jsonb)\", security: \"definer\" },\n { name: \"field_cycle\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"field_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"field_is_protected\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"field_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"field_kind_of\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_kinds\", args: \"\", returns: \"TABLE(kind text, behavior text, parity boolean, made_of text)\", security: \"invoker\" },\n { name: \"field_options\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"SETOF custom.record\", security: \"definer\" },\n { name: \"field_protection_refusal\", args: \"p_op text, p_old jsonb, p_new jsonb, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"field_restore\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"field_retire\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"field_rules\", args: \"p_field_data jsonb\", returns: \"TABLE(kind text, spec jsonb)\", security: \"invoker\" },\n { name: \"field_sensitivity_floor\", args: \"p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid\", returns: \"TABLE(sensitivity text, reads jsonb)\", security: \"definer\" },\n { name: \"field_source_archived\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_update\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"field_update_rehoming_choices\", args: \"p_organization_id uuid, p_field_id uuid, p_patch jsonb, p_rehome jsonb DEFAULT NULL::jsonb, p_cells_back jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"field_value_convert\", args: \"p_to jsonb, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"field_value_kind\", args: \"p_organization_id uuid, p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"field_words\", args: \"p_organization_id uuid, p_field_id uuid, p_value jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"file_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"filter_is_rule\", args: \"p_filter jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"form_archive\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"form_draft_read\", args: \"p_form_id uuid, p_secret text\", returns: \"TABLE(answers jsonb, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"form_draft_save\", args: \"p_form_id uuid, p_answers jsonb, p_secret text DEFAULT NULL::text, p_bucket text DEFAULT NULL::text, p_origin text DEFAULT NULL::text\", returns: \"TABLE(draft_secret text, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)\", security: \"definer\" },\n { name: \"form_look_options\", args: \"p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_notify\", args: \"p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { 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\" },\n { name: \"form_public_route\", args: \"p_form_id uuid, p_values jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_redirect_domains\", args: \"p_organization_id uuid\", returns: \"text[]\", security: \"invoker\" },\n { name: \"form_redirect_refusal\", args: \"p_organization_id uuid, p_url text\", returns: \"text\", security: \"invoker\" },\n { name: \"form_restore\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_results\", args: \"p_organization_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"form_slug\", args: \"p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"invoker\" },\n { 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\" },\n { name: \"form_theme_options\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"form_visit\", args: \"p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text\", returns: \"text\", security: \"definer\" },\n { 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\" },\n { 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\" },\n { name: \"formula_compile_sql\", args: \"p_organization_id uuid, p_expr jsonb, p_values_sql text\", returns: \"text\", security: \"invoker\" },\n { name: \"formula_eval\", args: \"p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"formula_field_keys\", args: \"p_organization_id uuid, p_expr jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"formula_node_kinds\", args: \"\", returns: \"TABLE(node text, min_args integer, max_args integer, result text, signature text, says text)\", security: \"invoker\" },\n { name: \"formula_parse\", args: \"p_organization_id uuid, p_table_id uuid, p_text text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"formula_result_kind\", args: \"p_organization_id uuid, p_expr jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"formula_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"freshness_verdict\", args: \"p_written_at timestamp with time zone, p_ceiling_seconds numeric\", returns: \"jsonb\", security: \"definer\" },\n { name: \"grid_layout\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"grid_layout_check\", args: \"p_layout jsonb, p_scope text DEFAULT 'view'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"guard_refusals_are_complete\", args: \"\", returns: \"TABLE(guard text, said text)\", security: \"invoker\" },\n { name: \"has_visibility\", args: \"p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"has_visibility_at\", args: \"p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_organization_id uuid DEFAULT NULL::uuid, p_min_version bigint DEFAULT NULL::bigint\", returns: \"boolean\", security: \"definer\" },\n { name: \"hidden_field_notice\", args: \"p_field custom.record, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_actor\", args: \"p_tier text, p_document jsonb, p_actor_id uuid, p_people jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_changes\", args: \"p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_people\", args: \"p_organization_id uuid, p_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_prune\", args: \"p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_restore_body\", args: \"p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_restore_body\", args: \"p_current jsonb, p_target jsonb, p_field_key text, p_author jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"history_retention\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"history_retention_floor_raise\", args: \"p_organization_id uuid, p_days integer\", returns: \"integer\", security: \"definer\" },\n { name: \"history_retention_set\", args: \"p_organization_id uuid, p_table_id uuid, p_days integer\", returns: \"integer\", security: \"definer\" },\n { name: \"home_add\", args: \"p_organization_id uuid, p_table_id uuid, p_home_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"home_relations\", args: \"\", returns: \"TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)\", security: \"invoker\" },\n { name: \"hub_changed_by\", args: \"p_organization_id uuid, p_kind text, p_ids uuid[]\", returns: \"TABLE(id uuid, at timestamp with time zone, who text)\", security: \"definer\" },\n { name: \"inbound_addresses\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_domain\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"inbound_mail_land\", args: \"p_address text, p_mail jsonb, p_secret text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbound_mail_map\", args: \"p_organization_id uuid, p_table_id uuid, p_mail jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"inbound_set\", args: \"p_organization_id uuid, p_inbound_id uuid, p_enabled boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_clear\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_counts\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(organization_id uuid, organization_name text, waiting integer, snoozed integer, cleared integer, overdue integer, oldest_waiting_at timestamp with time zone)\", security: \"definer\" },\n { name: \"inbox_remind_tick\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"inbox_snooze\", args: \"p_organization_id uuid, p_item_id uuid, p_until timestamp with time zone\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_unclear\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"inbox_unsnooze\", args: \"p_organization_id uuid, p_item_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"index_payload\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000\", returns: \"TABLE(id uuid, searchable text)\", security: \"invoker\" },\n { name: \"intern_provenance\", args: \"p_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_cell\", args: \"p_organization_id uuid, p_field jsonb, p_word text, p_date_order text DEFAULT 'mdy'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_actor\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_fields\", args: \"p_keys text[], p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_change_via\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"io_changed_field_ids\", args: \"p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_changed_keys\", args: \"p_old jsonb, p_new jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"io_comment_resolve\", args: \"p_organization_id uuid, p_comment_id uuid, p_resolved boolean DEFAULT true\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_comment_write\", args: \"p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_comments\", args: \"p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false\", returns: \"TABLE(id uuid, body text, anchor jsonb, parent_comment_id uuid, created_by uuid, created_at timestamp with time zone, resolved_at timestamp with time zone, resolved_by uuid)\", security: \"definer\" },\n { name: \"io_csv_escape\", args: \"p_value text, p_delimiter text DEFAULT ','::text\", returns: \"text\", security: \"invoker\" },\n { name: \"io_csv_parse\", args: \"p_text text, p_delimiter text DEFAULT NULL::text\", returns: \"TABLE(row_number integer, cells text[])\", security: \"invoker\" },\n { name: \"io_export\", args: \"p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_export_csv\", args: \"p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text\", returns: \"text\", security: \"definer\" },\n { name: \"io_import_begin\", args: \"p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb, p_file_hash text DEFAULT NULL::text, p_policy jsonb DEFAULT '{}'::jsonb, p_dedupe_key text DEFAULT NULL::text, p_file_bytes bigint DEFAULT NULL::bigint, p_force boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_declare_columns\", args: \"p_organization_id uuid, p_table_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_finish\", args: \"p_organization_id uuid, p_import_id uuid, p_unmapped text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_forget\", args: \"p_organization_id uuid, p_import_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_import_open\", args: \"p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_import_plan\", args: \"p_organization_id uuid, p_table_id uuid, p_columns jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_report\", args: \"p_organization_id uuid, p_import_id uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_import_rows\", args: \"p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_imports\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 25\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_infer_column\", args: \"p_organization_id uuid, p_table_id uuid, p_header text, p_samples jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"io_infer_type\", args: \"p_samples jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"io_money_unit\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"io_outbox_announce\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_outbox_backlog\", args: \"p_consumer text, p_event_key text, p_older_than interval DEFAULT '00:00:00'::interval\", returns: \"TABLE(organization_id uuid, waiting bigint, oldest timestamp with time zone, last_carried timestamp with time zone)\", security: \"definer\" },\n { name: \"io_outbox_broadcast_stmt\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_outbox_consumed_by\", args: \"p_event_id uuid, p_consumer text, p_consumed_at timestamp with time zone\", returns: \"boolean\", security: \"invoker\" },\n { name: \"io_outbox_drain\", args: \"p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text\", returns: \"TABLE(outbox_id uuid, record_id uuid, table_id uuid, operation text, changed_field_ids jsonb, actor jsonb, occurred_at timestamp with time zone)\", security: \"definer\" },\n { name: \"io_outbox_last_consumed\", args: \"p_consumer text, p_event_key text, p_organization_id uuid\", returns: \"timestamp with time zone\", security: \"invoker\" },\n { name: \"io_outbox_pending_organizations\", args: \"p_consumer text, p_event_key text\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"io_outbox_per_consumer\", args: \"\", returns: \"boolean\", security: \"invoker\" },\n { name: \"io_outbox_rearm\", args: \"p_organization_id uuid, p_dedupe_key text\", returns: \"void\", security: \"definer\" },\n { name: \"io_outbox_release\", args: \"p_organization_id uuid, p_consumer text, p_older_than interval DEFAULT '00:15:00'::interval\", returns: \"integer\", security: \"definer\" },\n { name: \"io_outbox_release_claimed\", args: \"p_organization_id uuid, p_consumer text, p_ids uuid[]\", returns: \"integer\", security: \"definer\" },\n { name: \"io_outbox_subscribe\", args: \"p_consumer text, p_event_key text\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"io_proposal_accept\", args: \"p_organization_id uuid, p_import_id uuid, p_column text, p_type text DEFAULT NULL::text, p_label text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"io_proposal_reject\", args: \"p_organization_id uuid, p_import_id uuid, p_column text\", returns: \"boolean\", security: \"definer\" },\n { name: \"io_proposal_spec\", args: \"p_proposal jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_record_changed\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_delete\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_insert\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_record_changed_stmt_update\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"io_relation_candidate\", args: \"p_organization_id uuid, p_table_id uuid, p_words text[]\", returns: \"uuid\", security: \"invoker\" },\n { name: \"io_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer\", returns: \"integer\", security: \"definer\" },\n { name: \"io_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb\", returns: \"integer\", security: \"definer\" },\n { name: \"io_revisions\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)\", security: \"definer\" },\n { name: \"io_sample_words\", args: \"p_samples jsonb\", returns: \"TABLE(word text)\", security: \"invoker\" },\n { name: \"io_value_shape\", args: \"p_envelope jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"io_workflow_chain\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"is_a_retirement\", args: \"p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"ladder_replanners\", args: \"p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]\", returns: \"TABLE(fn text, lang text, why text, remedy text)\", security: \"definer\" },\n { name: \"level_floor\", args: \"\", returns: \"permission_level\", security: \"definer\" },\n { name: \"levels_of\", args: \"p_user_id uuid, p_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"levels_raised_by_a_less_specific_rung\", args: \"\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, member_email text, record_id uuid, addressed_level permission_level, answered_level permission_level)\", security: \"definer\" },\n { name: \"list_door_disagreements\", args: \"p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)\", security: \"invoker\" },\n { name: \"list_door_disagreements\", args: \"p_pretend text, p_only_organization uuid, p_sample integer, p_exhaustive boolean\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)\", security: \"invoker\" },\n { name: \"list_portals\", args: \"p_organization_id uuid, p_archived text DEFAULT 'active'::text\", returns: \"TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)\", security: \"definer\" },\n { name: \"list_portals_everywhere\", args: \"p_archived text DEFAULT 'active'::text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"listed_predicate_sql\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text\", returns: \"text\", security: \"invoker\" },\n { name: \"lookup_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_document\", args: \"p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_document\", args: \"p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb, p_declared_keys text[] DEFAULT NULL::text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_history_data\", args: \"p_data jsonb, p_mask jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"mask_says_withheld\", args: \"p_mask jsonb, p_key text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"may_invite_outside\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"member_personal_tables\", args: \"p_organization_id uuid, p_person uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"member_records_take_over\", args: \"p_organization_id uuid, p_from uuid, p_to uuid, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"merge_field_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"migrate_choice_keys\", args: \"p_organization_id uuid, p_table_id uuid, p_dry_run boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_delete\", args: \"p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_demote\", args: \"p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_extract_parent\", args: \"p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_merge\", args: \"p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_promote\", args: \"p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge_hard\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_compliance_reason text DEFAULT NULL::text, p_chunk integer DEFAULT 200, p_dry_run boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_purge_hard_request\", args: \"p_organization_id uuid, p_table_id uuid, p_compliance_reason text\", returns: \"void\", security: \"definer\" },\n { name: \"migrate_reclass\", args: \"p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_rename\", args: \"p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_reparent\", args: \"p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_retype\", args: \"p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_split\", args: \"p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrate_undo\", args: \"p_organization_id uuid, p_log_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"migrations\", args: \"p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(id uuid, verb text, target_kind text, target_id uuid, note text, applied_at timestamp with time zone, applied_by uuid, undone_at timestamp with time zone)\", security: \"definer\" },\n { name: \"mirror_asks_the_whole_database\", args: \"\", returns: \"TABLE(schema_name text, table_name text, policy_name text, why text)\", security: \"invoker\" },\n { name: \"my_level\", args: \"p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text\", returns: \"permission_level\", security: \"definer\" },\n { name: \"my_levels\", args: \"p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text\", returns: \"TABLE(id uuid, level permission_level)\", security: \"definer\" },\n { name: \"organization_clear\", args: \"p_organization_id uuid, p_confirm text, p_and_destroy boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"organization_contents\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"organization_has_a_public_table\", args: \"p_organization_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"organization_home_id\", args: \"p_organization_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"organization_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"organization_pick_lists\", args: \"p_organization_id uuid\", returns: \"TABLE(id uuid, list_name text, description text, updated_at timestamp with time zone, lives_in text)\", security: \"definer\" },\n { name: \"organization_references\", args: \"p_kind text, p_organization_id uuid, p_row jsonb\", returns: \"TABLE(site text, what text, ref_id uuid, openable boolean)\", security: \"invoker\" },\n { name: \"owning_table\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"owning_table_gone\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"page_ceiling\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"page_contract\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"page_size\", args: \"p_organization_id uuid, p_door text, p_limit integer, p_default integer DEFAULT NULL::integer, p_ceiling integer DEFAULT NULL::integer\", returns: \"integer\", security: \"invoker\" },\n { name: \"parity_field_types\", args: \"\", returns: \"TABLE(parity_type text, behavior text, made_of text)\", security: \"invoker\" },\n { name: \"parity_type\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"parity_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, parity_type text, behavior text, unit text, format text, value jsonb, value_version integer, actor text, written_at timestamp with time zone)\", security: \"invoker\" },\n { name: \"per_value_access_words\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"person_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"phone_canonical\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"phone_display\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"phone_pattern\", args: \"\", returns: \"text\", security: \"invoker\" },\n { name: \"pick_list_create\", args: \"p_organization_id uuid, p_list_name text, p_description text DEFAULT NULL::text, p_items jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pick_list_index\", args: \"p_organization_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pick_list_index_everywhere\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pin_agent_cells\", args: \"p_new jsonb, p_old jsonb, p_agent_keys text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"pipeline_board\", args: \"p_organization_id uuid, p_table_id uuid, p_measure text DEFAULT NULL::text\", returns: \"TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)\", security: \"definer\" },\n { name: \"pipeline_board\", args: \"p_organization_id uuid, p_table_id uuid, p_measure text, p_filter jsonb\", returns: \"TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)\", security: \"definer\" },\n { name: \"pipeline_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_gate_preview\", args: \"p_organization_id uuid, p_table_id uuid, p_stage text, p_gate jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_move\", args: \"p_organization_id uuid, p_record_id uuid, p_to text, p_also jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_move_many\", args: \"p_organization_id uuid, p_moves jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_pending\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_read\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipeline_transition_refusal\", args: \"p_organization_id uuid, p_record_id uuid, p_to text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"pipelines\", args: \"p_organization_id uuid\", returns: \"TABLE(table_id uuid, table_name text, stage_field text, stage_label text, stages integer, rules integer, broken text, updated_at timestamp with time zone, updated_by uuid)\", security: \"definer\" },\n { name: \"plural_of\", args: \"p_word text\", returns: \"text\", security: \"invoker\" },\n { name: \"portal_accents\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"portal_admits\", args: \"p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"portal_archive\", args: \"p_organization_id uuid, p_portal_id uuid, p_confirm_title text, p_reason text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_card\", args: \"p_organization_id uuid, p_portal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_declare\", args: \"p_organization_id uuid, p_title text, p_client_table_id uuid, p_tables jsonb, p_portal_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_sign_in_method text DEFAULT 'magic_link'::text, p_config jsonb DEFAULT NULL::jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"portal_field_map\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(field_id uuid, field_key text, field_type text, points_at uuid)\", security: \"definer\" },\n { name: \"portal_form\", args: \"p_organization_id uuid, p_portal_id uuid, p_form_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_form_submit\", args: \"p_organization_id uuid, p_portal_id uuid, p_form_id uuid, p_payload jsonb, p_client_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invitation\", args: \"p_slug text, p_email text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invite\", args: \"p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_invite_accept\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_me\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_preview\", args: \"p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid\", returns: \"TABLE(record_id uuid, title text)\", security: \"definer\" },\n { name: \"portal_principal_bind\", args: \"p_organization_id uuid, p_principal_id uuid, p_user_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_public\", args: \"p_slug text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_record_title\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"portal_restore\", args: \"p_organization_id uuid, p_portal_id uuid, p_confirm_title text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_revoke\", args: \"p_organization_id uuid, p_portal_id uuid, p_principal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"portal_slug\", args: \"p_organization_id uuid, p_title text, p_portal_id uuid DEFAULT NULL::uuid\", returns: \"text\", security: \"definer\" },\n { name: \"portal_tables\", args: \"p_organization_id uuid\", returns: \"TABLE(portal_id uuid, table_id uuid, name text)\", security: \"definer\" },\n { name: \"portals\", args: \"p_organization_id uuid\", returns: \"TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)\", security: \"definer\" },\n { name: \"presentation_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"promote_field\", args: \"p_organization_id uuid, p_table_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"promote_table\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"promoted_field_cap\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"promoted_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(field_id uuid, field_key text, parity_type text, is_unique boolean, value_path text, index_arm text, index_expr text, index_name text, indexable boolean, why_not text)\", security: \"invoker\" },\n { name: \"promoted_index_arm\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_index_ddl\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(step integer, purpose text, statement text)\", security: \"invoker\" },\n { name: \"promoted_index_expr\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_index_name\", args: \"p_table_id uuid, p_field_key text, p_unique boolean\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_query_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"promoted_read\", args: \"p_organization_id uuid, p_table_id uuid, p_field_key text, p_value text\", returns: \"SETOF uuid\", security: \"invoker\" },\n { name: \"promoted_value_path\", args: \"p_field_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"promotion_inline_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"protected_field_notice\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"protected_field_query_refusal\", args: \"p_field_id uuid, p_verb text\", returns: \"text\", security: \"definer\" },\n { name: \"protected_field_rule\", args: \"p_token text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"protected_matches\", args: \"p_field_id uuid, p_value jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(row_id uuid, value jsonb)\", security: \"definer\" },\n { name: \"protected_readers_problem\", args: \"p_token text, p_readers jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"protected_value\", args: \"p_token text, p_row_id uuid, p_field_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"protected_value_leaks\", args: \"p_field_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(place text, table_token text, field_key text, row_id uuid, ref text)\", security: \"definer\" },\n { name: \"protected_values\", args: \"p_organization_id uuid, p_token text, p_row_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"provenance_prune\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true, p_limit integer DEFAULT 200000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"provenance_retention_days\", args: \"p_organization_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"provenance_write\", args: \"p_organization_id uuid, p_conversation_id uuid, p_turn_id text, p_rows jsonb\", returns: \"integer\", security: \"definer\" },\n { name: \"public_definition_owner\", args: \"p_organization_id uuid, p_table_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"publish_bind\", args: \"p_organization_id uuid, p_kind text, p_resource_id uuid, p_slug text, p_render_mode text DEFAULT 'page'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"query_access_ids\", args: \"p_organization_id uuid, p_required text DEFAULT 'viewer'::text\", returns: \"uuid[]\", security: \"invoker\" },\n { name: \"query_across_homes\", args: \"p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"query_by_coordinates\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)\", security: \"definer\" },\n { name: \"query_can_see\", args: \"p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text\", returns: \"boolean\", security: \"definer\" },\n { name: \"query_hot_paths\", args: \"\", returns: \"TABLE(name text, statement text)\", security: \"invoker\" },\n { name: \"query_hot_paths_prepared\", args: \"\", returns: \"TABLE(name text, prepared boolean, generic_plans bigint)\", security: \"invoker\" },\n { name: \"query_is_store_owner\", args: \"\", returns: \"boolean\", security: \"invoker\" },\n { name: \"query_prepare_hot\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"query_principal\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"query_record_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"query_record_document\", args: \"p_principal uuid, p_row custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"query_relation_edges\", args: \"p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text\", returns: \"TABLE(parent_id uuid, child_id uuid, role text, flavor text)\", security: \"definer\" },\n { name: \"query_rollup\", args: \"p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, depth integer)\", security: \"definer\" },\n { name: \"query_rollup_sum\", args: \"p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text\", returns: \"numeric\", security: \"definer\" },\n { name: \"query_table_as_of\", args: \"p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text\", returns: \"TABLE(record_id uuid, data jsonb)\", security: \"definer\" },\n { name: \"query_table_homes\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"query_visibility_parity\", args: \"p_organization_id uuid\", returns: \"TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)\", security: \"definer\" },\n { 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\" },\n { name: \"reachable_from\", args: \"p_organization_id uuid, p_roots uuid[]\", returns: \"TABLE(record_id uuid, depth integer, via text)\", security: \"invoker\" },\n { 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\" },\n { 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\" },\n { name: \"read_door_granted_ids\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"read_door_ladder_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"read_door_parity\", args: \"p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer\", returns: \"TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)\", security: \"definer\" },\n { name: \"read_mask\", args: \"p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_mask_at\", args: \"p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_mask_for\", args: \"p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_paths_outside_the_door\", args: \"\", returns: \"TABLE(object_name text, why text)\", security: \"invoker\" },\n { name: \"read_record\", args: \"p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_records\", args: \"p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_archived\", args: \"p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)\", security: \"definer\" },\n { name: \"read_records_by_ids\", args: \"p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_in_view_order\", args: \"p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb\", returns: \"TABLE(id uuid, document jsonb, level permission_level, \\\"position\\\" numeric)\", security: \"definer\" },\n { name: \"read_records_keyset\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_after jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_time_zone text DEFAULT NULL::text, p_ids uuid[] DEFAULT NULL::uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"read_records_matching\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"read_records_page\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_view_id uuid DEFAULT NULL::uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_time_zone text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"realtime_topic_admits\", args: \"p_topic text\", returns: \"boolean\", security: \"definer\" },\n { name: \"record_aggregate\", args: \"p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_compare jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text\", returns: \"TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)\", security: \"definer\" },\n { name: \"record_aggregate_as_of\", args: \"p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone, p_measure text DEFAULT 'count'::text, p_field_key text DEFAULT NULL::text, p_group_by text DEFAULT NULL::text, p_match jsonb DEFAULT '{}'::jsonb\", returns: \"TABLE(bucket text, result numeric, row_count bigint, not_numbers bigint, a_non_number text)\", security: \"definer\" },\n { name: \"record_applicability\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)\", security: \"invoker\" },\n { name: \"record_archiver\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(state jsonb, replayed boolean)\", security: \"definer\" },\n { name: \"record_card\", args: \"p_viewer uuid, p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_carrying_edges\", args: \"p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(container_id uuid, item_id uuid, edge_role text)\", security: \"invoker\" },\n { name: \"record_change_actions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_change_many\", args: \"p_organization_id uuid, p_table_id uuid, p_changes jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_changes_drain\", args: \"p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100\", returns: \"TABLE(event_id uuid, organization_id uuid, table_id uuid, record_id uuid, kind text, operation text, version integer, fields jsonb, changed_field_ids jsonb, actor jsonb, chain jsonb, op_id uuid, occurred_at timestamp with time zone, via text)\", security: \"definer\" },\n { name: \"record_delete\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"timestamp with time zone\", security: \"definer\" },\n { name: \"record_entity_edges\", args: \"p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(target_type text, target_id uuid, edge_role text, field_id uuid, ord integer)\", security: \"invoker\" },\n { name: \"record_filter_sql\", args: \"p_filter jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"record_filter_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_filter jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"record_headers\", args: \"p_organization_id uuid, p_ids uuid[]\", returns: \"TABLE(id uuid, table_id uuid, created_at timestamp with time zone, updated_at timestamp with time zone, version integer, deleted_at timestamp with time zone, mine boolean, created_by uuid)\", security: \"definer\" },\n { name: \"record_history\", args: \"p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)\", security: \"definer\" },\n { name: \"record_platform_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"record_relation_edges\", args: \"p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone\", returns: \"TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)\", security: \"invoker\" },\n { name: \"record_reparent\", args: \"p_organization_id uuid, p_record_id uuid, p_parent_id uuid\", returns: \"void\", security: \"definer\" },\n { name: \"record_resolve\", args: \"p_organization_id uuid, p_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"void\", security: \"definer\" },\n { name: \"record_restore_preview\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_field_key text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore_version\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_restore_version\", args: \"p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_row_controls\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_row_controls_set\", args: \"p_organization_id uuid, p_record_id uuid, p_controls jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_runs\", args: \"p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 50\", returns: \"TABLE(run_id uuid, kind text, name text, trigger_name text, status text, started_at timestamp with time zone, finished_at timestamp with time zone, steps integer, says text, ran_by uuid)\", security: \"definer\" },\n { name: \"record_scope_context\", args: \"p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_search_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_search text, p_alias text DEFAULT 'r'::text, p_time_zone text DEFAULT NULL::text\", returns: \"text\", security: \"invoker\" },\n { name: \"record_source_key\", args: \"p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"record_source_keys\", args: \"p_table_id uuid\", returns: \"text[]\", security: \"invoker\" },\n { name: \"record_source_table\", args: \"p_key text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"record_stage_pending\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_state_as_of\", args: \"p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(state jsonb, replayed boolean)\", security: \"definer\" },\n { name: \"record_table\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_triggers\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(trigger_id uuid, name text, definition_id uuid, definition_name text, table_id uuid, event text, operations jsonb, field_ids jsonb, via jsonb, is_active boolean, last_fired_at timestamp with time zone, fire_count integer, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"record_update\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"integer\", security: \"definer\" },\n { name: \"record_update_adding_choices\", args: \"p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_add jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"integer\", security: \"definer\" },\n { name: \"record_upsert\", args: \"p_organization_id uuid, p_table_id uuid, p_key text[], p_data jsonb, p_expected_version integer DEFAULT NULL::integer\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_value_one\", args: \"p_organization_id uuid, p_record_id uuid, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values_of\", args: \"p_row custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"record_values_step\", args: \"p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb\", returns: \"record\", security: \"invoker\" },\n { name: \"record_values_versioned\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)\", security: \"definer\" },\n { name: \"record_words\", args: \"p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text\", returns: \"text\", security: \"definer\" },\n { name: \"record_write\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"record_write_graph\", args: \"p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_write_graph_superseding\", args: \"p_organization_id uuid, p_table_id uuid, p_lock_key text, p_idempotence jsonb DEFAULT NULL::jsonb, p_parent jsonb DEFAULT NULL::jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb, p_chain jsonb DEFAULT '{\\\"mode\\\": \\\"first\\\"}'::jsonb, p_rows_state jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"record_write_many\", args: \"p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"records_search\", args: \"p_search text, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_table_ids uuid[] DEFAULT NULL::uuid[], p_organization_ids uuid[] DEFAULT NULL::uuid[], p_include_app_tables boolean DEFAULT false\", returns: \"TABLE(record_id uuid, table_id uuid, table_name text, name text, organization_id uuid, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"refusals_claiming_a_level_never_asked\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"relation_carry\", args: \"p_organization_id uuid, p_container_id uuid, p_item_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_edges_withdraw\", args: \"p_organization_id uuid, p_field_ids uuid[], p_why text\", returns: \"integer\", security: \"definer\" },\n { name: \"relation_halves_disagreements\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(organization_id uuid, record_id uuid, field_key text, field_id uuid, target_id uuid, direction text, remedy text, why text)\", security: \"definer\" },\n { name: \"relation_halves_repair\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_kernel_record\", args: \"p_organization_id uuid, p_kernel_table_id uuid, p_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_name_key\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"relation_names_match\", args: \"p_organization_id uuid, p_table_id uuid, p_names text[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_own\", args: \"p_organization_id uuid, p_owner_id uuid, p_target_id uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"relation_restore\", args: \"p_organization_id uuid, p_relation_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"relation_target_card\", args: \"p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text\", returns: \"TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)\", security: \"definer\" },\n { name: \"relation_target_external\", args: \"p_connection_token text, p_external_table text, p_external_key text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_target_ours\", args: \"p_entity_token text, p_row_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"relation_targets\", args: \"p_organization_id uuid, p_record_id uuid, p_via_key text\", returns: \"SETOF uuid\", security: \"definer\" },\n { name: \"relation_uncarry\", args: \"p_organization_id uuid, p_container_id uuid, p_item_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"relation_value_target_ok\", args: \"p_organization_id uuid, p_field_id uuid, p_field_data jsonb, p_target_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"relation_words\", args: \"p_organization_id uuid, p_field_id uuid, p_value text\", returns: \"text\", security: \"definer\" },\n { name: \"relation_words_many\", args: \"p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, words text, archived boolean)\", security: \"definer\" },\n { name: \"relation_words_with_icons_many\", args: \"p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, words text, archived boolean, icon text, table_icon text)\", security: \"definer\" },\n { name: \"reopen_declared_doors\", args: \"\", returns: \"TABLE(reopened text)\", security: \"definer\" },\n { name: \"required_epoch\", args: \"p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid\", returns: \"bigint\", security: \"definer\" },\n { name: \"resolve_context\", args: \"p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"resolve_first_match\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"resolve_id\", args: \"p_organization_id uuid, p_id uuid\", returns: \"uuid\", security: \"invoker\" },\n { name: \"retired_actor_words\", args: \"\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"reverse_columns\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(key text, label text, source_field_id uuid, source_field_key text, source_field_label text, source_table_id uuid, source_table_name text, cardinality text, read_only boolean)\", security: \"definer\" },\n { name: \"reverse_links_many\", args: \"p_organization_id uuid, p_table_id uuid, p_field_id uuid, p_record_ids uuid[], p_limit integer DEFAULT 10, p_offset integer DEFAULT 0\", returns: \"TABLE(record_id uuid, total integer, links jsonb)\", security: \"definer\" },\n { name: \"rollup_value\", args: \"p_organization_id uuid, p_record_id uuid, p_field_data jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"row_actions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"row_sits_in_a_personal_table\", args: \"p_type text, p_organization_id uuid, p_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"row_template_bodies\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(template_id uuid, body jsonb)\", security: \"definer\" },\n { name: \"row_template_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { 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\" },\n { name: \"rule_applies\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_context\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_declare\", args: \"p_organization_id uuid, p_spec jsonb, p_rule_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"rule_dependency_edges\", args: \"p_organization_id uuid, p_row custom.record DEFAULT NULL::custom.record\", returns: \"TABLE(needs text, needed text)\", security: \"invoker\" },\n { name: \"rule_eval\", args: \"p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_field_key\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_field_label\", args: \"p_organization_id uuid, p_field_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_filter_node_sql\", args: \"p_organization_id uuid, p_table_id uuid, p_node jsonb, p_map jsonb, p_visible text[]\", returns: \"text\", security: \"invoker\" },\n { name: \"rule_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"rule_members\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"rule_members_visible\", args: \"p_organization_id uuid, p_rule_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0\", returns: \"TABLE(id uuid, document jsonb, level permission_level)\", security: \"definer\" },\n { name: \"rule_membership\", args: \"p_organization_id uuid, p_rule_id uuid, p_record_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_node_kinds\", args: \"\", returns: \"TABLE(node text, evaluated_by text, note text)\", security: \"invoker\" },\n { name: \"rule_restore\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"rule_run\", args: \"p_organization_id uuid, p_rule_id uuid, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_sql_op\", args: \"p_op text, p_a jsonb, p_b jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"rule_truth\", args: \"p_answer jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"rule_uses\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"rule_version\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"said\", args: \"p_value text, p_when_there_is_none text\", returns: \"text\", security: \"invoker\" },\n { name: \"scope_item_row_of\", args: \"p_field custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_item_value_type\", args: \"p_field jsonb, p_carried jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"scope_items_of\", args: \"p_org uuid, p_table uuid\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"scope_member_reaches\", args: \"p_user_id uuid, p_record_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"invoker\" },\n { name: \"scope_row_of\", args: \"p_rec custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_rows_of\", args: \"p_org uuid, p_types uuid[] DEFAULT NULL::uuid[]\", returns: \"TABLE(id uuid, table_id uuid, type_sort integer, sort_order integer, name text, type_doc jsonb, row_doc jsonb)\", security: \"invoker\" },\n { name: \"scope_setting_back\", args: \"p_value jsonb, p_behavior text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_table_provision\", args: \"p_organization_id uuid, p_item_id uuid, p_scope_id uuid, p_home_id uuid DEFAULT NULL::uuid\", returns: \"uuid\", security: \"definer\" },\n { name: \"scope_type_row_of\", args: \"p_table custom.record\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"scope_value_columns\", args: \"p_org uuid, p_field jsonb, p_value_type text, p_value jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"seen_among\", args: \"p_user_id uuid, p_ids uuid[]\", returns: \"uuid[]\", security: \"definer\" },\n { name: \"sensitivity_rank\", args: \"p_sensitivity text\", returns: \"integer\", security: \"invoker\" },\n { name: \"set_table_confidential_arman_explicitly_approved\", args: \"p_table_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date, p_maker_is_reader boolean DEFAULT NULL::boolean\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_access\", args: \"p_organization_id uuid, p_subject_id uuid\", returns: \"TABLE(principal_kind text, principal_id uuid, principal_label text, level permission_level, reason text, reason_detail text, via_type text, via_id uuid, revocable boolean)\", security: \"definer\" },\n { name: \"share_grant\", args: \"p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_lane_set\", args: \"p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_lanes\", args: \"\", returns: \"TABLE(choice text, lane text, discoverable boolean, label text, means text)\", security: \"definer\" },\n { name: \"share_levels\", args: \"\", returns: \"TABLE(level permission_level, ordinal integer, label text, means text)\", security: \"definer\" },\n { name: \"share_people\", args: \"p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25\", returns: \"TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)\", security: \"definer\" },\n { name: \"share_revoke\", args: \"p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"share_subject_name\", args: \"p_organization_id uuid, p_type text, p_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"shared_only_disagreements\", args: \"p_pretend text DEFAULT NULL::text\", returns: \"TABLE(organization_id uuid, organization_name text, member_id uuid, record_id uuid, table_id uuid, ladder boolean, read_door boolean, rls_mirror boolean, why text)\", security: \"invoker\" },\n { name: \"shares_outside\", args: \"p_organization_id uuid\", returns: \"TABLE(invitation_id uuid, table_id uuid, table_name text, email text, level text, level_label text, status text, joined boolean, expired boolean, invited_at timestamp with time zone, expires_at timestamp with time zone, say text)\", security: \"definer\" },\n { name: \"sign_request_cancel\", args: \"p_organization_id uuid, p_request_id uuid, p_reason text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_create\", args: \"p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_email text, p_signer_name text, p_expires_in interval DEFAULT '14 days'::interval\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_decline\", args: \"p_token text, p_reason text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_public\", args: \"p_token text, p_origin text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_remind\", args: \"p_organization_id uuid, p_request_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_sentence\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"sign_request_sign\", args: \"p_token text, p_signed_name text, p_mark text, p_image text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text, p_origin text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"sign_request_state\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"sign_request_unchanged\", args: \"p_organization_id uuid, p_request_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"sign_requests\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(request_id uuid, render_id uuid, record_id uuid, field_key text, document_title text, signer_name text, signer_email text, signer_has_account boolean, state text, sentence text, document_version integer, document_hash text, sent_at timestamp with time zone, expires_at timestamp with time zone, viewed_at timestamp with time zone, signed_at timestamp with time zone, declined_at timestamp with time zone, invalidated_at timestamp with time zone, signature_id uuid, signature_mark text, reminder_count integer)\", security: \"definer\" },\n { name: \"sign_token_decode\", args: \"p_token text\", returns: \"bytea\", security: \"invoker\" },\n { name: \"sign_token_encode\", args: \"p_bytes bytea\", returns: \"text\", security: \"invoker\" },\n { name: \"silent_page_doors\", args: \"\", returns: \"TABLE(door text, why text)\", security: \"definer\" },\n { name: \"size_refusal\", args: \"p_organization_id uuid, p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"source_next_pointer\", args: \"p_sources jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"source_pointer\", args: \"p_sources jsonb, p_source jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"stage_rule_enforcement\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"stage_rule_on_fail_kinds\", args: \"\", returns: \"TABLE(behaviour text, note text)\", security: \"invoker\" },\n { name: \"stamp_value_envelopes\", args: \"p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"status_groups_keyed\", args: \"p_organization_id uuid, p_options_table_id uuid, p_groups jsonb, p_kept jsonb, p_label text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"status_groups_of\", args: \"p_groups jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"storage_modes\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"store_census_pair_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"store_is_open\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"store_off_sentence\", args: \"p_organization_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"subscription_cadences\", args: \"p_organization_id uuid\", returns: \"text[]\", security: \"definer\" },\n { name: \"subscription_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"subscription_mute\", args: \"p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true\", returns: \"boolean\", security: \"definer\" },\n { name: \"subscription_preview\", args: \"p_organization_id uuid, p_rule_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"subscriptions\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)\", security: \"definer\" },\n { name: \"table_add_rung\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"permission_level\", security: \"invoker\" },\n { name: \"table_archive\", args: \"p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 50, p_include_table boolean DEFAULT true\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_archive_deliberately\", args: \"p_organization_id uuid, p_table_id uuid, p_typed_slug text, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_capacity\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_carries_its_rows\", args: \"p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_column_source\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"table_contents\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(record_id uuid, kind text, goes_at integer)\", security: \"invoker\" },\n { name: \"table_copies_in_progress\", args: \"\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_declare\", args: \"p_organization_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"table_decorate\", args: \"p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_decorations\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_dimensions\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_dimensions_set\", args: \"p_organization_id uuid, p_table_id uuid, p_overrides jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_duplicate\", args: \"p_table_id uuid, p_with_records boolean DEFAULT false, p_name text DEFAULT NULL::text, p_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_duplicate_continue\", args: \"p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_ensure\", args: \"p_organization_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_facts\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(table_id uuid, visibility text, mine boolean, kept_by_the_app boolean, kept_for text, offered_as_context boolean, keeper_group text, keeper_says text, used_in_kind text, used_in_id uuid, used_in_table_id uuid, foundation boolean)\", security: \"definer\" },\n { name: \"table_find\", args: \"p_organization_id uuid, p_slug text DEFAULT NULL::text, p_name text DEFAULT NULL::text, p_kept_for text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_from_example\", args: \"p_organization_id uuid, p_home_id uuid, p_example jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_has_a_visible_record\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_home\", args: \"p_table_id uuid, p_to_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_is_foundation\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_live\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_options_table\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_is_platform_context\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_kept_for_derived\", args: \"p_data jsonb, p_is_kernel boolean, p_is_options boolean\", returns: \"text\", security: \"invoker\" },\n { name: \"table_kept_out_of_lists\", args: \"p_kept_for text\", returns: \"boolean\", security: \"invoker\" },\n { name: \"table_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"table_kind_facts\", args: \"p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_list_everywhere\", args: \"p_organization_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_list_everywhere\", args: \"p_organization_id uuid, p_include_app_tables boolean\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_move\", args: \"p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_page_bundle\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_placement\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_record_ceiling\", args: \"\", returns: \"integer\", security: \"invoker\" },\n { name: \"table_record_ceiling\", args: \"p_organization_id uuid\", returns: \"integer\", security: \"invoker\" },\n { name: \"table_restore\", args: \"p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 20\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_counts\", args: \"p_organization_id uuid, p_table_ids uuid[]\", returns: \"TABLE(table_id uuid, visible_rows bigint)\", security: \"definer\" },\n { name: \"table_row_defaults\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_defaults_apply\", args: \"p_organization_id uuid, p_table_id uuid, p_after uuid DEFAULT NULL::uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_row_defaults_set\", args: \"p_organization_id uuid, p_table_id uuid, p_defaults jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_rules\", args: \"p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text\", returns: \"SETOF custom.record\", security: \"invoker\" },\n { name: \"table_share_outside\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_accept\", args: \"p_token text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_for_me\", args: \"\", returns: \"TABLE(invitation_id uuid, organization_id uuid, organization text, table_id uuid, table_name text, level text, level_label text, token text, expires_at timestamp with time zone, say text)\", security: \"definer\" },\n { name: \"table_share_outside_grant\", args: \"p_organization_id uuid, p_table_id uuid, p_person text, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_invite\", args: \"p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_resend\", args: \"p_organization_id uuid, p_invitation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_share_outside_revoke\", args: \"p_organization_id uuid, p_invitation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_stage_field\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"table_storage\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"table_sync\", args: \"p_organization_id uuid, p_home_id uuid, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_template_declare\", args: \"p_org_id uuid, p_name text, p_description text, p_fields jsonb\", returns: \"uuid\", security: \"invoker\" },\n { name: \"table_templates\", args: \"p_org_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_transfer_owner\", args: \"p_table_id uuid, p_to_person uuid, p_reason text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_type_field\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"table_unique_rule_fields\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"table_webhook_archive\", args: \"p_organization_id uuid, p_webhook_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"table_webhook_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_target_url text, p_events text[] DEFAULT NULL::text[], p_description text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"table_webhooks\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(webhook_id uuid, target_url text, description text, events text[], is_active boolean, last_attempt_at timestamp with time zone, last_success_at timestamp with time zone, consecutive_failures integer, owner_id uuid, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"table_work_kind\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"tables_at_home\", args: \"p_organization_id uuid, p_home_ids uuid[]\", returns: \"TABLE(table_id uuid, home_record_id uuid, kind text)\", security: \"definer\" },\n { name: \"tables_described_without_asking\", args: \"\", returns: \"TABLE(function_name text, identity_args text, why text)\", security: \"invoker\" },\n { name: \"tables_i_can_open\", args: \"\", returns: \"TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"tables_listed_among\", args: \"p_organization_id uuid, p_tables uuid[]\", returns: \"SETOF uuid\", security: \"invoker\" },\n { name: \"tables_seen_among\", args: \"p_user_id uuid, p_organization_ids uuid[], p_among uuid[]\", returns: \"TABLE(organization_id uuid, id uuid, seen boolean)\", security: \"definer\" },\n { name: \"tables_seen_once_per_group\", args: \"p_user_id uuid, p_organization_ids uuid[]\", returns: \"TABLE(organization_id uuid, id uuid, seen boolean)\", security: \"definer\" },\n { name: \"tables_shared_with_me\", args: \"\", returns: \"TABLE(table_id uuid, organization_id uuid, organization text, table_name text, level text, level_label text, shared_at timestamp with time zone, opens boolean, say text)\", security: \"definer\" },\n { name: \"template_archive\", args: \"p_template_id uuid, p_restore boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_declare\", args: \"p_scope text, p_spec jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_from_tables\", args: \"p_organization_id uuid, p_table_ids uuid[], p_include_rows boolean DEFAULT false, p_rows_per_table integer DEFAULT 25\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install\", args: \"p_organization_id uuid, p_template_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install_claim\", args: \"p_organization_id uuid, p_install_id uuid, p_kind text, p_label text, p_source_id uuid DEFAULT NULL::uuid, p_lease_seconds integer DEFAULT NULL::integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_install_note\", args: \"p_organization_id uuid, p_install_id uuid, p_kind text, p_id uuid, p_label text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_keep\", args: \"p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_restore\", args: \"p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_uninstall\", args: \"p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000\", returns: \"jsonb\", security: \"definer\" },\n { name: \"template_upgrade\", args: \"p_organization_id uuid, p_install_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"templates\", args: \"p_filter jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"text_head_bytes\", args: \"p_text text, p_bytes bigint\", returns: \"text\", security: \"invoker\" },\n { name: \"trg_associations_bump_visibility\", args: \"\", returns: \"trigger\", security: \"definer\" },\n { name: \"undeclared_keys\", args: \"p_organization_id uuid, p_table_id uuid, p_data jsonb\", returns: \"text[]\", security: \"invoker\" },\n { name: \"unresolved_sources_of\", args: \"p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"validate_custom_fields\", args: \"p_token text, p_organization_id uuid, p_values jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"validate_value_envelope\", args: \"p_organization_id uuid, p_fields custom.record[], p_data jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"validate_values\", args: \"p_organization_id uuid, p_fields custom.record[], p_values jsonb, p_record_type text DEFAULT NULL::text\", returns: \"void\", security: \"invoker\" },\n { name: \"value_alternate_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"value_envelope_keys\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"value_envelope_ok\", args: \"p_data jsonb\", returns: \"boolean\", security: \"invoker\" },\n { name: \"value_envelope_refusal\", args: \"p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"value_read\", args: \"p_organization_id uuid, p_record_id uuid, p_key text\", returns: \"TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)\", security: \"definer\" },\n { name: \"value_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer\", returns: \"jsonb\", security: \"definer\" },\n { name: \"value_restore\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer, p_author jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"value_versions\", args: \"p_old jsonb, p_new jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"view_declare\", args: \"p_organization_id uuid, p_table_id uuid, p_spec jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"view_designate\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_layout text DEFAULT NULL::text\", returns: \"uuid\", security: \"definer\" },\n { name: \"view_keys\", args: \"\", returns: \"TABLE(path text, shape text, layouts text[], writer text, sentence text)\", security: \"invoker\" },\n { name: \"view_keys_check\", args: \"p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"view_look_read\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"view_look_set\", args: \"p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"view_record_order_set\", args: \"p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]\", returns: \"jsonb\", security: \"definer\" },\n { name: \"views\", args: \"p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(view_id uuid, name text, table_id uuid, filters jsonb, definition jsonb, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"visibility_ancestors\", args: \"p_item_type text, p_item_id uuid\", returns: \"TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)\", security: \"definer\" },\n { name: \"visibility_as_of\", args: \"p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone\", returns: \"TABLE(principal_kind text, principal_id uuid, level permission_level, through_kind text, through_id uuid, reason text, replayed boolean, held_from timestamp with time zone, held_to timestamp with time zone)\", security: \"definer\" },\n { name: \"visibility_cache_rebuild\", args: \"\", returns: \"integer\", security: \"definer\" },\n { name: \"visibility_parity\", args: \"\", returns: \"TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)\", security: \"definer\" },\n { name: \"visibility_warm\", args: \"p_container_type text, p_container_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"visible_predicate_sql\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text\", returns: \"text\", security: \"definer\" },\n { name: \"visible_record_ids\", args: \"p_user_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level\", returns: \"TABLE(id uuid)\", security: \"definer\" },\n { name: \"visible_set\", args: \"p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text\", returns: \"record\", security: \"definer\" },\n { name: \"where_id_opens\", args: \"p_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"where_lists_live\", args: \"p_list_ids uuid[]\", returns: \"TABLE(list_id uuid, lives_in text, address text, why text)\", security: \"definer\" },\n { name: \"where_tables_live\", args: \"p_table_ids uuid[]\", returns: \"TABLE(table_id uuid, lives_in text, why text)\", security: \"definer\" },\n { name: \"whole_value_ceiling\", args: \"p_organization_id uuid\", returns: \"bigint\", security: \"invoker\" },\n { name: \"whole_value_complete\", args: \"p_organization_id uuid, p_record_id uuid, p_field_key text, p_file_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"whole_value_head\", args: \"p_text text\", returns: \"text\", security: \"invoker\" },\n { name: \"whole_value_park\", args: \"p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_owner_id uuid, p_visibility platform.visibility, p_data jsonb, p_park jsonb\", returns: \"void\", security: \"invoker\" },\n { name: \"whole_value_pointer_of\", args: \"p_values jsonb, p_sources jsonb, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"whole_value_source\", args: \"p_text text, p_writer_src jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"whole_values_waiting\", args: \"p_organization_id uuid, p_record_ids uuid[]\", returns: \"TABLE(record_id uuid, field_key text, pointer text, value_version integer, sha256 text, bytes bigint, chars bigint, owner_id uuid, record_visibility text, table_id uuid, table_name text)\", security: \"definer\" },\n { name: \"widget_kernel_id\", args: \"\", returns: \"uuid\", security: \"invoker\" },\n { name: \"with_retired\", args: \"p_doc jsonb, p_retired jsonb, p_visible text[], p_declared text[]\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"with_whole_value_pointers\", args: \"p_document jsonb, p_values jsonb, p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"withheld_marker\", args: \"p_mask jsonb, p_key text\", returns: \"jsonb\", security: \"invoker\" },\n { name: \"withheld_sentence\", args: \"p_mask jsonb, p_key text\", returns: \"text\", security: \"invoker\" },\n { name: \"work_approval_approvers\", args: \"p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(user_id uuid, name text, why text)\", security: \"definer\" },\n { name: \"work_approval_decide\", args: \"p_organization_id uuid, p_approval_id uuid, p_approve boolean, p_note text DEFAULT NULL::text\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_kinds\", args: \"\", returns: \"text[]\", security: \"invoker\" },\n { name: \"work_approval_may_decide\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_approval_read\", args: \"p_organization_id uuid, p_approval_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_request\", args: \"p_organization_id uuid, p_subject_id uuid, p_change jsonb, p_note text DEFAULT NULL::text, p_approver_id uuid DEFAULT NULL::uuid, p_origin text DEFAULT 'person'::text, p_conversation_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_approval_withdrawal\", args: \"p_organization_id uuid, p_data jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"work_assign\", args: \"p_organization_id uuid, p_record_id uuid, p_assignee_user_id uuid, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_clear_due boolean DEFAULT false\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_assignment_fields\", args: \"p_options_table_id uuid DEFAULT NULL::uuid\", returns: \"TABLE(key text, label text, spec jsonb)\", security: \"invoker\" },\n { name: \"work_decide_many\", args: \"p_organization_id uuid, p_decisions jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_has_assignment\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_inbox\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text\", returns: \"TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone, table_id uuid, table_name text, decided_by uuid, decided_by_name text, decided_at timestamp with time zone, outcome text, snoozed_until timestamp with time zone, cleared_at timestamp with time zone, snoozed_count integer, cleared_count integer, undo_seconds integer, undo_refusal text)\", security: \"definer\" },\n { name: \"work_instantiation_shape\", args: \"p_organization_id uuid, p_instantiation_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_list\", args: \"p_organization_id uuid DEFAULT NULL::uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0\", returns: \"TABLE(record_id uuid, table_id uuid, table_name text, title text, assignee_id uuid, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, terminal boolean, assigned_by uuid, updated_at timestamp with time zone)\", security: \"definer\" },\n { name: \"work_person\", args: \"p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true\", returns: \"uuid\", security: \"definer\" },\n { name: \"work_record_states\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"TABLE(state_id uuid, name text, sort integer, terminal boolean, is_current boolean, allowed boolean, refusal text)\", security: \"definer\" },\n { name: \"work_relation_kinds\", args: \"\", returns: \"TABLE(kind text, available boolean, why text)\", security: \"invoker\" },\n { name: \"work_set_state\", args: \"p_organization_id uuid, p_record_id uuid, p_state_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_slot_expire\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"integer\", security: \"definer\" },\n { name: \"work_slot_hold\", args: \"p_organization_id uuid, p_table_id uuid, p_slot_key text, p_holder text, p_ttl interval DEFAULT '00:15:00'::interval\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_slot_holds\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"TABLE(hold_id uuid, slot_key text, holder text, expires_at timestamp with time zone, expired boolean)\", security: \"definer\" },\n { name: \"work_slot_index_name\", args: \"p_table_id uuid\", returns: \"text\", security: \"invoker\" },\n { name: \"work_slot_release\", args: \"p_organization_id uuid, p_hold_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"work_slots_declare\", args: \"p_organization_id uuid, p_name text, p_slug text, p_home_id uuid DEFAULT NULL::uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_state_id\", args: \"p_organization_id uuid, p_table_id uuid, p_value text\", returns: \"uuid\", security: \"invoker\" },\n { name: \"work_states\", args: \"\", returns: \"TABLE(sort integer, name text, terminal boolean, next text[])\", security: \"invoker\" },\n { name: \"work_take_assignment\", args: \"p_organization_id uuid, p_table_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_template_declare\", args: \"p_organization_id uuid, p_name text, p_graph jsonb\", returns: \"uuid\", security: \"definer\" },\n { name: \"work_template_instantiate\", args: \"p_organization_id uuid, p_template_id uuid, p_overrides jsonb DEFAULT '{}'::jsonb\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_template_refusal\", args: \"p_graph jsonb\", returns: \"text\", security: \"invoker\" },\n { name: \"work_template_shape\", args: \"p_organization_id uuid, p_template_id uuid\", returns: \"jsonb\", security: \"definer\" },\n { name: \"work_templates\", args: \"p_organization_id uuid, p_limit integer DEFAULT 100\", returns: \"TABLE(template_id uuid, name text, nodes integer, relations integer, created_at timestamp with time zone)\", security: \"definer\" },\n { name: \"work_transition_refusal\", args: \"p_organization_id uuid, p_from_state_id uuid, p_to_state_id uuid\", returns: \"text\", security: \"definer\" },\n { name: \"work_whose_turn\", args: \"p_organization_id uuid, p_table_id uuid, p_include_finished boolean DEFAULT false\", returns: \"TABLE(record_id uuid, title text, assignee_id uuid, turn text, due_on timestamp with time zone, state text, status text, terminal boolean)\", security: \"definer\" },\n { name: \"world_reader_may_know_row\", args: \"p_organization_id uuid, p_record_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"world_reader_only\", args: \"p_organization_id uuid\", returns: \"boolean\", security: \"definer\" },\n { name: \"world_reader_reads_public_definition\", args: \"p_organization_id uuid, p_table_id uuid, p_record_ids uuid[]\", returns: \"boolean\", security: \"definer\" },\n] as const;\n\n/** The campaign's own knobs, with the value the store resolves them to today. */\nexport const STORE_KNOBS = [\n { key: \"accessible_entity_ids_guard\", value: \"true\", type: \"boolean\" },\n { key: \"action_run_records_max\", value: \"5000\", type: \"integer\" },\n { key: \"agent_context_reads_the_copy\", value: \"true\", type: \"boolean\" },\n { key: \"agent_context_value_cap_bytes\", value: \"0\", type: \"integer\" },\n { key: \"agent_schema_changes\", value: \"\\\"ask\\\"\", type: \"string\" },\n { key: \"archive_confirm_over\", value: \"1000\", type: \"integer\" },\n { key: \"back_links\", value: \"true\", type: \"boolean\" },\n { key: \"batch_items_max\", value: \"500\", type: \"integer\" },\n { key: \"choice_nudge\", value: \"\\\"ask\\\"\", type: \"string\" },\n { key: \"closed_custom_field_tables\", value: \"[\\\"party\\\"]\", type: \"json\" },\n { key: \"code_paths_enabled\", value: \"true\", type: \"boolean\" },\n { key: \"consumer_chat_seeding_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_checkout_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_context_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_education_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_extension_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_grid_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_retirement_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_saved_ai_outputs_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"consumer_scopes_enabled\", value: \"false\", type: \"boolean\" },\n { key: \"containment_depth_ceiling\", value: \"16\", type: \"integer\" },\n { key: \"context_copy_following\", value: \"true\", type: \"boolean\" },\n { key: \"cross_organization_links\", value: \"false\", type: \"boolean\" },\n { key: \"data_home_default_kind\", value: \"\\\"all\\\"\", type: \"string\" },\n { key: \"data_home_default_order\", value: \"\\\"updated\\\"\", type: \"enum\" },\n { key: \"data_home_default_scope\", value: \"\\\"all\\\"\", type: \"enum\" },\n { key: \"data_home_default_view\", value: \"\\\"table\\\"\", type: \"enum\" },\n { key: \"decision_undo_seconds\", value: \"5\", type: \"integer\" },\n { key: \"decoration_rules_max\", value: \"50\", type: \"integer\" },\n { key: \"decorations_max_bytes\", value: \"262144\", type: \"integer\" },\n { key: \"document_letterhead\", value: \"{}\", type: \"json\" },\n { key: \"document_max_bytes\", value: \"1048576\", type: \"integer\" },\n { key: \"enrichment_batch_ceiling\", value: \"200\", type: \"integer\" },\n { key: \"enrichment_confidence_floor\", value: \"0.6\", type: \"number\" },\n { key: \"enrichment_cost_cap_cents\", value: \"2000\", type: \"integer\" },\n { key: \"enrichment_model\", value: \"\\\"claude-fable-5-latest\\\"\", type: \"string\" },\n { key: \"enrichment_sensitivity_ceiling\", value: \"\\\"internal\\\"\", type: \"string\" },\n { key: \"entity_types_guard\", value: \"false\", type: \"boolean\" },\n { key: \"example_rows_max\", value: \"500\", type: \"integer\" },\n { key: \"export_rows_ceiling\", value: \"100000\", type: \"integer\" },\n { key: \"external_principal_enabled\", value: \"true\", type: \"boolean\" },\n { key: \"field_sensitivity_levels\", value: \"{\\\"edit\\\": {\\\"public\\\": \\\"editor\\\", \\\"internal\\\": \\\"editor\\\", \\\"restricted\\\": \\\"admin\\\", \\\"confidential\\\": \\\"admin\\\"}, \\\"read\\\": {\\\"public\\\": \\\"viewer\\\", \\\"internal\\\": \\\"viewer\\\", \\\"restricted\\\": \\\"admin\\\", \\\"confidential\\\": \\\"editor\\\"}}\", type: \"json\" },\n { key: \"form_draft_days\", value: \"30\", type: \"integer\" },\n { key: \"form_draft_max_bytes\", value: \"65536\", type: \"integer\" },\n { key: \"form_draft_saves_per_hour\", value: \"240\", type: \"integer\" },\n { key: \"form_redirect_domains\", value: \"[]\", type: \"json\" },\n { key: \"grid_layout\", value: \"{\\\"mode\\\": \\\"auto\\\", \\\"wrap\\\": false, \\\"row_height\\\": \\\"normal\\\", \\\"fit_max_columns\\\": 8, \\\"freeze_first_column\\\": false}\", type: \"json\" },\n { key: \"inbound_domain\", value: \"\\\"inbound.matrxserver.com\\\"\", type: \"string\" },\n { key: \"inbox_reminder_after_days\", value: \"3\", type: \"integer\" },\n { key: \"member_default_level\", value: \"\\\"editor\\\"\", type: \"enum\" },\n { key: \"outside_invite_who\", value: \"\\\"org_admins_and_table_owners\\\"\", type: \"string\" },\n { key: \"page_size_ceiling\", value: \"1000\", type: \"integer\" },\n { key: \"protected_field_rules\", value: \"{\\\"hr_employee\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_candidate\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_position_assignment\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}, \\\"hr_training_assignment\\\": {\\\"arm\\\": \\\"hr.arm_write\\\", \\\"rule\\\": \\\"hr.custom_field_access\\\", \\\"readers\\\": [{\\\"field\\\": \\\"subject\\\"}, {\\\"capability\\\": \\\"hr.identity.read\\\"}, {\\\"capability\\\": \\\"hr.working_record.write\\\"}, {\\\"level\\\": \\\"editor\\\", \\\"capability\\\": \\\"hr.identity.write\\\"}]}}\", type: \"json\" },\n { key: \"provenance_retention_days\", value: \"30\", type: \"number\" },\n { key: \"row_action_steps_max\", value: \"60\", type: \"integer\" },\n { key: \"row_actions_max\", value: \"24\", type: \"integer\" },\n { key: \"sandbox_message_bytes\", value: \"65536\", type: \"integer\" },\n { key: \"sandbox_org_components\", value: \"true\", type: \"boolean\" },\n { key: \"scope_members_admitted\", value: \"true\", type: \"boolean\" },\n { key: \"scopes_written_in_the_store\", value: \"true\", type: \"boolean\" },\n { key: \"signup_provisioning_guard\", value: \"false\", type: \"boolean\" },\n { key: \"stage_rule_enforcement\", value: \"\\\"refuse\\\"\", type: \"enum\" },\n { key: \"table_record_ceiling\", value: \"150000\", type: \"integer\" },\n { key: \"table_sync_rows_max\", value: \"20000\", type: \"integer\" },\n { key: \"table_webhooks_max\", value: \"10\", type: \"integer\" },\n { key: \"time_zone\", value: \"\\\"UTC\\\"\", type: \"string\" },\n { key: \"value_max_bytes\", value: \"100000\", type: \"integer\" },\n { key: \"view_record_order_max\", value: \"20000\", type: \"integer\" },\n { key: \"week_start\", value: \"\\\"monday\\\"\", type: \"enum\" },\n { key: \"world_publish_enabled\", value: \"false\", type: \"boolean\" },\n] as const;\n\n/**\n * Every SQLSTATE the store's own function bodies raise, with the functions that\n * raise it. This is the list the client's refusal mapper is checked against: a\n * code the store can raise and the package cannot name is a hole, and the\n * real-door suite says so by name.\n */\nexport const STORE_REFUSAL_CODES = [\n { code: \"02000\", raised_by: \"_checklist_instantiate,_entity_change_file,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_restore,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_restore,doc_template_save,enrich_pin,entity_back_links,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_record_read,entity_row_propose,entity_row_write,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,field_choice_usage,field_restore,field_update_rehoming_choices,form_archive,form_restore,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_change_many,record_delete,record_restore,record_restore_preview,record_row_controls,record_row_controls_set,record_table,record_update,record_write_graph_superseding,relation_halves_repair,relation_restore,relation_uncarry,rule_restore,set_table_confidential_arman_explicitly_approved,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_archive_deliberately,table_restore,table_row_defaults,table_row_defaults_apply,table_row_defaults_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,template_from_tables,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state\" },\n { code: \"0A000\", raised_by: \"checklist_step_complete,entity_row_write,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,read_records_keyset,read_records_page,rule_eval,rule_filter_node_sql,work_assign\" },\n { code: \"22003\", raised_by: \"context_resolve\" },\n { code: \"22004\", raised_by: \"_entity_change_file,_entity_custom_fields_guard,_io_outbox_claim,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,assert_scope_door,booking_declare,capture_submit,checklist_declare,context_resolve,context_template_define,context_type_write,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,entity_field_protect_arman_explicitly_approved,entity_row_propose,entity_row_write,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_look_options,form_submit,home_add,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_outbox_release_claimed,io_outbox_subscribe,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_aggregate_as_of,record_delete,record_reparent,record_resolve,record_restore,record_update,record_upsert,record_write,record_write_graph,record_write_graph_superseding,record_write_many,relation_carry,relation_halves_repair,relation_own,row_template_declare,rule_declare,set_table_confidential_arman_explicitly_approved,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_archive_deliberately,table_declare,table_duplicate,table_move,table_restore,table_share_outside_grant,table_share_outside_invite,template_declare,value_restore,view_declare,view_designate,view_look_read,view_look_set,whole_value_complete,work_approval_decide,work_approval_request,work_template_declare\" },\n { code: \"22007\", raised_by: \"_template_date,agg_parse_moment,dashboard_window_sql\" },\n { code: \"22012\", raised_by: \"formula_eval,rule_eval,rule_sql_op\" },\n { code: \"22023\", raised_by: \"_action_check,_automation_fire,_booking_availability,_ctx_reference_value_holds,_ctx_store_scope,_ctx_table_template_field_holds,_ctx_tree_part,_decorations_check,_entity_change_file,_entity_custom_fields_guard,_form_flow_judge,_form_look_judge,_fx_date,_fx_num,_fx_regex,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_rule_eval_seated,_table_dimensions_check,_take_op_id,_template_bind,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,_write_via_mark,action_run,actor_word,agent_change_trust,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,context_scope_write,context_scopes,context_template_define,context_type_write,context_values,count_records_archived,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,data_home,data_home_changed_by,doc_render_body,doc_render_write,doc_signature_write,drill_resolve,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_back_links,entity_fields_across,entity_read_mask,entity_reference_rows,entity_reference_search,entity_reference_words,entity_row_write,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_access,field_history,field_update,form_declare,form_draft_save,form_visit,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbound_domain,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,listed_predicate_sql,member_records_take_over,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pick_list_create,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,publish_bind,query_by_coordinates,query_rollup,query_rollup_sum,read_records_archived,read_records_in_view_order,read_records_keyset,read_records_page,record_aggregate_as_of,record_change_many,record_filter_sql,record_row_controls_set,record_search_sql,record_update,record_upsert,record_write_graph,record_write_graph_superseding,record_write_many,records_search,relation_carry,relation_names_match,row_template_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_archive_deliberately,table_ensure,table_find,table_from_example,table_move,table_row_defaults_set,table_rules,table_share_outside_grant,table_sync,table_template_declare,table_transfer_owner,table_webhook_declare,template_declare,template_from_tables,template_install_claim,template_install_note,template_upgrade,templates,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold\" },\n { code: \"23503\", raised_by: \"_action_check,_automation_fire,_automation_flip,_booking_availability,_checklist_instantiate,_containment_guard,_ctx_store_value,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_form_flow_judge,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,automation_declare,automation_runs,automations,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_results,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,migrate_purge_hard,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,read_records_page,record_applicability,record_reparent,record_write_graph_superseding,relation_carry,relation_own,resolve_first_match,row_template_declare,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_dimensions_set,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,whole_value_complete,work_set_state,work_take_assignment,work_template_instantiate\" },\n { code: \"23505\", raised_by: \"_ctx_store_item,_ctx_store_scope,_ctx_store_type,_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,field_restore,field_update,form_restore,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,relation_restore,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold\" },\n { code: \"23514\", raised_by: \"_checklist_instantiate,_checklist_step_guard,_containment_guard,_ctx_scope_parent_holds,_ctx_store_item,_ctx_table_template_field_holds,_ctx_value_fits_its_scope,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_choice_keys,_entity_custom_fields_guard,_field_choices_save,_field_class_guard,_field_default_fitted,_field_document_for,_field_kind_shape_ok,_field_shape_guard,_field_type_parity_guard,_kind_value_ok,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,dashboard_restore,doc_sign,doc_signature_write,doc_template_restore,doc_template_save,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_records_find,entity_table,entity_value_write,field_declare,field_restore,field_retire,field_update,field_update_rehoming_choices,form_restore,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_update_adding_choices,record_upsert,record_write_graph,record_write_graph_superseding,relation_carry,relation_halves_repair,relation_own,relation_restore,rollup_value,row_template_declare,rule_restore,sign_request_create,sign_request_sign,status_groups_keyed,status_groups_of,table_from_example,table_restore,template_upgrade,validate_value_envelope,validate_values,whole_value_complete,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate\" },\n { code: \"40001\", raised_by: \"has_visibility_at,table_move,whole_value_complete\" },\n { code: \"42501\", raised_by: \"_agent_change_gate,_context_copy_fence,_copy_evaluation_note,_copy_evaluation_reimage,_copy_in_progress_guard,_doc_render_immutable,_doc_signature_immutable,_entity_change_file,_entity_custom_fields_guard,_field_definition_write,_field_write_door,_io_outbox_server_only,_not_a_member_refusal,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_share_write_person,_store_door,_table_dimensions_infer,_table_duplicate_step,_table_shape_guard,_template_call,_value_envelope,_workdoors_approval_guard,agent_change_trust,agent_table_claim,agg_fields_readable_assert,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_may_know_table,assert_organization_admin,assert_scope_door,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_item_archive,context_item_restore,context_item_write,context_resolve,context_scope_archive,context_scope_restore,context_scope_write,context_tags_set,context_type_archive,context_type_restore,context_type_write,conversation_scope_bind,conversation_scope_unbind,count_records_archived,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_row_propose,entity_row_write,entity_value_write,external_write_through,field_restore,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,protected_matches,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_keyset,read_records_matching,read_records_page,record_delete,record_row_controls,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,reverse_links_many,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_archive_deliberately,table_copies_in_progress,table_duplicate,table_duplicate_continue,table_kind_facts,table_move,table_row_defaults_apply,table_row_defaults_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_sync,table_templates,table_transfer_owner,table_webhook_declare,template_declare,template_install,template_upgrade,templates,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,whole_value_complete,work_approval_decide,work_approval_read,work_approval_request,work_person\" },\n { code: \"42703\", raised_by: \"entity_table,portal_declare\" },\n { code: \"42883\", raised_by: \"_template_call\" },\n { code: \"42P17\", raised_by: \"_field_reads_what_it_reads,far_value\" },\n { code: \"53400\", raised_by: \"anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field\" },\n { code: \"54000\", raised_by: \"_table_dimensions_check,action_run,data_home_changed_by,form_draft_save,hub_changed_by,pipeline_move_many,record_change_many,record_headers,relation_names_match,reverse_links_many,table_decorate,table_from_example,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many\" },\n { code: \"54001\", raised_by: \"record_delete\" },\n { code: \"55000\", raised_by: \"_code_depends_refuse,_io_outbox_claim,entity_field_protect_arman_explicitly_approved,inbox_clear,inbox_snooze,io_outbox_release,io_outbox_subscribe,table_duplicate,table_ensure,table_move,template_install,template_restore,template_upgrade,work_approval_decide,work_approval_request\" },\n { code: \"57014\", raised_by: \"formula_eval\" },\n { code: \"MXD01\", raised_by: \"_held_change_refusal\" },\n { code: \"MXD02\", raised_by: \"entity_row_propose\" },\n { code: \"P0001\", raised_by: \"action_run,context_scope_write\" },\n { code: \"P0002\", raised_by: \"inbox_clear,inbox_snooze,publish_bind,template_archive,template_install,template_install_claim,template_install_note,template_keep,template_restore,template_uninstall,template_upgrade,whole_value_complete\" },\n { code: \"PT409\", raised_by: \"entity_row_write,record_change_many,record_update,record_upsert,record_write_graph_superseding\" },\n { code: \"PT428\", raised_by: \"_record_rule_uses\" },\n] as const;\n\n/** `platform.entity_types` — the registered tokens a Table or relation may name. */\nexport const ENTITY_TOKENS = [\n \"access_delta_probe\",\n \"access_delta_run\",\n \"access_request\",\n \"account_addon\",\n \"account_closure\",\n \"acquisition_block\",\n \"activity\",\n \"admin_audit_log\",\n \"admin_email_log\",\n \"admin_markdown_sample\",\n \"admin_user\",\n \"admission_config\",\n \"agent\",\n \"agent_card\",\n \"agent_definition_version\",\n \"agent_drift_alert\",\n \"agent_exemplar\",\n \"agent_mandate_note\",\n \"agent_prompt_remediation\",\n \"agent_run\",\n \"agent_run_stage\",\n \"agent_schedule\",\n \"agent_schedule_claim\",\n \"agent_shortcut\",\n \"agent_surface_binding\",\n \"agent_template\",\n \"agent_term_list\",\n \"agent_usage\",\n \"agent_user_kv\",\n \"ai_api\",\n \"ai_calls\",\n \"ai_endpoint\",\n \"ai_model\",\n \"ai_model_alias\",\n \"ai_offering\",\n \"ai_provider\",\n \"ai_setting\",\n \"ai_setting_profile\",\n \"ai_translation_cell\",\n \"ai_usage_executions\",\n \"ai_usage_hourly\",\n \"ai_usage_hourly_watermark\",\n \"analysis_result\",\n \"anon_form\",\n \"anon_form_visit\",\n \"anon_function_birth_grandfather\",\n \"anon_hit\",\n \"anon_inbound\",\n \"anon_replay\",\n \"anon_submission\",\n \"anon_token\",\n \"api_field_warning\",\n \"api_request_log\",\n \"app\",\n \"app_config\",\n \"app_config_history\",\n \"app_definition_version\",\n \"app_error\",\n \"app_execution\",\n \"app_instance\",\n \"app_log\",\n \"app_log_muted_pattern\",\n \"app_log_norm_exception\",\n \"app_rate_limit\",\n \"app_setting\",\n \"app_sync_status\",\n \"approach\",\n \"artifact\",\n \"assessment\",\n \"assessment_item\",\n \"assessment_result\",\n \"assignment_session\",\n \"assist\",\n \"assist_producer_policy\",\n \"assist_producer_policy_history\",\n \"association_type\",\n \"assurance_level\",\n \"attempt\",\n \"audit_broken_functions\",\n \"audit_canonical_findings\",\n \"audit_exemption\",\n \"audit_function_deps\",\n \"audit_function_runtime_probe\",\n \"audit_m2m_candidates\",\n \"audit_refresh_log\",\n \"audit_stale_registry\",\n \"audit_unregistered_candidates\",\n \"base_entity_template\",\n \"batch_cost_event\",\n \"batch_provider_batch\",\n \"batch_work_item\",\n \"billing_capability\",\n \"billing_capability_limit\",\n \"billing_connect_account\",\n \"billing_coupon\",\n \"billing_coupon_redemption\",\n \"billing_customer\",\n \"billing_free_period_grant\",\n \"billing_plan\",\n \"billing_plan_limit\",\n \"billing_price\",\n \"billing_product\",\n \"billing_spend_approval\",\n \"billing_spend_guardrail\",\n \"billing_stripe_event\",\n \"billing_subscription\",\n \"billing_usage_ledger\",\n \"billing_usage_reset\",\n \"billing_user_plan\",\n \"block_state\",\n \"board\",\n \"browser_account_binding\",\n \"browser_action_event\",\n \"browser_authenticator_window\",\n \"browser_capture\",\n \"browser_control_request\",\n \"browser_handoff\",\n \"browser_login_attempt\",\n \"browser_login_recipe\",\n \"browser_profile\",\n \"browser_profile_checkpoint\",\n \"browser_run\",\n \"browser_site_observation\",\n \"browser_site_policy\",\n \"browser_stream_ticket\",\n \"build_lock\",\n \"calendar_event\",\n \"campaign_watch_ramp_gate_run\",\n \"campaign_watch_switch_outbox\",\n \"campaign_watch_switch_window\",\n \"canvas_comment\",\n \"canvas_comment_like\",\n \"canvas_item\",\n \"canvas_item_state\",\n \"canvas_like\",\n \"canvas_score\",\n \"canvas_view\",\n \"capture_window\",\n \"carrying_rule\",\n \"catalog_entries_history\",\n \"catalog_entry\",\n \"category\",\n \"change_type_default\",\n \"chat_user_usage_summary\",\n \"citations\",\n \"class_purchase\",\n \"classifier_revision_ledger\",\n \"client_callable_door\",\n \"client_callable_door_retirement\",\n \"client_excluded_column_unregistered\",\n \"cmp_entry\",\n \"cmp_feedback\",\n \"code_file\",\n \"code_folder\",\n \"code_repository\",\n \"coding_session\",\n \"coding_session_entry\",\n \"comment\",\n \"commerce_asset_allocation\",\n \"commerce_asset_grading\",\n \"commerce_asset_identifier\",\n \"commerce_asset_lot_event\",\n \"commerce_asset_mandate_result\",\n \"commerce_asset_price_factor\",\n \"commerce_asset_reshoot_request\",\n \"commerce_asset_review\",\n \"commerce_asset_unknown\",\n \"commerce_certified_printer\",\n \"commerce_cloud_sync_connection\",\n \"commerce_ebay_business_policy\",\n \"commerce_ebay_category\",\n \"commerce_ebay_category_aspect\",\n \"commerce_ebay_category_tree\",\n \"commerce_ebay_custom_policy\",\n \"commerce_ebay_inventory_item\",\n \"commerce_ebay_inventory_item_group\",\n \"commerce_ebay_inventory_item_group_member\",\n \"commerce_ebay_inventory_location\",\n \"commerce_ebay_listing\",\n \"commerce_ebay_marketplace_policy\",\n \"commerce_ebay_media_asset\",\n \"commerce_ebay_notification_destination\",\n \"commerce_ebay_notification_event\",\n \"commerce_ebay_notification_subscription\",\n \"commerce_ebay_notification_topic\",\n \"commerce_ebay_offer\",\n \"commerce_ebay_order\",\n \"commerce_ebay_order_line_item\",\n \"commerce_ebay_shipping_fulfillment\",\n \"commerce_ebay_store_category\",\n \"commerce_human_correction\",\n \"commerce_intake_artifact\",\n \"commerce_intake_asset\",\n \"commerce_intake_batch\",\n \"commerce_label_batch\",\n \"commerce_label_code\",\n \"commerce_marketplace_account\",\n \"commerce_marketplace_account_deletion_audit\",\n \"commerce_marketplace_api_call\",\n \"commerce_marketplace_rate_budget\",\n \"commerce_marketplace_site\",\n \"commerce_marketplace_sync_run\",\n \"commerce_prediction_outcome\",\n \"commerce_print_order\",\n \"commerce_product\",\n \"commerce_product_channel_ref\",\n \"commerce_product_media\",\n \"commerce_product_variant\",\n \"commerce_recall_audit\",\n \"communication_calendar_selected_snapshot_state\",\n \"communication_channel_readiness\",\n \"comparison_set\",\n \"component_group\",\n \"contact_medium\",\n \"contact_submission\",\n \"content_certification\",\n \"content_ir_kind\",\n \"content_ir_kind_component\",\n \"content_ir_kind_component_incident\",\n \"content_ir_kind_conformance\",\n \"content_ir_kind_edge\",\n \"content_ir_kind_example\",\n \"content_ir_kind_instance\",\n \"content_ir_kind_surface\",\n \"content_lane\",\n \"context_access_log\",\n \"context_item\",\n \"context_item_suggestion\",\n \"context_item_value\",\n \"context_value_refs\",\n \"conversation\",\n \"conversation_value\",\n \"courts\",\n \"credential_attachment\",\n \"credential_item\",\n \"credential_mutation_receipt\",\n \"crm_address\",\n \"crm_affiliation\",\n \"crm_blocklist_entry\",\n \"crm_contact_candidate\",\n \"crm_deal\",\n \"crm_deal_stage_event\",\n \"crm_enrichment_call\",\n \"crm_interaction\",\n \"crm_merge_candidate\",\n \"crm_outreach_list\",\n \"crm_outreach_list_member\",\n \"crm_party_merge\",\n \"crm_party_research\",\n \"crm_registry_ingest_run\",\n \"crm_registry_source\",\n \"crm_sending_claim\",\n \"crm_sending_event\",\n \"crm_sending_identity\",\n \"crm_sending_identity_check\",\n \"crm_sending_policy\",\n \"custom_agent_table_trust\",\n \"custom_agg_digest_checked\",\n \"custom_entity_definition\",\n \"custom_field_definition\",\n \"custom_field_target\",\n \"custom_io_outbox_consumer\",\n \"custom_io_outbox_consumption\",\n \"custom_record\",\n \"custom_share_tails_mine_repair\",\n \"custom_template\",\n \"custom_template_install\",\n \"cx_agent_memory\",\n \"cx_agent_plan\",\n \"cx_agent_task\",\n \"cx_code_edit\",\n \"cx_code_message_file\",\n \"cx_conversation_documents\",\n \"cx_media\",\n \"cx_observational_memory\",\n \"cx_observational_memory_event\",\n \"cx_pending_injection\",\n \"cx_request\",\n \"cx_request_snapshot\",\n \"cx_tool_trace\",\n \"cx_user_request\",\n \"cx_user_todo\",\n \"dashboard_saved_view\",\n \"data_rights_event\",\n \"data_store\",\n \"data_store_members\",\n \"dataset\",\n \"ddl_guard_log\",\n \"deck_suggestion\",\n \"definer_class_exemption\",\n \"definer_client_grant_grandfather\",\n \"definer_grant_baseline\",\n \"deprecated_relation\",\n \"derive_run\",\n \"dev_login_audit\",\n \"dict_entry\",\n \"dict_provider_publication\",\n \"dict_setting\",\n \"dm_conversation\",\n \"dm_message\",\n \"dm_participant\",\n \"doc_render\",\n \"doc_signature\",\n \"dockets\",\n \"document\",\n \"document_version\",\n \"domain_classification\",\n \"edge_payload_kind\",\n \"egress_device\",\n \"egress_pairing\",\n \"egress_ticket\",\n \"emails\",\n \"embedding_cache\",\n \"embeddings_google_gemini_2_1536\",\n \"embeddings_oai_3_small_1536\",\n \"embeddings_voyage_4_large_1024\",\n \"embeddings_voyage_code_3_1024\",\n \"endpoint_family_sweep_state\",\n \"engine_owner_task\",\n \"entity_grant\",\n \"entity_protected_value\",\n \"entity_protected_value_version\",\n \"entity_relationship\",\n \"entity_type\",\n \"esign_campaign\",\n \"esign_campaign_member\",\n \"esign_consent_disclosure\",\n \"esign_envelope\",\n \"esign_envelope_certificate\",\n \"esign_envelope_document\",\n \"esign_envelope_event\",\n \"esign_envelope_external_ref\",\n \"esign_envelope_signer\",\n \"esign_provider\",\n \"esign_provider_binding\",\n \"esign_signing_key\",\n \"execution_event_cursor\",\n \"extension_auth_code\",\n \"external_link\",\n \"external_source\",\n \"extract_sweep_state\",\n \"fc_card\",\n \"fc_detail\",\n \"fc_set\",\n \"feature_doc\",\n \"feature_knob\",\n \"feedback_comments\",\n \"feedback_user_messages\",\n \"field_component\",\n \"file\",\n \"file_analysis\",\n \"file_entities\",\n \"file_overrides\",\n \"file_page_annotations\",\n \"file_pages\",\n \"file_rag_job\",\n \"file_version\",\n \"files_account_tier\",\n \"files_machine_written_prefix\",\n \"files_sync_mapping\",\n \"files_user_account\",\n \"flashcard_data\",\n \"flashcard_history\",\n \"flashcard_sets\",\n \"flexible_data\",\n \"folder\",\n \"function_contract\",\n \"game_badge\",\n \"game_result\",\n \"game_room\",\n \"global_execution\",\n \"global_execution_checkpoint\",\n \"global_execution_control\",\n \"global_execution_event\",\n \"global_meter_entry\",\n \"global_origin\",\n \"global_request\",\n \"google_document\",\n \"growth_loop_event\",\n \"growth_loop_run\",\n \"growth_loop_stage_run\",\n \"guardian_link\",\n \"guest_conversion_audit\",\n \"guest_execution_log\",\n \"guest_executions\",\n \"guided_checklist_run\",\n \"heatmap_save\",\n \"hindsight_enrollment\",\n \"hindsight_finding\",\n \"hindsight_regression_case\",\n \"hindsight_replay\",\n \"hindsight_replay_step\",\n \"hindsight_review\",\n \"hr_access_audit\",\n \"hr_access_role\",\n \"hr_accommodation_request\",\n \"hr_ai_evidence\",\n \"hr_alert_routing_rule\",\n \"hr_application\",\n \"hr_approval_authority\",\n \"hr_approval_delegation\",\n \"hr_asset\",\n \"hr_asset_assignment\",\n \"hr_attendance_exception\",\n \"hr_auto_close_rule\",\n \"hr_availability\",\n \"hr_background_check\",\n \"hr_benefits_event\",\n \"hr_calculation_snapshot\",\n \"hr_candidate\",\n \"hr_candidate_conversion\",\n \"hr_candidate_message\",\n \"hr_careers_portal\",\n \"hr_checklist_item\",\n \"hr_checklist_run\",\n \"hr_checklist_template\",\n \"hr_checklist_template_item\",\n \"hr_compensation\",\n \"hr_corrective_action\",\n \"hr_course\",\n \"hr_course_version\",\n \"hr_credential\",\n \"hr_crew\",\n \"hr_deduction_code\",\n \"hr_department\",\n \"hr_derived_grant\",\n \"hr_disposition_event\",\n \"hr_earning_code\",\n \"hr_eeo_response\",\n \"hr_emergency_contact\",\n \"hr_employee\",\n \"hr_employee_private\",\n \"hr_employer_profile\",\n \"hr_employment\",\n \"hr_employment_pin\",\n \"hr_engagement\",\n \"hr_establishment\",\n \"hr_external_identity\",\n \"hr_field_policy\",\n \"hr_holiday\",\n \"hr_holiday_calendar\",\n \"hr_i9\",\n \"hr_i9_document\",\n \"hr_incident\",\n \"hr_incident_party\",\n \"hr_interview\",\n \"hr_interview_kit\",\n \"hr_job_title\",\n \"hr_jurisdiction\",\n \"hr_jurisdiction_rule\",\n \"hr_jurisdiction_rule_class\",\n \"hr_jurisdiction_rule_org_decision\",\n \"hr_jurisdiction_rule_test\",\n \"hr_kiosk_device\",\n \"hr_kiosk_session\",\n \"hr_labor_target\",\n \"hr_leave_case\",\n \"hr_leave_enrollment\",\n \"hr_leave_ledger\",\n \"hr_leave_policy\",\n \"hr_leave_request\",\n \"hr_legal_hold\",\n \"hr_legal_hold_item\",\n \"hr_location\",\n \"hr_new_hire_report\",\n \"hr_offer\",\n \"hr_opening\",\n \"hr_overtime_alert\",\n \"hr_overtime_alert_rule\",\n \"hr_overtime_preapproval\",\n \"hr_pay_group\",\n \"hr_pay_period\",\n \"hr_pay_period_employment\",\n \"hr_payroll_export\",\n \"hr_payroll_export_line\",\n \"hr_position_assignment\",\n \"hr_posting\",\n \"hr_posting_publication\",\n \"hr_provider_binding\",\n \"hr_provider_event\",\n \"hr_provisioning_result\",\n \"hr_punch\",\n \"hr_recalculation_batch\",\n \"hr_record_class\",\n \"hr_records_request\",\n \"hr_reference_check\",\n \"hr_reporting_line\",\n \"hr_requisition\",\n \"hr_restricted_note\",\n \"hr_retention_rule\",\n \"hr_role_assignment\",\n \"hr_schedule\",\n \"hr_schedule_change\",\n \"hr_schedule_guidance\",\n \"hr_schedule_template\",\n \"hr_schedule_template_shift\",\n \"hr_scorecard\",\n \"hr_separation\",\n \"hr_shift\",\n \"hr_shift_claim\",\n \"hr_staffing_requirement\",\n \"hr_survey\",\n \"hr_survey_invitation\",\n \"hr_survey_question\",\n \"hr_survey_response\",\n \"hr_tax_registration\",\n \"hr_tax_withholding\",\n \"hr_time_adjustment\",\n \"hr_training_assignment\",\n \"hr_training_attempt\",\n \"hr_transcript_entry\",\n \"hr_verification_letter_request\",\n \"hr_work_interval\",\n \"hr_workflow_binding\",\n \"hr_workflow_decision\",\n \"hr_workflow_definition\",\n \"hr_workflow_event\",\n \"hr_workflow_failure\",\n \"hr_workflow_flow_type\",\n \"hr_workflow_instance\",\n \"hr_workflow_step\",\n \"hr_workflow_step_definition\",\n \"hr_workweek\",\n \"html_extraction\",\n \"iam_access_audit\",\n \"iam_api_key\",\n \"iam_emergency_door_request\",\n \"iam_org_availability_key\",\n \"iam_read_lane_v2_rollout\",\n \"idempotency\",\n \"industry\",\n \"industry_curator\",\n \"infra_status\",\n \"ingest_runs\",\n \"integration_connection\",\n \"integration_connection_resource\",\n \"interview_decision_interview\",\n \"interview_decision_question\",\n \"interview_document_revision\",\n \"interview_hole\",\n \"interview_question\",\n \"interview_session\",\n \"interview_turn\",\n \"invitation\",\n \"invitation_code\",\n \"invitation_request\",\n \"io_comment\",\n \"io_contract\",\n \"io_import\",\n \"io_outbox\",\n \"item\",\n \"item_mastery\",\n \"judge_verdict\",\n \"jurisdiction_policy\",\n \"keyword_classification_queue\",\n \"kg_alert\",\n \"kg_chunk_entities\",\n \"kg_chunks\",\n \"kg_clusters\",\n \"kg_edges\",\n \"kg_entities\",\n \"kg_entity_aliases\",\n \"kg_suggestion_ack\",\n \"kg_sweep_queue\",\n \"kg_sweep_run\",\n \"kg_sweep_state\",\n \"kg_value_match\",\n \"knob_override\",\n \"knob_override_audit\",\n \"knob_rung_lock\",\n \"knob_scope_kind\",\n \"knob_write_door\",\n \"league_membership\",\n \"learn_doc\",\n \"library_doc\",\n \"lifecycle_archive\",\n \"lifecycle_archive_row\",\n \"lifecycle_audit\",\n \"lifecycle_entity_plan\",\n \"lifecycle_map_build\",\n \"lifecycle_reference_map\",\n \"lifecycle_run\",\n \"lifecycle_tier_ledger\",\n \"location\",\n \"mandate\",\n \"mandate_advance_batch_row\",\n \"mandate_binding\",\n \"mandate_candidate\",\n \"mandate_candidate_run\",\n \"mandate_candidate_run_payload\",\n \"mandate_goal_clauses\",\n \"mandate_observation\",\n \"mandate_reference\",\n \"mandate_scan\",\n \"mandate_treatment\",\n \"marketing_initiative\",\n \"masterwork_corpus_item\",\n \"masterwork_run\",\n \"masterwork_run_kind\",\n \"masterwork_source\",\n \"math_course_structure\",\n \"math_problem\",\n \"matrx_action_ledger\",\n \"mcp_config\",\n \"mcp_server\",\n \"mcp_user_conn\",\n \"media_capture_handoff\",\n \"media_catalog_setting\",\n \"media_library_item\",\n \"media_selection_item\",\n \"media_selection_job\",\n \"media_source_library\",\n \"meet_call_invite\",\n \"meet_chat_message\",\n \"meet_invitee\",\n \"meet_meeting\",\n \"meet_note\",\n \"meet_occurrence_override\",\n \"meet_participant\",\n \"meet_recording\",\n \"meet_transcript_segment\",\n \"membership\",\n \"membership_grant\",\n \"merge_field_provenance\",\n \"message\",\n \"message_template\",\n \"message_template_detail\",\n \"meta_excluded_schema\",\n \"meta_table_stats_history\",\n \"metadata_reserved_keys\",\n \"microservice_project\",\n \"migration_log\",\n \"mtx_media_heal_queue\",\n \"mtx_public_url_guard\",\n \"ner_shadow\",\n \"note\",\n \"note_folder\",\n \"notification\",\n \"notification_channel_preference\",\n \"notification_event_override\",\n \"notification_event_type\",\n \"notification_preference\",\n \"notification_submission\",\n \"notify_outsider_door_baseline\",\n \"oauth_handoff_claim\",\n \"opinion_clusters\",\n \"opinions\",\n \"ops_auth_lock_watchdog_log\",\n \"ops_check_item\",\n \"ops_check_run\",\n \"ops_db_host_sample\",\n \"ops_issue_class\",\n \"ops_issue_event\",\n \"ops_proof_check\",\n \"ops_proof_run\",\n \"ops_proof_scenario\",\n \"org_admin_audit\",\n \"org_change_policy\",\n \"org_context_ledger\",\n \"org_industries\",\n \"org_member_control\",\n \"org_module_config\",\n \"org_plan\",\n \"organization\",\n \"organization_preferences\",\n \"organization_visibility_version\",\n \"output_feedback\",\n \"outreach_acceptance\",\n \"page_extraction_job\",\n \"page_extraction_page_run\",\n \"page_extraction_results\",\n \"page_extraction_runs\",\n \"page_intent_queue\",\n \"page_mapping_queue\",\n \"part_config\",\n \"part_config_sub\",\n \"party\",\n \"party_contact_point\",\n \"passkey_credential\",\n \"pb_claim_appeals_fd31de\",\n \"pb_insurance_claims_fd31de\",\n \"pc_article\",\n \"pc_episode\",\n \"pc_show\",\n \"pc_studio_run\",\n \"pc_studio_run_asset\",\n \"pdf_consolidation_log\",\n \"pdf_redaction_audit\",\n \"pdf_redaction_key_escrow\",\n \"permission_grant\",\n \"personal_data_column\",\n \"plan_cms_fill_item\",\n \"plan_cms_fill_job\",\n \"plan_entity\",\n \"plan_node\",\n \"plan_node_artifact\",\n \"plan_node_step\",\n \"plan_profile\",\n \"platform_action_request\",\n \"platform_actor_session\",\n \"platform_actor_token\",\n \"platform_actor_token_event\",\n \"platform_class_approval_by_arman\",\n \"platform_continued_access\",\n \"platform_cutover_census_run\",\n \"platform_cutover_evaluation_replaced\",\n \"platform_cutover_evaluation_write\",\n \"platform_cutover_seam\",\n \"platform_cutover_seam_measure\",\n \"platform_cutover_seam_press\",\n \"platform_dated_change\",\n \"platform_doors_only_pending_cutover\",\n \"platform_google_calendar_event_create_intent\",\n \"platform_google_task_create_intent\",\n \"platform_kernel_fingerprint_record\",\n \"platform_org_knob_override\",\n \"platform_outcome_event\",\n \"platform_outsider_consumer\",\n \"platform_provision_base_contract_pending\",\n \"platform_reachability\",\n \"platform_reachability_rebuild_pending\",\n \"platform_realtime_topic_prefix\",\n \"platform_reference_category\",\n \"platform_reference_declaration\",\n \"platform_repo\",\n \"platform_saved_view\",\n \"platform_schema\",\n \"platform_secure_delivery\",\n \"platform_share_link\",\n \"platform_strict_class_probe\",\n \"platform_user_knob_override\",\n \"podcast_race\",\n \"position\",\n \"processed_document\",\n \"processed_document_page\",\n \"product_capture_file\",\n \"product_capture_item\",\n \"product_capture_payload\",\n \"product_capture_product\",\n \"product_capture_question\",\n \"profile\",\n \"project\",\n \"prompt\",\n \"provider_account\",\n \"provider_account_credential\",\n \"provision\",\n \"provision_generate_target\",\n \"provision_grant\",\n \"provision_marker\",\n \"provision_rule_message\",\n \"provision_schema\",\n \"provision_shape_debt\",\n \"provision_spec\",\n \"provision_spec_grandfather\",\n \"provision_vocabulary\",\n \"provlock_recall_visits_all8u5\",\n \"public_compat_wrapper\",\n \"public_placement_baseline\",\n \"public_placement_domain\",\n \"public_restore_permit\",\n \"purpose\",\n \"quiz_session\",\n \"rag_ingest_run\",\n \"rag_library_audit_log\",\n \"rate_limit_buckets\",\n \"reachability_pending\",\n \"recompute_queue\",\n \"record\",\n \"record_alias\",\n \"redaction_mapping\",\n \"research_analysis\",\n \"research_content\",\n \"research_context_bundle\",\n \"research_document\",\n \"research_intent\",\n \"research_keyword\",\n \"research_media\",\n \"research_source\",\n \"research_synthesis\",\n \"research_tag\",\n \"research_template\",\n \"research_topic\",\n \"retention_policy\",\n \"retrieval_audit\",\n \"review_queue\",\n \"route_manifest_entry\",\n \"row_version\",\n \"rulebook\",\n \"runtime_operation_stream\",\n \"runtime_operation_stream_batch\",\n \"sandbox_instance\",\n \"sch_agent_task\",\n \"sch_run\",\n \"sch_task\",\n \"sch_trigger\",\n \"schema_client_exposure\",\n \"schema_migration_ledger\",\n \"schema_migration_legacy\",\n \"schema_migration_slot_grandfather\",\n \"schema_templates\",\n \"scope\",\n \"scope_association_suggestion\",\n \"scope_dataset_instance\",\n \"scope_door_registry\",\n \"scope_item_value_suggestion\",\n \"scope_suggestion\",\n \"scope_type\",\n \"scrape_domain\",\n \"scrape_domain_settings\",\n \"scrape_failure_log\",\n \"scrape_parsed_page\",\n \"scrape_path_override\",\n \"scrape_path_pattern\",\n \"scrape_retry_queue\",\n \"search_item\",\n \"seo_ai_capability\",\n \"seo_ai_visibility_citation\",\n \"seo_ai_visibility_claim\",\n \"seo_ai_visibility_panel\",\n \"seo_ai_visibility_response\",\n \"seo_ai_visibility_signal\",\n \"seo_backlink\",\n \"seo_backlink_change_event\",\n \"seo_backlink_dimension_snapshot\",\n \"seo_backlink_observation\",\n \"seo_backlink_snapshot\",\n \"seo_change_assessment\",\n \"seo_change_event\",\n \"seo_change_item\",\n \"seo_change_metric\",\n \"seo_change_set\",\n \"seo_change_theory\",\n \"seo_collection_run\",\n \"seo_competitor\",\n \"seo_competitor_observation\",\n \"seo_competitor_opportunity\",\n \"seo_coverage_mention\",\n \"seo_coverage_tracker\",\n \"seo_dimension_value_matcher\",\n \"seo_engine_schedule\",\n \"seo_geo_place\",\n \"seo_gsc_dig_rule\",\n \"seo_keyword\",\n \"seo_keyword_class_rule\",\n \"seo_keyword_edge\",\n \"seo_keyword_facet\",\n \"seo_keyword_market\",\n \"seo_keyword_market_observation\",\n \"seo_keyword_place\",\n \"seo_keyword_saved_view\",\n \"seo_keyword_topic\",\n \"seo_landscape_brief\",\n \"seo_link_gap_domain\",\n \"seo_link_gap_match\",\n \"seo_map_facet\",\n \"seo_map_facet_value\",\n \"seo_map_topic\",\n \"seo_page_measurement_health\",\n \"seo_page_performance\",\n \"seo_pr_moment\",\n \"seo_provider_call\",\n \"seo_provider_task\",\n \"seo_rank_observation\",\n \"seo_rank_target\",\n \"seo_raw_payload\",\n \"seo_referring_domain_profile\",\n \"seo_reputation_case\",\n \"seo_search_performance_daily\",\n \"seo_serp_mention\",\n \"seo_serp_opportunity\",\n \"seo_serp_result\",\n \"seo_serp_snapshot\",\n \"seo_site_geo_area\",\n \"seo_site_keyword_offering\",\n \"seo_site_keyword_value\",\n \"seo_site_offering_value\",\n \"seo_site_topic_value\",\n \"seo_site_value_combo\",\n \"seo_site_value_worth\",\n \"seo_site_vocabulary\",\n \"seo_source_request\",\n \"seo_starter_pack\",\n \"seo_starter_pack_item\",\n \"seo_story_angle\",\n \"seo_topic\",\n \"seo_topical_map\",\n \"seo_tracker_story\",\n \"seo_web_analytics_daily\",\n \"share_link\",\n \"shareable_resource_registry\",\n \"shared_canvas_item\",\n \"short_link\",\n \"shortcut_category\",\n \"sign_in_fk_legacy\",\n \"skill\",\n \"skill_category\",\n \"skill_detail\",\n \"skill_render_definition\",\n \"sms_consent\",\n \"sms_conversation\",\n \"sms_message\",\n \"sms_message_media\",\n \"sms_notification\",\n \"sms_notification_preference\",\n \"sms_phone_number\",\n \"sms_rate_limits\",\n \"sms_webhook_logs\",\n \"soft_delete_cascade_job\",\n \"soft_delete_edge\",\n \"source_authority\",\n \"space_payload\",\n \"stage_ref_kind\",\n \"stamped_write_table\",\n \"structure\",\n \"structured_list\",\n \"studio_cleaned_segments\",\n \"studio_concept_items\",\n \"studio_documents\",\n \"studio_module_segments\",\n \"studio_raw_segments\",\n \"studio_recording_chunks\",\n \"studio_recording_segments\",\n \"studio_run\",\n \"studio_session\",\n \"studio_session_settings\",\n \"study_attempt\",\n \"study_goal\",\n \"study_media\",\n \"study_plan\",\n \"study_plan_block\",\n \"study_plan_day\",\n \"study_reminder_context\",\n \"study_reminder_delivery\",\n \"study_session\",\n \"study_source_chunk\",\n \"study_streak\",\n \"study_structured_section\",\n \"superseded_policy\",\n \"surface\",\n \"system_announcement\",\n \"system_context_item\",\n \"system_error\",\n \"system_orgs\",\n \"system_write_failure\",\n \"t13_backfill_ledger\",\n \"t13_default_ledger\",\n \"t13_row_column_events\",\n \"tag\",\n \"task\",\n \"task_user_state\",\n \"taxonomy_node\",\n \"team\",\n \"template_context_items\",\n \"template_scope_types\",\n \"templates\",\n \"test_handset_inbox\",\n \"test_handset_verification\",\n \"thread\",\n \"tool\",\n \"tool_binding\",\n \"tool_bundle\",\n \"tool_call\",\n \"tool_definition_version\",\n \"tool_executor\",\n \"tool_surface_defaults\",\n \"tool_test_sample\",\n \"tool_ui\",\n \"tool_ui_incident\",\n \"tool_ui_version\",\n \"topic_placement_queue\",\n \"transcript\",\n \"trigger_event\",\n \"udt_dataset_fields\",\n \"udt_dataset_row_versions\",\n \"udt_dataset_rows\",\n \"udt_dataset_template\",\n \"udt_dataset_template_fields\",\n \"udt_document\",\n \"udt_document_snapshot\",\n \"udt_structured_list_items\",\n \"udt_workbook_snapshot\",\n \"ui_client\",\n \"ui_surface_action\",\n \"ui_surface_agent_pref\",\n \"ui_surface_agent_role\",\n \"ui_surface_client_tool\",\n \"ui_surface_config\",\n \"ui_surface_item_type\",\n \"ui_surface_value\",\n \"ui_surface_write_target\",\n \"univer_payload\",\n \"unsubscribe_token\",\n \"uploads_inflight\",\n \"user\",\n \"user_achievement\",\n \"user_active_context\",\n \"user_analysis_preference\",\n \"user_email_preference\",\n \"user_entity_state\",\n \"user_feedback\",\n \"user_follows\",\n \"user_form_profile\",\n \"user_markdown_sample\",\n \"user_memory\",\n \"user_preference\",\n \"user_profile\",\n \"user_secret\",\n \"user_secret_audit\",\n \"user_secret_grant\",\n \"user_stat\",\n \"user_storage_usage\",\n \"user_surface_state\",\n \"vault_fill_approvals\",\n \"vault_fill_devices\",\n \"vault_fill_nonces\",\n \"visibility_cache\",\n \"visibility_epoch\",\n \"voice\",\n \"war_room\",\n \"wbx_demo\",\n \"wbx_guidance\",\n \"wbx_highlight\",\n \"wbx_pattern\",\n \"wbx_recipe\",\n \"wbx_screenshot\",\n \"wbx_seo_audit\",\n \"wc_claim\",\n \"wc_impairment_definition\",\n \"wc_injury\",\n \"wc_report\",\n \"web_analysis_item\",\n \"web_brand\",\n \"web_brand_asset\",\n \"web_brand_offering\",\n \"web_business_fact\",\n \"web_business_location\",\n \"web_channel_analytics_daily\",\n \"web_crawl_event\",\n \"web_crawl_preset\",\n \"web_crawl_schedule\",\n \"web_crawl_session\",\n \"web_crawl_url\",\n \"web_discovered_item\",\n \"web_finding\",\n \"web_gsc_page_stat\",\n \"web_link_edge\",\n \"web_listing_publisher\",\n \"web_location_listing\",\n \"web_news_item\",\n \"web_offering_template\",\n \"web_page\",\n \"web_page_content\",\n \"web_page_evidence\",\n \"web_page_sitemap\",\n \"web_property\",\n \"web_provider\",\n \"web_result\",\n \"web_screenshot\",\n \"web_site\",\n \"web_site_endpoint_rule\",\n \"web_site_item_config\",\n \"web_site_offering\",\n \"web_sitemap\",\n \"web_snapshot\",\n \"web_tag_manager_snapshot\",\n \"web_voice_fingerprint\",\n \"web_youtube_video\",\n \"webhook_deliveries\",\n \"webhook_dispatch_state\",\n \"webhooks\",\n \"wf_node_data_slot\",\n \"work_claim\",\n \"work_item\",\n \"workbook\",\n \"worker_heartbeat\",\n \"workflow\",\n \"workflow_card\",\n \"workflow_checkpoint\",\n \"workflow_comparison\",\n \"workflow_definition_version\",\n \"workflow_idempotency\",\n \"workflow_job\",\n \"workflow_node_events\",\n \"workflow_node_outcome\",\n \"workflow_plan\",\n \"workflow_plan_event\",\n \"workflow_plan_sample\",\n \"workflow_recovery_audit\",\n \"workflow_run\",\n \"workflow_run_cost\",\n \"workflow_run_facts\",\n \"workflow_run_log\",\n \"workflow_runtime_surface\",\n \"workflow_template\",\n \"workflow_trigger\",\n \"workflow_trigger_fire\",\n \"workflow_work_item\",\n \"working_document\",\n \"write_guard_key\",\n \"youtube_quota_day\",\n \"youtube_search\",\n \"youtube_video\",\n] as const;\n\nexport type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number][\"code\"];\nexport type StoreDoorName = (typeof STORE_DOORS)[number][\"name\"];\nexport type EntityToken = (typeof ENTITY_TOKENS)[number];\nexport type KernelTableName = (typeof KERNEL_TABLES)[number][\"name\"];\n","// src/vocabulary.ts — @ai-matrx/records\n//\n// THE CLOSED VOCABULARIES. Every list here is a word set the STORE enforces,\n// and the store is the only place any of them is decided. The literal values\n// are not typed by hand: `src/store.generated.ts` is regenerated from the live\n// catalogue by `pnpm records:generate`, and `pnpm check:store-registry` fails\n// the build the moment this package and the database disagree. What lives HERE\n// is the type layer over those literals, so a wrong word is a compile error in\n// a consumer rather than a `23514` at three in the morning.\n\nimport {\n ACTOR_VOCABULARY,\n ABSENCE_REASONS,\n VALUE_ENVELOPE_KEYS,\n VALUE_ALTERNATE_KEYS,\n STORAGE_MODES,\n RULE_USES,\n PER_VALUE_ACCESS_WORDS,\n PARITY_FIELD_TYPES,\n DECLARABLE_FIELD_KINDS,\n RULE_NODE_KINDS,\n RETIRED_ACTOR_WORDS,\n} from \"./store.generated\";\n\n/**\n * VAL-8. Who wrote a value. `user`, `agent`, `system` — enforced by every write\n * door, and the three retired words (`human`, `ai`, `code`) are translated by\n * the store's own `custom.actor_word`, never by a caller.\n */\nexport type Actor = (typeof ACTOR_VOCABULARY)[number];\n\n/** The words the store still accepts and rewrites, mapped to what they become. */\nexport type RetiredActorWord = keyof typeof RETIRED_ACTOR_WORDS;\n\n/**\n * VAL-2. Why a value is missing. A value is never blank for an unexplained\n * reason: it either holds something or it says one of these four words.\n */\nexport type AbsenceReason = (typeof ABSENCE_REASONS)[number];\n\n/** The closed key set of one value envelope (VAL-1 … VAL-4). */\nexport type ValueEnvelopeKey = (typeof VALUE_ENVELOPE_KEYS)[number];\n\n/** The closed key set of one ranked alternate (VAL-3). */\nexport type ValueAlternateKey = (typeof VALUE_ALTERNATE_KEYS)[number];\n\n/**\n * REC-4. `heavy` is indexed storage with Rules on write; `light` is\n * whole-document storage with Rules on read. Per Table, one store.\n */\nexport type StorageMode = (typeof STORAGE_MODES)[number];\n\n/** REC-15. One Rule object, four uses. */\nexport type RuleUse = (typeof RULE_USES)[number];\n\n/**\n * VAL-5 / VAL-6. The words that may NOT appear inside a value envelope:\n * Visibility and access belong to a Field and to a Record, never to a value.\n * The store refuses each of them by name and so does this package's mirror.\n */\nexport type PerValueAccessWord = (typeof PER_VALUE_ACCESS_WORDS)[number];\n\n/** FLD-11. The parity floor: the field type a person picks in the UI. */\nexport type ParityFieldType = (typeof PARITY_FIELD_TYPES)[number][\"parity_type\"];\n\n/**\n * THE ONE REGISTRY, as a type: every kind a column can be DECLARED as.\n *\n * `ParityFieldType` above is the parity FLOOR — the answer to \"which of the fourteen\n * is this field\". It is not the answer to \"what may somebody pick\", and reading it as\n * though it were is exactly how `signature` came to be a field shape the store accepted\n * (`custom.doc_sign` takes no other) and no screen could offer: VERIFIER-10, F6.\n * `custom.field_kinds()` is the registry, and this is generated from it.\n */\nexport type DeclarableFieldKind = (typeof DECLARABLE_FIELD_KINDS)[number][\"kind\"];\n\n/** FLD-1. The five behaviours a Field can have. One, exactly, and closed. */\nexport type FieldBehavior = (typeof PARITY_FIELD_TYPES)[number][\"behavior\"];\n\n/** The node kinds `custom.rule_eval` evaluates. */\nexport type RuleNodeKind = (typeof RULE_NODE_KINDS)[number][\"node\"];\n\n/**\n * REC-32. The seven table types, closed. The parenthesised names are the\n * retired ones the doctrine records; never coin an eighth.\n */\nexport const TABLE_TYPES = [\n \"entity\",\n \"detail\",\n \"reference\",\n \"ledger\",\n \"restricted\",\n \"system\",\n \"deprecated\",\n] as const;\nexport type TableType = (typeof TABLE_TYPES)[number];\n\n/** REC-33. The two origins. A table we ship in schema `custom` is `standard`. */\nexport const TABLE_ORIGINS = [\"standard\", \"custom\"] as const;\nexport type TableOrigin = (typeof TABLE_ORIGINS)[number];\n\n/** REL-1. Ownership is one fact, stored once, read from the field's side. */\nexport const RELATION_FLAVORS = [\"owned\", \"referenced\"] as const;\nexport type RelationFlavor = (typeof RELATION_FLAVORS)[number];\n\n/** REL-2. What happens to the far side, separate from flavour. */\nexport const ON_DELETE = [\"cascade\", \"set_null\", \"restrict\"] as const;\nexport type OnDelete = (typeof ON_DELETE)[number];\n\n/** REL-3. A snapshot is a frozen copy in the relation's payload, never a pointer. */\nexport const RELATION_BINDINGS = [\"live\", \"snapshot\"] as const;\nexport type RelationBinding = (typeof RELATION_BINDINGS)[number];\n\n/** REL-7. */\nexport const RELATION_CARDINALITIES = [\"one\", \"many\"] as const;\nexport type RelationCardinality = (typeof RELATION_CARDINALITIES)[number];\n\n/** FLD-7. Where a Field's values come from. */\nexport const FIELD_SOURCES = [\"manual\", \"formula\", \"agent\", \"synced\"] as const;\nexport type FieldSource = (typeof FIELD_SOURCES)[number];\n\n/** FLD-9. A Formula declares whether it computes on read or on write. */\nexport const COMPUTE_ON = [\"read\", \"write\"] as const;\nexport type ComputeOn = (typeof COMPUTE_ON)[number];\n\n/**\n * AGT-7 / FLD-12. A Field's sensitivity sets a ceiling a merge field can never\n * widen — and these are THE STORE'S four words, checked against its own guard.\n *\n * This list used to read `standard · sensitive · secret`, which the store has\n * never accepted: writing a Field with `sensitivity: \"standard\"` is refused\n * with \"the field <name> has to say how sensitive its values are, and it says\n * standard\". The knob `custom/field_sensitivity_levels` keys off these same\n * four words to decide which level may read and edit each one, so a package\n * carrying three different words could never have agreed with it. Corrected\n * against the live store, 2026-09-18.\n */\nexport const FIELD_SENSITIVITIES = [\"public\", \"internal\", \"confidential\", \"restricted\"] as const;\nexport type FieldSensitivity = (typeof FIELD_SENSITIVITIES)[number];\n\n/** DYN-17 / §D. Which tier a MERGE FIELD's value is delivered in. */\nexport const DELIVERIES = [\"inline\", \"on_demand\", \"auto\"] as const;\nexport type Delivery = (typeof DELIVERIES)[number];\n\n/**\n * FLD-12. WHETHER AN AGENT MAY SEE A FIELD'S VALUES, and these are the STORE'S\n * four words — not the merge field's delivery tiers.\n *\n * `Field.context_policy` used to be typed as `Delivery` here, which is a\n * different question with a different vocabulary: writing a Field with\n * `context_policy: \"inline\"` is refused with \"the field <name> has to say\n * whether an agent may see its values, and it says inline\". Delivery is about\n * HOW MUCH of a value a merge field carries into a turn; this is about WHETHER\n * the value reaches an agent at all, and conflating them let a screen offer a\n * word the store has never accepted. Corrected against the live store,\n * 2026-09-18.\n */\nexport const CONTEXT_POLICIES = [\"include\", \"summarize\", \"exclude\", \"on_request\"] as const;\nexport type ContextPolicy = (typeof CONTEXT_POLICIES)[number];\n\n/** DYN-3. The eight sources, closed. Relationships and rules are not sources. */\nexport const MERGE_FIELD_SOURCES = [\n \"literal\",\n \"record\",\n \"state\",\n \"actor\",\n \"platform\",\n \"user_input\",\n \"tool\",\n \"derived\",\n] as const;\nexport type MergeFieldSource = (typeof MERGE_FIELD_SOURCES)[number];\n\n/** DYN-4. What a merge field resolves INTO. The consumer never learns which. */\nexport const MERGE_FIELD_SEMANTIC_TYPES = [\n \"value\",\n \"reference\",\n \"resolver\",\n \"computed\",\n \"collection\",\n] as const;\nexport type MergeFieldSemanticType = (typeof MERGE_FIELD_SEMANTIC_TYPES)[number];\n\n/** DYNAMIC-VALUES §A. Any number of these; never fused into the source. */\nexport const MERGE_FIELD_MODIFIERS = [\n \"scoped\",\n \"temporal\",\n \"collection\",\n \"live\",\n \"fallback\",\n \"formatted\",\n \"required\",\n] as const;\nexport type MergeFieldModifier = (typeof MERGE_FIELD_MODIFIERS)[number];\n\n/** DYN-12. The five override policies. Exactly one, and it outranks the ladder. */\nexport const OVERRIDE_POLICIES = [\n \"must_supply\",\n \"shown_overridable\",\n \"shown_locked\",\n \"server_fixed\",\n \"derived\",\n] as const;\nexport type OverridePolicy = (typeof OVERRIDE_POLICIES)[number];\n\n/** DYNAMIC-VALUES §C. What a resolved merge field's freshness was. */\nexport const FRESHNESS = [\"live\", \"cached\", \"snapshot\"] as const;\nexport type Freshness = (typeof FRESHNESS)[number];\n\n/** REC-1. How a Table shows itself. */\nexport const TABLE_DISPLAYS = [\"list\", \"grid\", \"board\", \"calendar\", \"timeline\"] as const;\nexport type TableDisplay = (typeof TABLE_DISPLAYS)[number];\n","// src/use-cases/validate.ts — @ai-matrx/records/use-cases\n//\n// THE FORCING FUNCTION FOR A DATASET.\n//\n// A use-case file is data, and data has no compiler beyond its types: TypeScript\n// will happily accept a template whose relationship points at a table that does\n// not exist, whose row carries a field nobody declared, whose `select` field\n// offers no choices, or whose pipeline names a stage the field will not accept.\n// Every one of those produces a seed run that half-works and a screenshot that\n// quietly lies.\n//\n// So this validator is the gate, and the suite runs it over EVERY registered use\n// case. It refuses in the store's own spirit: by sentence, naming the thing that\n// is wrong and what to do about it — never a bare code.\n//\n// It checks three kinds of thing:\n// · THE LAW — the sentence is there, the data is free of placeholder junk.\n// · THE SHAPE — field types are words the store resolves, tables declare\n// their title field, choices exist where a choice is required.\n// · THE GRAPH — relationships, relation fields, row references, the form,\n// the pipeline, the dashboard question, the document's merge\n// fields and the notification rule all name things that exist.\n\nimport { DECLARABLE_FIELD_KINDS, PARITY_FIELD_TYPES, STORAGE_MODES } from \"../store.generated\";\nimport {\n CONTEXT_POLICIES,\n FIELD_SENSITIVITIES,\n ON_DELETE,\n RELATION_CARDINALITIES,\n RELATION_FLAVORS,\n TABLE_DISPLAYS,\n TABLE_TYPES,\n} from \"../vocabulary\";\nimport { describePlaceholder, findPlaceholders } from \"./placeholders\";\nimport type { UseCase, UseCaseField, UseCaseTable } from \"./types\";\n\n/** The plain synonyms `custom._field_document_for` resolves besides the parity types. */\nconst PLAIN_TYPE_WORDS = [\n \"number\",\n \"integer\",\n \"decimal\",\n \"float\",\n \"long_text\",\n \"string\",\n] as const;\n\n/**\n * Every word a `parityType` may be: the parity types, every kind the declaration door\n * publishes (`custom.field_kinds()` — entity_reference, signature, long_text …, which a\n * lane-8 template needs for S4 and e-sign), their behaviours, the synonyms.\n */\nexport const RESOLVABLE_FIELD_TYPE_WORDS: readonly string[] = [\n ...new Set([\n ...PARITY_FIELD_TYPES.map((t) => t.parity_type),\n ...DECLARABLE_FIELD_KINDS.map((k) => k.kind),\n ...PARITY_FIELD_TYPES.map((t) => t.behavior),\n ...PLAIN_TYPE_WORDS,\n ]),\n];\n\n/** The parity types whose value IS a choice, and therefore need a choice list. */\nconst CHOICE_TYPES = new Set([\"select\", \"multi_select\", \"list\"]);\n/** The parity types that point at another table. */\nconst RELATION_TYPES = new Set([\"relation\", \"attachment\", \"member\"]);\n\n/**\n * The minimum a seeded business needs before a screen looks like it is working\n * rather than like a fixture. Below this, a screenshot shows an empty state.\n *\n * It was 8 until a real dataset argued with it: a whole-house renovation has SIX\n * ROOMS, and demanding eight would have meant inventing two rooms that do not\n * exist — which is the exact failure this whole library is against. Six rooms on\n * a board is a working project, not an empty screen. So the floor is what a\n * screen genuinely needs, and the suite keeps the stronger check where it\n * belongs: at least 20 rows across the whole use case.\n */\nexport const MIN_ROWS_IN_PRIMARY_TABLE = 5;\n\n/** A refusal: what is wrong, where, and what to do. */\nexport interface UseCaseProblem {\n /** Dotted path into the use case: \"tables[1].fields[3].choices\". */\n at: string;\n /** The sentence. Always says what to do, never only what is wrong. */\n says: string;\n}\n\nexport interface UseCaseVerdict {\n ok: boolean;\n problems: UseCaseProblem[];\n}\n\nfunction fieldsByKey(table: UseCaseTable): Map<string, UseCaseField> {\n return new Map(table.fields.map((f) => [f.key, f]));\n}\n\n/**\n * The test-fixture classification, written where a NAME goes.\n *\n * Both shapes the crews actually shipped: the parenthesised suffix\n * (\"Birchwood Ave Renovation (test fixture)\") and the prefix, where the word is\n * simply the first word of the name (\"Fixture Hands & Hope Alliance\"). The\n * prefix form is invisible to the whole-document junk sweep, which is why this\n * check reads the name fields themselves.\n */\nconst FIXTURE_IN_NAME = /\\(\\s*test\\s+fixture\\s*\\)|\\btest[\\s_-]fixture\\b|^\\s*fixtures?\\b/i;\n\n/**\n * Every place in a use case whose value is a NAME a person reads on a screen —\n * the business, its tables and their labels, the form, the pipeline, the\n * document template, the dashboard question. Paired with its dotted path so the\n * refusal can say exactly which name it means.\n */\nfunction nameFields(useCase: UseCase): Array<[string, string | undefined]> {\n const out: Array<[string, string | undefined]> = [\n [\"business.name\", useCase.business?.name],\n [\"business.legalName\", useCase.business?.legalName],\n [\"form.name\", useCase.form?.name],\n [\"pipeline.name\", useCase.pipeline?.name],\n ];\n useCase.tables?.forEach((table, ti) => {\n out.push([`tables[${ti}].name`, table.name]);\n out.push([`tables[${ti}].labelSingular`, table.labelSingular]);\n out.push([`tables[${ti}].labelPlural`, table.labelPlural]);\n });\n return out;\n}\n\n/**\n * Check one use case. Returns every problem rather than the first, because a\n * crew fixing a dataset wants the whole list in one pass.\n */\nexport function validateUseCase(useCase: UseCase): UseCaseVerdict {\n const problems: UseCaseProblem[] = [];\n const say = (at: string, says: string) => problems.push({ at, says });\n\n // ── THE LAW ───────────────────────────────────────────────────────────────\n\n const sentence = (useCase.useCase ?? \"\").trim();\n if (sentence.length < 40) {\n say(\n \"useCase\",\n \"The use case needs ONE full sentence at the top saying who the user is, what business they run, and what job this feature does for them. \" +\n `This one is ${sentence.length} characters, which is not that sentence.`,\n );\n }\n if (sentence && !/[.!?]$/.test(sentence)) {\n say(\"useCase\", \"The use-case sentence should read as a sentence and end in a full stop.\");\n }\n\n // The junk check runs over the WHOLE template, values and labels alike.\n // Row KEYS are local handles (\"visit-001\"), never shown; the sweep reads what a screen shows.\n const shown = { ...useCase, tables: useCase.tables?.map((t) => ({ ...t, rows: t.rows?.map((r) => ({ values: r.values })) })) };\n for (const hit of findPlaceholders(JSON.stringify(shown, null, 1))) {\n say(useCase.id, describePlaceholder(hit));\n }\n\n // THE CHAIR'S RULING, 2026-09-21: \"test fixture\" is a CLASSIFICATION the\n // organization carries in its kind/metadata — the `test_fixture` flag in its\n // settings, which is also how cleanup finds it. It is NEVER part of a name.\n // A name is what the owner reads on the screen, and a screen that says\n // \"Birchwood Ave Renovation (test fixture)\" has told him the product is a\n // rehearsal. The generic junk sweep above catches the parenthesised form\n // anywhere; this names the NAME it is in, and catches the \"Fixture …\" prefix\n // that sweep cannot see, because there the word IS the first word of a name.\n for (const [at, value] of nameFields(useCase)) {\n if (!value) continue;\n if (FIXTURE_IN_NAME.test(value)) {\n say(\n at,\n `\"${value}\" carries the test-fixture classification in a name. ` +\n \"Name it after the business this use case is about, and carry the classification where it belongs — \" +\n \"`test_fixture: true` in the organization's settings, which is also how cleanup finds it (never by a junk name).\",\n );\n }\n }\n\n if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(useCase.id ?? \"\")) {\n say(\"id\", `The id \"${useCase.id}\" should be kebab-case, like \"harbor-dental-new-patient-intake\".`);\n }\n if (!useCase.cleanupTag) {\n say(\n \"cleanupTag\",\n \"Every use case needs a cleanup tag: it is written into the test organization's settings so cleanup finds it by tag and never by a junk name.\",\n );\n }\n if (useCase.provenance?.noRealPeople !== true) {\n say(\n \"provenance.noRealPeople\",\n \"State in the data that every person, address, phone and mailbox here is invented and belongs to nobody.\",\n );\n }\n if (useCase.provenance?.kind === \"public-data\" && !useCase.provenance.source) {\n say(\"provenance.source\", \"A use case drawn from public data has to name the dataset it came from.\");\n }\n\n // ── THE SHAPE ─────────────────────────────────────────────────────────────\n\n if (!useCase.tables?.length) {\n say(\"tables\", \"A use case needs at least one table — the business's own records.\");\n return { ok: false, problems };\n }\n\n const tablesByToken = new Map(useCase.tables.map((t) => [t.token, t]));\n if (tablesByToken.size !== useCase.tables.length) {\n say(\"tables\", \"Two tables share a token. Each table's token is its address and has to be unique.\");\n }\n\n useCase.tables.forEach((table, ti) => {\n const at = `tables[${ti}] (${table.token})`;\n if (!/^[a-z][a-z0-9_]*$/.test(table.token ?? \"\")) {\n say(`${at}.token`, `\"${table.token}\" should be snake_case and start with a letter.`);\n }\n if (!TABLE_TYPES.includes(table.type)) {\n say(`${at}.type`, `\"${table.type}\" is not one of the seven table types: ${TABLE_TYPES.join(\", \")}.`);\n }\n if (!TABLE_DISPLAYS.includes(table.display)) {\n say(`${at}.display`, `\"${table.display}\" is not one of: ${TABLE_DISPLAYS.join(\", \")}.`);\n }\n if (!STORAGE_MODES.includes(table.weight)) {\n say(`${at}.weight`, `\"${table.weight}\" is not one of: ${STORAGE_MODES.join(\", \")}.`);\n }\n\n const keyed = fieldsByKey(table);\n if (keyed.size !== table.fields.length) {\n say(`${at}.fields`, \"Two fields share a key. A field key is unique within its table.\");\n }\n if (!keyed.has(table.titleField)) {\n say(\n `${at}.titleField`,\n `The title field \"${table.titleField}\" is not one of this table's fields — without it a record cannot be a chip.`,\n );\n }\n\n table.fields.forEach((field, fi) => {\n const fat = `${at}.fields[${fi}] (${field.key})`;\n if (!/^[a-z][a-z0-9_]*$/.test(field.key ?? \"\")) {\n say(`${fat}.key`, `\"${field.key}\" should be snake_case and start with a letter.`);\n }\n if (!RESOLVABLE_FIELD_TYPE_WORDS.includes(field.parityType)) {\n say(\n `${fat}.parityType`,\n `The store does not resolve the type word \"${field.parityType}\". Use one of: ${RESOLVABLE_FIELD_TYPE_WORDS.join(\", \")}.`,\n );\n }\n if (!FIELD_SENSITIVITIES.includes(field.sensitivity)) {\n say(\n `${fat}.sensitivity`,\n `The store refuses a field that does not say how sensitive its values are. Use one of: ${FIELD_SENSITIVITIES.join(\", \")}.`,\n );\n }\n if (!CONTEXT_POLICIES.includes(field.contextPolicy)) {\n say(\n `${fat}.contextPolicy`,\n `The store refuses a field that does not say whether an agent may see its values. Use one of: ${CONTEXT_POLICIES.join(\", \")}.`,\n );\n }\n if (CHOICE_TYPES.has(field.parityType) && !field.choices?.length) {\n say(\n `${fat}.choices`,\n \"A choice field has to list the business's real words, in the order they really happen — 'Scheduled, Confirmed, Seen, No-show'.\",\n );\n }\n if (RELATION_TYPES.has(field.parityType) && field.relationTarget && !tablesByToken.has(field.relationTarget)) {\n say(`${fat}.relationTarget`, `It points at the table \"${field.relationTarget}\", which this use case does not declare.`);\n }\n if (field.parityType === \"currency\" && !field.unit) {\n say(`${fat}.unit`, \"A currency field carries its currency as the unit — the unit changes the meaning.\");\n }\n });\n\n // ── the rows ──\n const rowKeys = new Set<string>();\n table.rows.forEach((row, ri) => {\n const rat = `${at}.rows[${ri}] (${row.key})`;\n if (!row.key) say(`${rat}.key`, \"Every row needs a stable local key so relationships can point at it.\");\n if (rowKeys.has(row.key)) say(`${rat}.key`, `The row key \"${row.key}\" is used twice in this table.`);\n rowKeys.add(row.key);\n for (const valueKey of Object.keys(row.values ?? {})) {\n if (!keyed.has(valueKey)) {\n say(`${rat}.values.${valueKey}`, `This row sets \"${valueKey}\", which the table does not declare as a field.`);\n }\n }\n for (const field of table.fields) {\n if (field.required && (row.values?.[field.key] === undefined || row.values?.[field.key] === null)) {\n say(`${rat}.values.${field.key}`, `\"${field.label}\" is required, and this row leaves it empty.`);\n }\n const value = row.values?.[field.key];\n if (value !== undefined && field.choices?.length && !field.multi) {\n if (typeof value === \"string\" && !field.choices.includes(value)) {\n say(\n `${rat}.values.${field.key}`,\n `\"${value}\" is not one of \"${field.label}\"'s choices (${field.choices.join(\", \")}).`,\n );\n }\n }\n }\n });\n });\n\n // The table the screens are really about should look like a working business.\n const primary = useCase.tables[0];\n if (primary && primary.rows.length < MIN_ROWS_IN_PRIMARY_TABLE) {\n say(\n `tables[0] (${primary.token}).rows`,\n `${primary.rows.length} rows makes the screen look empty. Seed at least ${MIN_ROWS_IN_PRIMARY_TABLE} — dozens is better.`,\n );\n }\n\n // ── THE GRAPH ─────────────────────────────────────────────────────────────\n\n const resolveField = (tableToken: string, fieldKey: string): UseCaseField | undefined =>\n tablesByToken.get(tableToken)?.fields.find((f) => f.key === fieldKey);\n\n useCase.relationships?.forEach((rel, i) => {\n const at = `relationships[${i}]`;\n if (!tablesByToken.has(rel.fromTable)) {\n say(`${at}.fromTable`, `There is no table \"${rel.fromTable}\" in this use case.`);\n return;\n }\n if (!tablesByToken.has(rel.toTable)) {\n say(`${at}.toTable`, `There is no table \"${rel.toTable}\" in this use case.`);\n }\n const field = resolveField(rel.fromTable, rel.fromField);\n if (!field) {\n say(`${at}.fromField`, `The table \"${rel.fromTable}\" does not declare a field \"${rel.fromField}\".`);\n } else if (!RELATION_TYPES.has(field.parityType)) {\n say(\n `${at}.fromField`,\n `\"${rel.fromField}\" is a ${field.parityType} field, so it cannot hold a relation. Declare it as a relation.`,\n );\n } else if (field.relationTarget && field.relationTarget !== rel.toTable) {\n say(\n `${at}.fromField`,\n `The field points at \"${field.relationTarget}\" but the relationship says \"${rel.toTable}\". They have to agree.`,\n );\n }\n if (!RELATION_FLAVORS.includes(rel.flavor)) {\n say(`${at}.flavor`, `\"${rel.flavor}\" is not one of: ${RELATION_FLAVORS.join(\", \")}.`);\n }\n if (!RELATION_CARDINALITIES.includes(rel.cardinality)) {\n say(`${at}.cardinality`, `\"${rel.cardinality}\" is not one of: ${RELATION_CARDINALITIES.join(\", \")}.`);\n }\n if (!ON_DELETE.includes(rel.onDelete)) {\n say(`${at}.onDelete`, `\"${rel.onDelete}\" is not one of: ${ON_DELETE.join(\", \")}.`);\n }\n if (!rel.describes || rel.describes.length < 15) {\n say(`${at}.describes`, \"Say the domain truth in a sentence — 'an invoice belongs to the job it bills'.\");\n }\n\n // Every row's relation value has to resolve to a row in the target table.\n const target = tablesByToken.get(rel.toTable);\n const targetKeys = new Set(target?.rows.map((r) => r.key) ?? []);\n tablesByToken.get(rel.fromTable)?.rows.forEach((row, ri) => {\n const value = row.values?.[rel.fromField];\n if (value === undefined || value === null) return;\n for (const ref of Array.isArray(value) ? value : [value]) {\n if (typeof ref === \"string\" && !targetKeys.has(ref)) {\n say(\n `tables (${rel.fromTable}).rows[${ri}].values.${rel.fromField}`,\n `It points at the row \"${ref}\", which does not exist in \"${rel.toTable}\".`,\n );\n }\n }\n });\n });\n\n // ── the form ──\n const form = useCase.form;\n if (!form) {\n say(\"form\", \"A use case owes a form a practitioner in this business would really put in front of someone.\");\n } else {\n if (!tablesByToken.has(form.table)) {\n say(\"form.table\", `The form collects into \"${form.table}\", which this use case does not declare.`);\n } else {\n form.fields?.forEach((ff, i) => {\n if (!resolveField(form.table, ff.fieldKey)) {\n say(`form.fields[${i}]`, `The form asks for \"${ff.fieldKey}\", which \"${form.table}\" does not declare.`);\n }\n });\n }\n if (!form.fields?.length) say(\"form.fields\", \"The form has to ask for something.\");\n if (!form.confirmation) say(\"form.confirmation\", \"Say what the person sees after they submit, in real words.\");\n }\n\n // ── the pipeline ──\n const pipeline = useCase.pipeline;\n if (!pipeline) {\n say(\"pipeline\", \"A use case owes the real lifecycle a record moves through in this business.\");\n } else {\n const stageField = resolveField(pipeline.table, pipeline.stageField);\n if (!tablesByToken.has(pipeline.table)) {\n say(\"pipeline.table\", `The pipeline runs on \"${pipeline.table}\", which this use case does not declare.`);\n } else if (!stageField) {\n say(\"pipeline.stageField\", `\"${pipeline.table}\" does not declare a field \"${pipeline.stageField}\".`);\n } else if (!stageField.choices?.length) {\n say(\"pipeline.stageField\", `\"${pipeline.stageField}\" has to be a choice field so a record can hold a stage.`);\n } else {\n pipeline.stages?.forEach((stage, i) => {\n if (!stageField.choices?.includes(stage.key)) {\n say(\n `pipeline.stages[${i}]`,\n `The stage \"${stage.key}\" is not one of \"${pipeline.stageField}\"'s choices (${stageField.choices?.join(\", \")}).`,\n );\n }\n });\n }\n if ((pipeline.stages?.length ?? 0) < 3) {\n say(\"pipeline.stages\", \"A lifecycle worth showing has at least three stages the staff actually say out loud.\");\n }\n }\n\n // ── the dashboard question ──\n const question = useCase.dashboardQuestion;\n if (!question) {\n say(\"dashboardQuestion\", \"A use case owes the question this business's owner really asks on Monday morning.\");\n } else {\n if (!question.question?.trim().endsWith(\"?\")) {\n say(\"dashboardQuestion.question\", \"Write it as the question they would actually say, ending in a question mark.\");\n }\n if (!tablesByToken.has(question.table)) {\n say(\"dashboardQuestion.table\", `It reads \"${question.table}\", which this use case does not declare.`);\n } else {\n if (question.aggregate !== \"count\" && !question.of) {\n say(\"dashboardQuestion.of\", `A ${question.aggregate} has to name the field it aggregates.`);\n }\n for (const [prop, key] of [\n [\"of\", question.of],\n [\"groupBy\", question.groupBy],\n ] as const) {\n if (key && !resolveField(question.table, key)) {\n say(`dashboardQuestion.${prop}`, `\"${question.table}\" does not declare a field \"${key}\".`);\n }\n }\n }\n if (!question.whyItMatters) {\n say(\"dashboardQuestion.whyItMatters\", \"Say what they DO differently depending on the answer.\");\n }\n }\n\n // ── the document template ──\n const doc = useCase.documentTemplate;\n if (!doc) {\n say(\"documentTemplate\", \"A use case owes a document this business really sends.\");\n } else {\n if (!tablesByToken.has(doc.table)) {\n say(\"documentTemplate.table\", `It is built from \"${doc.table}\", which this use case does not declare.`);\n }\n const declared = new Set(doc.mergeFields?.map((m) => m.key) ?? []);\n const used = new Set(\n [...`${doc.title}\\n${doc.body}`.matchAll(/\\{\\{\\s*([a-z0-9_.]+)\\s*\\}\\}/gi)]\n .map((m) => m[1])\n .filter((key): key is string => key !== undefined),\n );\n for (const key of used) {\n if (!declared.has(key)) {\n say(\"documentTemplate.body\", `The document uses {{${key}}} but does not declare it as a merge field.`);\n }\n }\n for (const merge of doc.mergeFields ?? []) {\n if (!used.has(merge.key)) {\n say(\"documentTemplate.mergeFields\", `It declares {{${merge.key}}} but the document never uses it.`);\n }\n const isSpecial = merge.from === \"business\" || merge.from === \"today\" || merge.from.startsWith(\"business.\");\n if (!isSpecial && tablesByToken.has(doc.table) && !resolveField(doc.table, merge.from)) {\n say(\n \"documentTemplate.mergeFields\",\n `{{${merge.key}}} reads \"${merge.from}\", which \"${doc.table}\" does not declare (use a field key, or \"business\"/\"today\").`,\n );\n }\n }\n if ((doc.body ?? \"\").length < 80) {\n say(\"documentTemplate.body\", \"Write the prose this business would really send, not a stub.\");\n }\n }\n\n // ── the notification rule ──\n const rule = useCase.notificationRule;\n if (!rule) {\n say(\"notificationRule\", \"A use case owes the one automatic message this business sets up on day one.\");\n } else {\n if (!tablesByToken.has(rule.when.table)) {\n say(\"notificationRule.when.table\", `It watches \"${rule.when.table}\", which this use case does not declare.`);\n } else {\n if (rule.when.field && !resolveField(rule.when.table, rule.when.field)) {\n say(\"notificationRule.when.field\", `\"${rule.when.table}\" does not declare a field \"${rule.when.field}\".`);\n }\n if (rule.when.event === \"stage_entered\" && !rule.when.stage) {\n say(\"notificationRule.when.stage\", \"A stage trigger has to say which stage it fires on.\");\n }\n if ((rule.when.event === \"due\" || rule.when.event === \"overdue\") && !rule.when.field) {\n say(\"notificationRule.when.field\", \"A due trigger has to name the date field it watches.\");\n }\n }\n if (!rule.message) say(\"notificationRule.message\", \"Write the message this business would really send.\");\n if (!rule.audience) say(\"notificationRule.audience\", \"Say who it reaches, in the business's own words.\");\n }\n\n return { ok: problems.length === 0, problems };\n}\n\n/**\n * Validate, and throw with every problem listed. This is what a seeder calls\n * before it writes anything to a live organization — a half-valid dataset is\n * worse than none, because it produces a screen that looks like it worked.\n */\nexport function assertUseCase(useCase: UseCase): void {\n const verdict = validateUseCase(useCase);\n if (verdict.ok) return;\n const lines = verdict.problems.map((p) => ` · ${p.at}: ${p.says}`);\n throw new Error(\n `The use case \"${useCase.id}\" is not ready to seed — ${verdict.problems.length} problem(s):\\n${lines.join(\"\\n\")}`,\n );\n}\n","// src/use-cases/registry.ts — @ai-matrx/records/use-cases\n//\n// THE REGISTER OF REAL USE CASES.\n//\n// One line per use case, and that line is the ONLY thing a crew adds besides\n// its own file. There is deliberately no duplicated metadata here — no industry\n// column, no business name, no row counts — because a second copy of a fact is\n// a second copy that goes stale. Everything a caller wants to list is derived\n// by loading the file (`listUseCases`).\n//\n// The loaders are dynamic imports so a consumer that shows ONE business does not\n// pull fourteen of them into its bundle. `loadAllUseCases` is for the suite, the\n// seeders and the census — all of which run in Node and want the lot.\n\nimport type { UseCase, UseCaseSummary } from \"./types\";\n\n/**\n * Every registered use case, by id. ADD YOUR LINE HERE and nowhere else.\n *\n * Keep it alphabetical — it is read by people looking for an industry.\n */\nexport const USE_CASE_LOADERS: Record<string, () => Promise<{ useCase: UseCase }>> = {\n \"alvarado-chen-kitchen-weekly-cooking\": () => import(\"./alvarado-chen-kitchen-weekly-cooking\"),\n \"birchwood-avenue-renovation-budget\": () => import(\"./birchwood-avenue-renovation-budget\"),\n \"harbor-dental-new-patient-intake\": () => import(\"./harbor-dental-new-patient-intake\"),\n \"ridgeline-physical-therapy-plan-of-care\": () => import(\"./ridgeline-physical-therapy-plan-of-care\"),\n};\n\n/** The ids, sorted, so any listing is stable. */\nexport function useCaseIds(): string[] {\n return Object.keys(USE_CASE_LOADERS).sort();\n}\n\n/** Load one by id. Throws by name when it is not registered. */\nexport async function loadUseCase(id: string): Promise<UseCase> {\n const loader = USE_CASE_LOADERS[id];\n if (!loader) {\n throw new Error(\n `There is no use case registered as \"${id}\". Registered: ${useCaseIds().join(\", \")}.`,\n );\n }\n const module = await loader();\n return module.useCase;\n}\n\n/** Load all of them. For the suite, the seeders and the census. */\nexport async function loadAllUseCases(): Promise<UseCase[]> {\n return Promise.all(useCaseIds().map((id) => loadUseCase(id)));\n}\n\n/** Summarize one without the caller walking its tables. */\nexport function summarize(useCase: UseCase): UseCaseSummary {\n return {\n id: useCase.id,\n useCase: useCase.useCase,\n industry: useCase.industry,\n businessName: useCase.business.name,\n tableCount: useCase.tables.length,\n rowCount: useCase.tables.reduce((total, table) => total + table.rows.length, 0),\n };\n}\n\n/** Every use case, summarized. Loads all of them, so call it server-side. */\nexport async function listUseCases(): Promise<UseCaseSummary[]> {\n return (await loadAllUseCases()).map(summarize);\n}\n\n/**\n * Pick the use case for a given consumer, deterministically.\n *\n * The law says to ROTATE across industries so the platform is exercised by many\n * kinds of business rather than one toy. A suite, a demo or a screenshot script\n * passes a stable name for itself and always gets the same business — stable\n * enough to assert on, different enough across consumers that the platform gets\n * exercised broadly.\n */\nexport function useCaseFor(consumer: string): string {\n const ids = useCaseIds();\n let hash = 0;\n for (let i = 0; i < consumer.length; i += 1) {\n hash = (hash * 31 + consumer.charCodeAt(i)) >>> 0;\n }\n const id = ids[hash % ids.length];\n if (!id) {\n throw new Error(\n `No use cases are registered, so there is nothing to give \"${consumer}\". Add one to USE_CASE_LOADERS.`,\n );\n }\n return id;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAwBa,SAkTN;AA1UP;AAAA;AAAA;AAwBO,IAAM,UAAmB;AAAA,MAC9B,IAAI;AAAA,MACJ,SACE;AAAA,MACF,UAAU;AAAA,MACV,YAAY;AAAA,MAEZ,UAAU;AAAA,QACR,MAAM;AAAA,QACN,WAAW;AAAA,QACX,SAAS;AAAA,UACP,OAAO;AAAA,UACP,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,SAAS;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,MAEA,QAAQ;AAAA,QACN;AAAA,UACE,OAAO;AAAA,UACP,MAAM;AAAA,UACN,eAAe;AAAA,UACf,aAAa;AAAA,UACb,MAAM;AAAA,UACN,SAAS;AAAA,UACT,QAAQ;AAAA,UACR,SAAS;AAAA,UACT,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,QAAQ;AAAA,YACN,EAAE,KAAK,SA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