@ai-matrx/records 0.76.17 → 0.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/app-table/index.cjs +81 -0
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.d.cts +7 -7
- package/dist/app-table/index.d.ts +7 -7
- package/dist/app-table/index.js +81 -0
- package/dist/app-table/index.js.map +1 -1
- package/dist/{client-kVZ54twD.d.ts → client-BbzLb-sB.d.ts} +53 -5
- package/dist/{client-PaKP4Cnd.d.cts → client-BcGGEpNi.d.cts} +53 -5
- package/dist/core/index.cjs +93 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +21 -11
- package/dist/core/index.d.ts +21 -11
- package/dist/core/index.js +93 -6
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +81 -0
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +6 -6
- package/dist/data/index.d.ts +6 -6
- package/dist/data/index.js +81 -0
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-Bv4V8Bjm.d.cts → declareTable-COEPJpke.d.cts} +4 -4
- package/dist/{declareTable-4MK51nXs.d.ts → declareTable-Dxq0Aega.d.ts} +4 -4
- package/dist/{field-DkB6Nods.d.cts → field-BTW7h7Wh.d.cts} +1 -1
- package/dist/{field-cWRPTM3U.d.ts → field-D7I9yck6.d.ts} +1 -1
- package/dist/index.cjs +26 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/memory/index.cjs +31 -0
- package/dist/memory/index.cjs.map +1 -1
- package/dist/memory/index.d.cts +6 -6
- package/dist/memory/index.d.ts +6 -6
- package/dist/memory/index.js +31 -0
- package/dist/memory/index.js.map +1 -1
- package/dist/{ports-C2_pOWrL.d.ts → ports-CaYEF1dG.d.ts} +1 -1
- package/dist/{ports-C83nhjoM.d.cts → ports-PpvsH1cQ.d.cts} +1 -1
- package/dist/react/index.cjs +93 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +325 -15
- package/dist/react/index.d.ts +325 -15
- package/dist/react/index.js +93 -6
- package/dist/react/index.js.map +1 -1
- package/dist/realtime/index.d.cts +2 -2
- package/dist/realtime/index.d.ts +2 -2
- package/dist/{record-DVtXK-6L.d.cts → record-B7iwye2k.d.cts} +75 -13
- package/dist/{record-DVtXK-6L.d.ts → record-B7iwye2k.d.ts} +75 -13
- package/dist/{subscription-BJgDMerQ.d.cts → subscription-BWaRPLyo.d.ts} +67 -3
- package/dist/{subscription-D8OHY3kw.d.ts → subscription-Br30ZwIt.d.cts} +67 -3
- package/dist/{table-kind-BtguhnRV.d.cts → table-kind-C5jsmotR.d.ts} +140 -4
- package/dist/{table-kind-DzyRtFNa.d.ts → table-kind-DrVhYZbX.d.cts} +140 -4
- package/dist/templates/index.cjs +27 -3
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.d.cts +11 -11
- package/dist/templates/index.d.ts +11 -11
- package/dist/templates/index.js +27 -3
- package/dist/templates/index.js.map +1 -1
- package/dist/{types-C6gdqgsI.d.ts → types-DWZ5_3by.d.ts} +2 -2
- package/dist/{types-DWoJFBbr.d.cts → types-DYoWzHwJ.d.cts} +2 -2
- package/dist/{types-DqCWKOYh.d.ts → types-DrJLOqVi.d.ts} +2 -2
- package/dist/{types-Mx-Wzm_d.d.cts → types-LvxsZ6Zv.d.cts} +2 -2
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +5 -5
- package/dist/use-cases/index.d.ts +5 -5
- package/dist/use-cases/index.js.map +1 -1
- package/dist/{validate-CEE0ts9g.d.cts → validate-CRdXE73G.d.cts} +1 -1
- package/dist/{validate-d9QMYjBm.d.ts → validate-j0WQoC3C.d.ts} +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.77.1
|
|
4
|
+
|
|
5
|
+
- (0.77.0 never reached npm: its publish stopped on `table-kind-round-trip`'s golden check — the Python twin's golden still wrote the Rate Card formula literal as `{value: 25}` after cc7dc30f6a made the captured facts `{const: 25}`; the twin now says `const` too.)
|
|
6
|
+
|
|
7
|
+
## 0.77.0
|
|
8
|
+
|
|
9
|
+
- `formPreviewRoute({ table_id, questions, endings, values })` → `FormRoute` (`custom.form_preview_route`): the store's whole route through a draft form — showIf AND logic jumps, the ending reached and the score. Lane TYPEFORM-DUP.
|
|
10
|
+
- `formResults({ form_id })` → `FormResults` (`custom.form_results`): views, starts, completions, completion rate, drop-off and answers per question, endings, score and hidden fields.
|
|
11
|
+
- `store.generated.ts` regenerated from the live catalogue.
|
|
12
|
+
|
|
13
|
+
**Consumer action:** none.
|
|
14
|
+
|
|
15
|
+
## 0.76.20
|
|
16
|
+
|
|
17
|
+
- Automations on a table (lane AUTOMATION-DOOR): `client.automationDeclare` / `automations` / `automationArchive` / `automationRestore` / `automationSetEnabled` / `automationRuns` over the six `custom.automation*` doors, and the types in `src/automation.ts` (`AutomationSpec`, `AutomationDeclared`, `AutomationRun` …). A spec the store refuses comes back as `data.ok === false` with `_errors` (one sentence per path). The shape, in plain words with one example, is in FEATURE.md § Automations on a table. Test: `src/__tests__/automation.test.ts`; the doors' own proof is matrx-frontend `scripts/campaign-tests/automation_door_green.sql`.
|
|
18
|
+
|
|
19
|
+
**Consumer action:** none (additive; `pnpm sync-types`).
|
|
20
|
+
|
|
21
|
+
## 0.76.19
|
|
22
|
+
|
|
23
|
+
- (0.76.18 never reached npm: its publish stopped on a live-guard test that pinned which DDL guard refuses a client grant first; `real-doors.test.ts` now accepts either guard.)
|
|
24
|
+
- `AggregateOperation` and the template validator know the store's calculation-row measures `percent_empty`, `percent_filled` (100 × share of the rows asked; NULL over none) and `range` (largest minus smallest; a dashboard may take the range of a date) — `custom.agg_operations()` already answers them (Spaces N6). `storeAggregate` mirrors them; test in `src/templates/templates.test.ts`.
|
|
25
|
+
|
|
26
|
+
**Consumer action:** none (a wider union; `pnpm sync-types`).
|
|
27
|
+
|
|
3
28
|
## 0.76.17
|
|
4
29
|
|
|
5
30
|
- The template walk's internal cross-table break keys join on a unit separator instead of a pipe (they are identifiers, not markdown; the one-table-reader guard no longer reads them as a pipe-split table row). No behaviour change.
|
package/dist/app-table/index.cjs
CHANGED
|
@@ -1008,6 +1008,12 @@ var STORE_DOORS = [
|
|
|
1008
1008
|
{ name: "assert_public_reader_names_a_public_table", args: "p_organization_id uuid, p_table_id uuid, p_door text", returns: "void", security: "definer" },
|
|
1009
1009
|
{ name: "assert_scope_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "definer" },
|
|
1010
1010
|
{ name: "assert_store_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
1011
|
+
{ name: "automation_archive", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
|
|
1012
|
+
{ 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" },
|
|
1013
|
+
{ name: "automation_restore", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
|
|
1014
|
+
{ 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" },
|
|
1015
|
+
{ name: "automation_set_enabled", args: "p_organization_id uuid, p_automation_id uuid, p_enabled boolean", returns: "jsonb", security: "definer" },
|
|
1016
|
+
{ name: "automations", args: "p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
1011
1017
|
{ name: "autonumber_backfill", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
|
|
1012
1018
|
{ name: "barcode_symbologies", args: "", returns: "text[]", security: "invoker" },
|
|
1013
1019
|
{ 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" },
|
|
@@ -1254,13 +1260,18 @@ var STORE_DOORS = [
|
|
|
1254
1260
|
{ name: "form_look_options", args: "p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "definer" },
|
|
1255
1261
|
{ name: "form_notify", args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid", returns: "uuid", security: "invoker" },
|
|
1256
1262
|
{ 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" },
|
|
1263
|
+
{ 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" },
|
|
1257
1264
|
{ 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" },
|
|
1258
1265
|
{ 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" },
|
|
1266
|
+
{ name: "form_public_route", args: "p_form_id uuid, p_values jsonb", returns: "jsonb", security: "definer" },
|
|
1259
1267
|
{ name: "form_redirect_domains", args: "p_organization_id uuid", returns: "text[]", security: "invoker" },
|
|
1260
1268
|
{ name: "form_redirect_refusal", args: "p_organization_id uuid, p_url text", returns: "text", security: "invoker" },
|
|
1261
1269
|
{ name: "form_restore", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
|
|
1270
|
+
{ name: "form_results", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
|
|
1262
1271
|
{ name: "form_slug", args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid", returns: "text", security: "invoker" },
|
|
1263
1272
|
{ 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" },
|
|
1273
|
+
{ name: "form_theme_options", args: "", returns: "jsonb", security: "invoker" },
|
|
1274
|
+
{ name: "form_visit", args: "p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text", returns: "text", security: "definer" },
|
|
1264
1275
|
{ 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" },
|
|
1265
1276
|
{ 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" },
|
|
1266
1277
|
{ name: "formula_compile_sql", args: "p_organization_id uuid, p_expr jsonb, p_values_sql text", returns: "text", security: "invoker" },
|
|
@@ -1591,6 +1602,7 @@ var STORE_DOORS = [
|
|
|
1591
1602
|
{ name: "rollup_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb", returns: "jsonb", security: "invoker" },
|
|
1592
1603
|
{ name: "row_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
1593
1604
|
{ name: "row_sits_in_a_personal_table", args: "p_type text, p_organization_id uuid, p_id uuid", returns: "boolean", security: "invoker" },
|
|
1605
|
+
{ name: "row_template_bodies", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(template_id uuid, body jsonb)", security: "definer" },
|
|
1594
1606
|
{ name: "row_template_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
1595
1607
|
{ 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" },
|
|
1596
1608
|
{ name: "rule_applies", args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -1717,6 +1729,8 @@ var STORE_DOORS = [
|
|
|
1717
1729
|
{ name: "table_stage_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1718
1730
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
1719
1731
|
{ name: "table_sync", args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
|
|
1732
|
+
{ name: "table_template_declare", args: "p_org_id uuid, p_name text, p_description text, p_fields jsonb", returns: "uuid", security: "invoker" },
|
|
1733
|
+
{ name: "table_templates", args: "p_org_id uuid", returns: "jsonb", security: "definer" },
|
|
1720
1734
|
{ name: "table_transfer_owner", args: "p_table_id uuid, p_to_person uuid, p_reason text", returns: "jsonb", security: "definer" },
|
|
1721
1735
|
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1722
1736
|
{ name: "table_unique_rule_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -2182,6 +2196,10 @@ var DOORS = {
|
|
|
2182
2196
|
* organization wall and the caller's own rung on the Table — never `rule_eval` from a browser.
|
|
2183
2197
|
*/
|
|
2184
2198
|
formPreviewAsks: "form_preview_asks",
|
|
2199
|
+
/** TYPEFORM-DUP: the owner's preview of the whole route — jumps, ending, score (`custom._form_route`). */
|
|
2200
|
+
formPreviewRoute: "form_preview_route",
|
|
2201
|
+
/** TYPEFORM-DUP: views, starts, completions, drop-off and answers per question. */
|
|
2202
|
+
formResults: "form_results",
|
|
2185
2203
|
formLookOptions: "form_look_options",
|
|
2186
2204
|
// PRODUCTS row 14 — "let clients book a 30-minute consult". A booking page IS an
|
|
2187
2205
|
// `anon_form`, so it is opened and closed by `anonPublish` like any other; this is
|
|
@@ -2499,6 +2517,13 @@ var DOORS = {
|
|
|
2499
2517
|
actionDeclare: "action_declare",
|
|
2500
2518
|
rowActions: "row_actions",
|
|
2501
2519
|
actionRun: "action_run",
|
|
2520
|
+
// AUTOMATION-DOOR (2026-10-07) — automations on a table. See ../automation.ts.
|
|
2521
|
+
automationDeclare: "automation_declare",
|
|
2522
|
+
automations: "automations",
|
|
2523
|
+
automationArchive: "automation_archive",
|
|
2524
|
+
automationRestore: "automation_restore",
|
|
2525
|
+
automationSetEnabled: "automation_set_enabled",
|
|
2526
|
+
automationRuns: "automation_runs",
|
|
2502
2527
|
tableWebhookDeclare: "table_webhook_declare",
|
|
2503
2528
|
tableWebhooks: "table_webhooks",
|
|
2504
2529
|
tableWebhookArchive: "table_webhook_archive",
|
|
@@ -4078,6 +4103,20 @@ function createRecordsClient(given) {
|
|
|
4078
4103
|
"formPreviewAsks"
|
|
4079
4104
|
);
|
|
4080
4105
|
},
|
|
4106
|
+
async formPreviewRoute({ table_id, questions, endings, values }) {
|
|
4107
|
+
return callDoor(
|
|
4108
|
+
DOORS.formPreviewRoute,
|
|
4109
|
+
{ p_organization_id: org, p_table_id: table_id, p_questions: questions, p_endings: endings ?? [], p_values: values },
|
|
4110
|
+
"formPreviewRoute"
|
|
4111
|
+
);
|
|
4112
|
+
},
|
|
4113
|
+
async formResults({ form_id }) {
|
|
4114
|
+
return callDoor(
|
|
4115
|
+
DOORS.formResults,
|
|
4116
|
+
{ p_organization_id: org, p_form_id: form_id },
|
|
4117
|
+
"formResults"
|
|
4118
|
+
);
|
|
4119
|
+
},
|
|
4081
4120
|
async formLookOptions(args) {
|
|
4082
4121
|
return callDoor(
|
|
4083
4122
|
DOORS.formLookOptions,
|
|
@@ -5754,6 +5793,48 @@ function createRecordsClient(given) {
|
|
|
5754
5793
|
}
|
|
5755
5794
|
return result;
|
|
5756
5795
|
},
|
|
5796
|
+
async automationDeclare({ table_id, spec, automation_id }) {
|
|
5797
|
+
return callDoor(
|
|
5798
|
+
DOORS.automationDeclare,
|
|
5799
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec: spec, p_automation_id: automation_id ?? null },
|
|
5800
|
+
"automationDeclare"
|
|
5801
|
+
);
|
|
5802
|
+
},
|
|
5803
|
+
async automations({ table_id, include_archived }) {
|
|
5804
|
+
return callDoor(
|
|
5805
|
+
DOORS.automations,
|
|
5806
|
+
{ p_table_id: table_id, p_organization_id: org, p_include_archived: include_archived ?? false },
|
|
5807
|
+
"automations"
|
|
5808
|
+
);
|
|
5809
|
+
},
|
|
5810
|
+
async automationArchive({ automation_id }) {
|
|
5811
|
+
return callDoor(
|
|
5812
|
+
DOORS.automationArchive,
|
|
5813
|
+
{ p_organization_id: org, p_automation_id: automation_id },
|
|
5814
|
+
"automationArchive"
|
|
5815
|
+
);
|
|
5816
|
+
},
|
|
5817
|
+
async automationRestore({ automation_id }) {
|
|
5818
|
+
return callDoor(
|
|
5819
|
+
DOORS.automationRestore,
|
|
5820
|
+
{ p_organization_id: org, p_automation_id: automation_id },
|
|
5821
|
+
"automationRestore"
|
|
5822
|
+
);
|
|
5823
|
+
},
|
|
5824
|
+
async automationSetEnabled({ automation_id, enabled }) {
|
|
5825
|
+
return callDoor(
|
|
5826
|
+
DOORS.automationSetEnabled,
|
|
5827
|
+
{ p_organization_id: org, p_automation_id: automation_id, p_enabled: enabled },
|
|
5828
|
+
"automationSetEnabled"
|
|
5829
|
+
);
|
|
5830
|
+
},
|
|
5831
|
+
async automationRuns({ automation_id, limit, cursor }) {
|
|
5832
|
+
return callDoor(
|
|
5833
|
+
DOORS.automationRuns,
|
|
5834
|
+
{ p_automation_id: automation_id, p_limit: limit ?? 50, p_cursor: cursor ?? null, p_organization_id: org },
|
|
5835
|
+
"automationRuns"
|
|
5836
|
+
);
|
|
5837
|
+
},
|
|
5757
5838
|
async tableWebhookDeclare({ table_id, target_url, events, description }) {
|
|
5758
5839
|
return callDoor(
|
|
5759
5840
|
DOORS.tableWebhookDeclare,
|