@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.
package/dist/index.d.cts CHANGED
@@ -464,6 +464,16 @@ declare const STORE_DOORS: readonly [{
464
464
  readonly args: "";
465
465
  readonly returns: "TABLE(function_name text, identity_args text, why text)";
466
466
  readonly security: "invoker";
467
+ }, {
468
+ readonly name: "doors_not_on_one_ladder";
469
+ readonly args: "";
470
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
471
+ readonly security: "invoker";
472
+ }, {
473
+ readonly name: "effective_level";
474
+ readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
475
+ readonly returns: "permission_level";
476
+ readonly security: "definer";
467
477
  }, {
468
478
  readonly name: "export_records";
469
479
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
@@ -2537,7 +2547,12 @@ type RecordsErrorCode =
2537
2547
  | "door"
2538
2548
  /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */
2539
2549
  | "refused_by_rule"
2540
- /** `22004` / `22023` — the call itself was malformed: a missing id, a patch that is not an object. */
2550
+ /**
2551
+ * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a
2552
+ * patch that is not an object, or a value that does not fit the type the
2553
+ * store holds for that Field. The store's own message names the value and the
2554
+ * type it could not be read as.
2555
+ */
2541
2556
  | "invalid_argument"
2542
2557
  /** `02000` — the record is not here (deleted, never existed, or another organization's). */
2543
2558
  | "not_found"
@@ -2556,6 +2571,13 @@ type RecordsErrorCode =
2556
2571
  * connection; it is the one refusal in this list that is worth repeating.
2557
2572
  */
2558
2573
  | "stale_read"
2574
+ /**
2575
+ * `57014` — the store cancelled the statement at its own timeout. Nothing was
2576
+ * refused on its merits and nothing was written; the same call can succeed on
2577
+ * a smaller page or a quieter moment. With `stale_read`, one of the only two
2578
+ * refusals in this list worth repeating.
2579
+ */
2580
+ | "timed_out"
2559
2581
  /**
2560
2582
  * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —
2561
2583
  * this package asked for a door that is not in the live catalogue, so it
package/dist/index.d.ts CHANGED
@@ -464,6 +464,16 @@ declare const STORE_DOORS: readonly [{
464
464
  readonly args: "";
465
465
  readonly returns: "TABLE(function_name text, identity_args text, why text)";
466
466
  readonly security: "invoker";
467
+ }, {
468
+ readonly name: "doors_not_on_one_ladder";
469
+ readonly args: "";
470
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
471
+ readonly security: "invoker";
472
+ }, {
473
+ readonly name: "effective_level";
474
+ readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
475
+ readonly returns: "permission_level";
476
+ readonly security: "definer";
467
477
  }, {
468
478
  readonly name: "export_records";
469
479
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
@@ -2537,7 +2547,12 @@ type RecordsErrorCode =
2537
2547
  | "door"
2538
2548
  /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */
2539
2549
  | "refused_by_rule"
2540
- /** `22004` / `22023` — the call itself was malformed: a missing id, a patch that is not an object. */
2550
+ /**
2551
+ * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a
2552
+ * patch that is not an object, or a value that does not fit the type the
2553
+ * store holds for that Field. The store's own message names the value and the
2554
+ * type it could not be read as.
2555
+ */
2541
2556
  | "invalid_argument"
2542
2557
  /** `02000` — the record is not here (deleted, never existed, or another organization's). */
2543
2558
  | "not_found"
@@ -2556,6 +2571,13 @@ type RecordsErrorCode =
2556
2571
  * connection; it is the one refusal in this list that is worth repeating.
2557
2572
  */
2558
2573
  | "stale_read"
2574
+ /**
2575
+ * `57014` — the store cancelled the statement at its own timeout. Nothing was
2576
+ * refused on its merits and nothing was written; the same call can succeed on
2577
+ * a smaller page or a quieter moment. With `stale_read`, one of the only two
2578
+ * refusals in this list worth repeating.
2579
+ */
2580
+ | "timed_out"
2559
2581
  /**
2560
2582
  * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —
2561
2583
  * this package asked for a door that is not in the live catalogue, so it
package/dist/index.js CHANGED
@@ -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" },