@ai-matrx/records 0.3.3 → 0.5.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.
@@ -200,6 +200,8 @@ var STORE_DOORS = [
200
200
  { 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" },
201
201
  { name: "doors_not_deciding_the_caller", args: "", returns: "TABLE(function_name text, identity_args text)", security: "invoker" },
202
202
  { name: "doors_not_deciding_the_record", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
203
+ { name: "doors_not_on_one_ladder", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
204
+ { 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" },
203
205
  { 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" },
204
206
  { name: "external_foreign_table_findings", args: "", returns: "SETOF text", security: "definer" },
205
207
  { name: "external_history_event", args: "p_organization_id uuid, p_link_id uuid, p_operation text", returns: "bigint", security: "definer" },
@@ -1623,6 +1625,13 @@ var BY_SQLSTATE = {
1623
1625
  "23514": "refused_by_rule",
1624
1626
  "22004": "invalid_argument",
1625
1627
  "22023": "invalid_argument",
1628
+ // 22P02 — a value does not fit the type the store holds for it. The class is
1629
+ // real and was hit live: an organization whose copy of a package table grew
1630
+ // `status` as a uuid-valued Field was sent the text "open", and the store
1631
+ // answered `invalid input syntax for type uuid: "open"`. It is the CALL that
1632
+ // is wrong for the shape the store holds, which is what `invalid_argument`
1633
+ // already means — the store's own sentence names the value and the type.
1634
+ "22P02": "invalid_argument",
1626
1635
  "02000": "not_found",
1627
1636
  "23503": "missing_reference",
1628
1637
  "23505": "already_exists",
@@ -1634,6 +1643,13 @@ var BY_SQLSTATE = {
1634
1643
  // they just lost access to. It is retryable on a fresher connection, which is
1635
1644
  // a different instruction from every other refusal here.
1636
1645
  "40001": "stale_read",
1646
+ // 57014 — the store cancelled the statement at its own timeout. Like
1647
+ // `stale_read` and unlike every other refusal here, the call was never
1648
+ // refused on its merits: the same call on a smaller page, or once the
1649
+ // organization's kernel is not being rewritten, can succeed. It gets its own
1650
+ // code so a screen can offer "try again" honestly instead of showing a
1651
+ // failure sentence the caller cannot act on.
1652
+ "57014": "timed_out",
1637
1653
  // PostgREST's own two: the store is not being SERVED, which is a different
1638
1654
  // thing from the store refusing. `custom` absent from `pgrst.db_schemas`, or
1639
1655
  // the grants not copied, land here.