@ai-matrx/records 0.76.19 → 0.77.2
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 +24 -0
- package/dist/app-table/index.cjs +84 -2
- 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 +84 -2
- package/dist/app-table/index.js.map +1 -1
- package/dist/{client-EaE4ta6p.d.cts → client-DZ3UcU4_.d.cts} +53 -5
- package/dist/{client-C8G7zUMQ.d.ts → client-ZIxyAOdh.d.ts} +53 -5
- package/dist/core/index.cjs +97 -8
- 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 +97 -8
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +85 -3
- 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 +85 -3
- package/dist/data/index.js.map +1 -1
- package/dist/{declareTable-aoFu32Ca.d.cts → declareTable-BYZdFrt5.d.cts} +4 -4
- package/dist/{declareTable-3yW8GrJE.d.ts → declareTable-DGSJMqGx.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 +30 -8
- 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 +30 -8
- 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 +98 -9
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +324 -15
- package/dist/react/index.d.ts +324 -15
- package/dist/react/index.js +98 -9
- 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-DxtZgyFR.d.ts → subscription-BWaRPLyo.d.ts} +60 -2
- package/dist/{subscription-vpnl6GxJ.d.cts → subscription-Br30ZwIt.d.cts} +60 -2
- package/dist/{table-kind-BtguhnRV.d.cts → table-kind-Da21ZLdJ.d.ts} +146 -5
- package/dist/{table-kind-DzyRtFNa.d.ts → table-kind-HAQ6WNxZ.d.cts} +146 -5
- package/dist/templates/index.cjs +14 -0
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.d.cts +9 -9
- package/dist/templates/index.d.ts +9 -9
- package/dist/templates/index.js +14 -0
- package/dist/templates/index.js.map +1 -1
- package/dist/{types-y8GX3-QC.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-X9P-cQd0.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/dist/memory/index.cjs
CHANGED
|
@@ -866,6 +866,12 @@ var STORE_DOORS = [
|
|
|
866
866
|
{ name: "assert_public_reader_names_a_public_table", args: "p_organization_id uuid, p_table_id uuid, p_door text", returns: "void", security: "definer" },
|
|
867
867
|
{ name: "assert_scope_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "definer" },
|
|
868
868
|
{ name: "assert_store_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
869
|
+
{ name: "automation_archive", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
|
|
870
|
+
{ 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" },
|
|
871
|
+
{ name: "automation_restore", args: "p_organization_id uuid, p_automation_id uuid", returns: "jsonb", security: "definer" },
|
|
872
|
+
{ 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" },
|
|
873
|
+
{ name: "automation_set_enabled", args: "p_organization_id uuid, p_automation_id uuid, p_enabled boolean", returns: "jsonb", security: "definer" },
|
|
874
|
+
{ name: "automations", args: "p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
869
875
|
{ name: "autonumber_backfill", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
|
|
870
876
|
{ name: "barcode_symbologies", args: "", returns: "text[]", security: "invoker" },
|
|
871
877
|
{ 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" },
|
|
@@ -1112,13 +1118,18 @@ var STORE_DOORS = [
|
|
|
1112
1118
|
{ name: "form_look_options", args: "p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "definer" },
|
|
1113
1119
|
{ name: "form_notify", args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid", returns: "uuid", security: "invoker" },
|
|
1114
1120
|
{ 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" },
|
|
1121
|
+
{ 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" },
|
|
1115
1122
|
{ 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" },
|
|
1116
1123
|
{ 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" },
|
|
1124
|
+
{ name: "form_public_route", args: "p_form_id uuid, p_values jsonb", returns: "jsonb", security: "definer" },
|
|
1117
1125
|
{ name: "form_redirect_domains", args: "p_organization_id uuid", returns: "text[]", security: "invoker" },
|
|
1118
1126
|
{ name: "form_redirect_refusal", args: "p_organization_id uuid, p_url text", returns: "text", security: "invoker" },
|
|
1119
1127
|
{ name: "form_restore", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
|
|
1128
|
+
{ name: "form_results", args: "p_organization_id uuid, p_form_id uuid", returns: "jsonb", security: "definer" },
|
|
1120
1129
|
{ name: "form_slug", args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid", returns: "text", security: "invoker" },
|
|
1121
1130
|
{ 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" },
|
|
1131
|
+
{ name: "form_theme_options", args: "", returns: "jsonb", security: "invoker" },
|
|
1132
|
+
{ name: "form_visit", args: "p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text", returns: "text", security: "definer" },
|
|
1122
1133
|
{ 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" },
|
|
1123
1134
|
{ 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" },
|
|
1124
1135
|
{ name: "formula_compile_sql", args: "p_organization_id uuid, p_expr jsonb, p_values_sql text", returns: "text", security: "invoker" },
|
|
@@ -1449,6 +1460,7 @@ var STORE_DOORS = [
|
|
|
1449
1460
|
{ name: "rollup_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb", returns: "jsonb", security: "invoker" },
|
|
1450
1461
|
{ name: "row_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
1451
1462
|
{ name: "row_sits_in_a_personal_table", args: "p_type text, p_organization_id uuid, p_id uuid", returns: "boolean", security: "invoker" },
|
|
1463
|
+
{ name: "row_template_bodies", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(template_id uuid, body jsonb)", security: "definer" },
|
|
1452
1464
|
{ name: "row_template_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
1453
1465
|
{ 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" },
|
|
1454
1466
|
{ name: "rule_applies", args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -1575,6 +1587,8 @@ var STORE_DOORS = [
|
|
|
1575
1587
|
{ name: "table_stage_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1576
1588
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
1577
1589
|
{ name: "table_sync", args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
|
|
1590
|
+
{ name: "table_template_declare", args: "p_org_id uuid, p_name text, p_description text, p_fields jsonb", returns: "uuid", security: "invoker" },
|
|
1591
|
+
{ name: "table_templates", args: "p_org_id uuid", returns: "jsonb", security: "definer" },
|
|
1578
1592
|
{ name: "table_transfer_owner", args: "p_table_id uuid, p_to_person uuid, p_reason text", returns: "jsonb", security: "definer" },
|
|
1579
1593
|
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1580
1594
|
{ name: "table_unique_rule_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -3045,6 +3059,23 @@ function memoryDataSource(world) {
|
|
|
3045
3059
|
})
|
|
3046
3060
|
);
|
|
3047
3061
|
},
|
|
3062
|
+
// TYPEFORM-DUP. The memory world answers showIf as form_preview_asks does and takes no jumps;
|
|
3063
|
+
// the store's own walk (custom._form_route) is proven against the live database, never here.
|
|
3064
|
+
form_preview_route: (args) => {
|
|
3065
|
+
const t = tableOf(args);
|
|
3066
|
+
const values = args["p_values"] ?? {};
|
|
3067
|
+
const endings = (args["p_endings"] ?? []).filter((e) => !("when" in e || "score_min" in e || "score_max" in e));
|
|
3068
|
+
return ok2({
|
|
3069
|
+
asks: (args["p_questions"] ?? []).map((q) => {
|
|
3070
|
+
const when = q["show_if"] ?? q["showIf"] ?? null;
|
|
3071
|
+
const asked = !when || !t ? true : rule(t, values, values, when) !== false;
|
|
3072
|
+
return { field_key: String(q["field"] ?? q["key"] ?? ""), asked, decided: true, said: null };
|
|
3073
|
+
}),
|
|
3074
|
+
ending: endings[0] ? String(endings[0]["id"]) : null,
|
|
3075
|
+
score: null
|
|
3076
|
+
});
|
|
3077
|
+
},
|
|
3078
|
+
form_results: (args) => ok2({ form_id: args["p_form_id"], views: 0, starts: 0, completions: 0, completion_rate: null, questions: [], endings: [], hidden: [], score: null }),
|
|
3048
3079
|
bookings: (args) => ok2(
|
|
3049
3080
|
world.forms.filter((f) => f.booking && (!args["p_table_id"] || f.table_id === args["p_table_id"])).map((f) => ({
|
|
3050
3081
|
form_id: f.form_id,
|