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