@ai-matrx/records 0.30.0 → 0.36.0
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 +83 -0
- package/dist/core/index.cjs +77 -7
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +52 -7
- package/dist/core/index.d.ts +52 -7
- package/dist/core/index.js +77 -7
- package/dist/core/index.js.map +1 -1
- package/dist/{field-D08d_e7R.d.cts → field-CWBdZfFv.d.cts} +218 -4
- package/dist/{field-D08d_e7R.d.ts → field-CWBdZfFv.d.ts} +218 -4
- package/dist/index.cjs +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +165 -141
- package/dist/index.d.ts +165 -141
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +77 -7
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +422 -144
- package/dist/react/index.d.ts +422 -144
- package/dist/react/index.js +77 -7
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs +17 -3
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js +17 -3
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as Uuid, T as TableType, a as TableDisplay, S as StorageMode, g as Timestamp,
|
|
2
|
-
export { A as ABSENCE_REASONS,
|
|
1
|
+
import { U as Uuid, T as TableType, a as TableDisplay, S as StorageMode, g as Timestamp, av as TableOrigin, h as RecordDocument, m as StoredRecord, l as Field, a7 as ParityFieldType, al as RuleUse, ak as RuleNodeKind, R as RelationFlavor, O as OnDelete, ai as RelationBinding, f as RelationCardinality, a1 as MergeFieldSource, a0 as MergeFieldSemanticType, $ as MergeFieldModifier, a4 as OverridePolicy, B as Delivery, M as Freshness, x as Actor, P as PgError } from './field-CWBdZfFv.cjs';
|
|
2
|
+
export { A as ABSENCE_REASONS, v as ACTOR_VOCABULARY, w as AbsenceReason, y as COMPUTE_ON, z as CONTEXT_POLICIES, C as ComputeOn, e as ContextPolicy, D as DELIVERIES, E as ENTITY_TOKENS, G as EntityToken, H as FIELD_SENSITIVITIES, I as FIELD_SOURCES, J as FRESHNESS, K as FieldBehavior, n as FieldPatch, q as FieldProposal, c as FieldRule, d as FieldSensitivity, b as FieldSource, F as FieldTypeWord, L as ForbiddenEnvelopeWord, Q as HiddenFieldNotice, V as KERNEL_TABLES, X as KernelTableName, Y as MERGE_FIELD_MODIFIERS, Z as MERGE_FIELD_SEMANTIC_TYPES, _ as MERGE_FIELD_SOURCES, N as NewFieldDeclaration, a2 as ON_DELETE, a3 as OVERRIDE_POLICIES, a5 as PARITY_FIELD_TYPES, a6 as PER_VALUE_ACCESS_WORDS, a8 as ParityFieldTypeDescriptor, a9 as PerValueAccessWord, u as PredictedRefusal, aa as ProvenancePointer, ab as RELATION_BINDINGS, ac as RELATION_CARDINALITIES, ad as RELATION_FLAVORS, ae as RETIRED_ACTOR_WORDS, af as RULE_NODE_KINDS, ag as RULE_USES, k as ReadRow, p as ReadValue, j as RecordRead, o as RecordRevision, s as RecordsError, ah as RecordsErrorCode, i as RecordsResult, aj as RetiredActorWord, am as STORAGE_MODES, an as STORE_DOORS, ao as STORE_KNOBS, ap as STORE_REFUSAL_CODES, t as StaleWriteDetail, aq as StoreDoorName, ar as StoreRefusalCode, as as TABLE_DISPLAYS, at as TABLE_ORIGINS, au as TABLE_TYPES, r as TableProposal, aw as VALUE_ALTERNATE_KEYS, ax as VALUE_ENVELOPE_KEYS, ay as ValueAlternate, az as ValueAlternateKey, aA as ValueEnvelope, aB as ValueEnvelopeKey, aC as ValueSource, W as WriteConflict, aD as err, aE as isRecordsErr, aF as ok } from './field-CWBdZfFv.cjs';
|
|
3
3
|
|
|
4
4
|
/** `public.permission_level`, in the store's own order. */
|
|
5
5
|
type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
|
|
@@ -274,7 +274,25 @@ interface PipelineStage {
|
|
|
274
274
|
}
|
|
275
275
|
/** What each Rule of a pipeline is about. Closed, and the store is the authority. */
|
|
276
276
|
declare const PIPELINE_RULE_KINDS: readonly ["moves", "requires", "who", "limit", "entry"];
|
|
277
|
-
|
|
277
|
+
/**
|
|
278
|
+
* A GATE is the general form under `requires`, `who` and `limit`, and the store spells it
|
|
279
|
+
* `gate:1`, `gate:2` … so several gates can sit on one stage without one overwriting the
|
|
280
|
+
* next. It is matched as a prefix rather than listed, because the number is open.
|
|
281
|
+
*/
|
|
282
|
+
type PipelineRuleKind = (typeof PIPELINE_RULE_KINDS)[number] | `gate:${number}`;
|
|
283
|
+
/**
|
|
284
|
+
* WHAT A GATE DOES WHEN IT SAYS NO. The closed list `custom.stage_rule_on_fail_kinds()`
|
|
285
|
+
* answers — a screen offering a third answer would be offering something no Rule can carry.
|
|
286
|
+
*/
|
|
287
|
+
declare const STAGE_RULE_ON_FAIL: readonly ["refuse", "require_approval"];
|
|
288
|
+
type StageRuleOnFail = (typeof STAGE_RULE_ON_FAIL)[number];
|
|
289
|
+
/**
|
|
290
|
+
* THE ORGANIZATION'S ONE KNOB (`custom/stage_rule_enforcement`). `refuse` is the default and
|
|
291
|
+
* what a gate is for; `warn` lets the move through and hands the same sentence back. It never
|
|
292
|
+
* softens `require_approval` — "ask somebody" and "carry on with a note" are different answers.
|
|
293
|
+
*/
|
|
294
|
+
declare const STAGE_RULE_ENFORCEMENT: readonly ["refuse", "warn"];
|
|
295
|
+
type StageRuleEnforcement = (typeof STAGE_RULE_ENFORCEMENT)[number];
|
|
278
296
|
/**
|
|
279
297
|
* One transition Rule, as `custom.pipeline_read` hands it back — WITH the sentence it says
|
|
280
298
|
* when it refuses, because a screen that knows a rule exists but not what it refuses in
|
|
@@ -291,8 +309,64 @@ interface PipelineRule {
|
|
|
291
309
|
uses: string[];
|
|
292
310
|
/** What happens when a card ARRIVES in this stage — assign, notify, start a checklist. */
|
|
293
311
|
on_entry: Record<string, unknown> | null;
|
|
312
|
+
/**
|
|
313
|
+
* What this Rule does when it STOPS a move. `refuse` is the default and what every
|
|
314
|
+
* pipeline Rule did before gates existed; `require_approval` files the change in the
|
|
315
|
+
* approvals queue with this Rule's sentence as the reason and leaves the record alone.
|
|
316
|
+
*/
|
|
317
|
+
on_fail?: StageRuleOnFail;
|
|
318
|
+
/**
|
|
319
|
+
* THE GATE AS IT WAS WRITTEN, which is the only thing that makes it EDITABLE.
|
|
320
|
+
*
|
|
321
|
+
* A gate is saved as one Rule whose expression is an `or` of four arms — not this
|
|
322
|
+
* stage, OR not a move, OR the gate is not about this card, OR the demand holds. That
|
|
323
|
+
* compiled form used to be the only copy, so a settings screen could read a gate's name
|
|
324
|
+
* and its sentence and nothing else: it would open every existing rule with a blank
|
|
325
|
+
* condition and overwrite it the first time somebody pressed Save.
|
|
326
|
+
*
|
|
327
|
+
* Absent on the four sugar rules (`moves`, `requires`, `who`, `limit`), which nobody
|
|
328
|
+
* writes in a condition builder, and on any gate declared before the store started
|
|
329
|
+
* keeping them. Absent means "this one was not written here" — never "it has no
|
|
330
|
+
* condition", which is a different and dangerous thing to draw.
|
|
331
|
+
*/
|
|
332
|
+
when?: Record<string, unknown> | null;
|
|
333
|
+
/** @see {@link PipelineRule.when} — the condition that has to hold, as it was written. */
|
|
334
|
+
demands?: Record<string, unknown> | null;
|
|
294
335
|
version: number;
|
|
295
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* WHAT A GATE WOULD DO TO THIS BOARD TODAY, from `custom.pipeline_gate_preview`.
|
|
339
|
+
*
|
|
340
|
+
* The one question somebody writing a rule that will refuse their colleagues' work
|
|
341
|
+
* actually has, answered while they are still typing it — the gate is judged as an
|
|
342
|
+
* argument, nothing is saved, and nothing is written. The store compiles it with the
|
|
343
|
+
* SAME compiler `pipeline_declare` uses, so this count and the refusal at the door are
|
|
344
|
+
* the same rule.
|
|
345
|
+
*/
|
|
346
|
+
interface PipelineGatePreview {
|
|
347
|
+
is_pipeline: boolean;
|
|
348
|
+
/** Present, and it says what would make a board exist, when `is_pipeline` is false. */
|
|
349
|
+
why?: string;
|
|
350
|
+
/** The stage key the gate was tried against. */
|
|
351
|
+
stage?: string;
|
|
352
|
+
/** Live cards of this board this person may see that are not already in that stage. */
|
|
353
|
+
considered: number;
|
|
354
|
+
/** How many of them this gate would turn away. */
|
|
355
|
+
refused: number;
|
|
356
|
+
/**
|
|
357
|
+
* Up to three of them, BY NAME. A count with no names is a number nobody can check, and
|
|
358
|
+
* checking it is the whole reason to show it before saving.
|
|
359
|
+
*/
|
|
360
|
+
examples: {
|
|
361
|
+
record_id: Uuid;
|
|
362
|
+
title: string;
|
|
363
|
+
}[];
|
|
364
|
+
/** True when the board is larger than the preview will walk, so the count is a floor. */
|
|
365
|
+
truncated?: boolean;
|
|
366
|
+
on_fail?: StageRuleOnFail;
|
|
367
|
+
/** The word this board uses for one of its cards — "quote", "deal" — for the sentence. */
|
|
368
|
+
noun?: string;
|
|
369
|
+
}
|
|
296
370
|
/** The whole board's definition, from `custom.pipeline_read`. */
|
|
297
371
|
interface Pipeline {
|
|
298
372
|
is_pipeline: boolean;
|
|
@@ -338,6 +412,20 @@ interface PipelineMissingField {
|
|
|
338
412
|
interface PipelineVerdict {
|
|
339
413
|
allowed: boolean;
|
|
340
414
|
is_pipeline: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* The THREE answers a board has to draw differently, and the reason `allowed` alone is
|
|
417
|
+
* not enough: a card that is going for approval has not been refused, and a card that
|
|
418
|
+
* moved under `warn` has not been waved through silently.
|
|
419
|
+
*/
|
|
420
|
+
outcome?: "allowed" | "refused" | "needs_approval" | "warned";
|
|
421
|
+
/** What this organization's one knob says right now. */
|
|
422
|
+
enforcement?: StageRuleEnforcement;
|
|
423
|
+
/** Set on `needs_approval`: what pressing on will actually do, in plain words. */
|
|
424
|
+
what_happens?: string;
|
|
425
|
+
/** Set on `warned`: the gates this organization asked to be told about, not stopped by. */
|
|
426
|
+
warnings?: StageRuleWarning[];
|
|
427
|
+
/** Approvals already filed against this card's own stage column that nobody has decided. */
|
|
428
|
+
pending?: StagePending[];
|
|
341
429
|
/** The stage key the move was asked about. */
|
|
342
430
|
to?: string;
|
|
343
431
|
/** The store's own sentence — shown verbatim, never paraphrased by a screen. */
|
|
@@ -346,6 +434,8 @@ interface PipelineVerdict {
|
|
|
346
434
|
rule_id?: Uuid;
|
|
347
435
|
rule_version?: number;
|
|
348
436
|
kind?: PipelineRuleKind;
|
|
437
|
+
/** What this Rule does when it stops a move. */
|
|
438
|
+
on_fail?: StageRuleOnFail;
|
|
349
439
|
/**
|
|
350
440
|
* When a stage demands columns that are empty, exactly which ones — so the screen can
|
|
351
441
|
* prompt for them on entry instead of sending the person away to find them.
|
|
@@ -382,9 +472,80 @@ interface PipelineSpec {
|
|
|
382
472
|
limits?: Record<string, number>;
|
|
383
473
|
/** Stage name → what happens when a card arrives: assign, notify, start a checklist. */
|
|
384
474
|
on_entry?: Record<string, Record<string, unknown>>;
|
|
475
|
+
/**
|
|
476
|
+
* Stage name → the gates a card has to get past to land there. The general form under
|
|
477
|
+
* `requires`, `who` and `limits`, and the only one that can say `require_approval`.
|
|
478
|
+
*/
|
|
479
|
+
gates?: Record<string, PipelineGate[]>;
|
|
385
480
|
moves_message?: string;
|
|
386
481
|
requires_messages?: Record<string, string>;
|
|
387
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* A gate the organization's own knob overruled. NOTHING FAILS SILENTLY: the move happened
|
|
485
|
+
* and the sentence comes back WITH it, together with what to do about it.
|
|
486
|
+
*/
|
|
487
|
+
interface StageRuleWarning {
|
|
488
|
+
rule_id: Uuid;
|
|
489
|
+
rule: string;
|
|
490
|
+
/** The gate's own sentence, shown verbatim. */
|
|
491
|
+
why: string;
|
|
492
|
+
what_to_do: string;
|
|
493
|
+
}
|
|
494
|
+
/** An approval filed against this card's stage column that nobody has decided yet. */
|
|
495
|
+
interface StagePending {
|
|
496
|
+
approval_id: Uuid;
|
|
497
|
+
/** The stage key the card is waiting to go to. */
|
|
498
|
+
to: string;
|
|
499
|
+
why: string | null;
|
|
500
|
+
requested_at: string;
|
|
501
|
+
state: string;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* The same wait, asked for a WHOLE BOARD in one question (`custom.pipeline_pending`), so a
|
|
505
|
+
* board can badge every card that is waiting without a round trip per card — and therefore
|
|
506
|
+
* actually does it, instead of drawing a filed card as if nobody had ever dragged it.
|
|
507
|
+
*/
|
|
508
|
+
interface StagePendingOnBoard extends StagePending {
|
|
509
|
+
record_id: Uuid;
|
|
510
|
+
}
|
|
511
|
+
/** What `custom.pipeline_move` answers — an OBJECT on every path, never a bare number. */
|
|
512
|
+
interface PipelineMoveResult {
|
|
513
|
+
applied: boolean;
|
|
514
|
+
moved: boolean;
|
|
515
|
+
outcome: "moved" | "moved_with_warnings" | "needs_approval";
|
|
516
|
+
to: string;
|
|
517
|
+
version: number;
|
|
518
|
+
/** Set on `moved_with_warnings`. */
|
|
519
|
+
warnings?: StageRuleWarning[];
|
|
520
|
+
/** Set on `needs_approval`: the gate's sentence, the wait that was filed, and who has it. */
|
|
521
|
+
why?: string;
|
|
522
|
+
rule?: string;
|
|
523
|
+
rule_id?: Uuid;
|
|
524
|
+
approval_id?: Uuid;
|
|
525
|
+
approvers?: {
|
|
526
|
+
user_id: Uuid;
|
|
527
|
+
name: string | null;
|
|
528
|
+
why: string;
|
|
529
|
+
}[];
|
|
530
|
+
what_happens?: string;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* ONE GATE ON A STAGE, as the condition builder on the stage settings screen writes it.
|
|
534
|
+
* `requires`, `who` and `limits` are sugar over this shape; this is the general form, and
|
|
535
|
+
* it speaks the SAME condition language as filters and formulas — never a second one.
|
|
536
|
+
*/
|
|
537
|
+
interface PipelineGate {
|
|
538
|
+
/** What the gate is called in the settings list. */
|
|
539
|
+
name?: string;
|
|
540
|
+
/** The sentence a person reads when it stops them. Required: a refusal with no words is a dead end. */
|
|
541
|
+
message: string;
|
|
542
|
+
/** WHEN this gate is about this record at all. Absent means always. */
|
|
543
|
+
when?: Record<string, unknown>;
|
|
544
|
+
/** What has to hold. One condition node of the one Rule language. */
|
|
545
|
+
demands: Record<string, unknown>;
|
|
546
|
+
/** Default `refuse`. */
|
|
547
|
+
on_fail?: StageRuleOnFail;
|
|
548
|
+
}
|
|
388
549
|
/**
|
|
389
550
|
* THE ONE PLACE A SCREEN DECIDES WHETHER A CARD LOOKS DRAGGABLE — and it decides on the
|
|
390
551
|
* PERSON, not on the rules. Whether a particular move is allowed is
|
|
@@ -2347,143 +2508,6 @@ interface ResolvedPublishBinding {
|
|
|
2347
2508
|
notice: string;
|
|
2348
2509
|
}
|
|
2349
2510
|
|
|
2350
|
-
/**
|
|
2351
|
-
* What KIND of refusal it was. The mapping from SQLSTATE to code lives in
|
|
2352
|
-
* `/core`, and it is checked against `STORE_REFUSAL_CODES` — the list of every
|
|
2353
|
-
* SQLSTATE the store's own bodies raise, generated from the live catalogue. A
|
|
2354
|
-
* code the store can raise and this union cannot name is a hole, and the
|
|
2355
|
-
* real-door suite fails on it.
|
|
2356
|
-
*/
|
|
2357
|
-
type RecordsErrorCode =
|
|
2358
|
-
/** `PT409` — somebody else's write won. The record clock moved under you. */
|
|
2359
|
-
"stale_write"
|
|
2360
|
-
/** `42501` — a door. Either the schema is revoked, or the store is switched off, or this principal may not pass. */
|
|
2361
|
-
| "door"
|
|
2362
|
-
/** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */
|
|
2363
|
-
| "refused_by_rule"
|
|
2364
|
-
/**
|
|
2365
|
-
* `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a
|
|
2366
|
-
* patch that is not an object, or a value that does not fit the type the
|
|
2367
|
-
* store holds for that Field. The store's own message names the value and the
|
|
2368
|
-
* type it could not be read as.
|
|
2369
|
-
*/
|
|
2370
|
-
| "invalid_argument"
|
|
2371
|
-
/** `02000` — the record is not here (deleted, never existed, or another organization's). */
|
|
2372
|
-
| "not_found"
|
|
2373
|
-
/** `23503` — something it points at is not there. */
|
|
2374
|
-
| "missing_reference"
|
|
2375
|
-
/** `23505` — that thing is already here. */
|
|
2376
|
-
| "already_exists"
|
|
2377
|
-
/** `0A000` — the store does not do this yet, and says which part. */
|
|
2378
|
-
| "not_supported"
|
|
2379
|
-
/** `53400` / `22012` — the store ran out of something, or the arithmetic could not be done. */
|
|
2380
|
-
| "store_limit"
|
|
2381
|
-
/**
|
|
2382
|
-
* `40001` — the visibility snapshot this connection carries is older than a
|
|
2383
|
-
* write the reader has already observed, so the store refused to answer at
|
|
2384
|
-
* all rather than hand back something they just lost. Retry on a fresh
|
|
2385
|
-
* connection; it is the one refusal in this list that is worth repeating.
|
|
2386
|
-
*/
|
|
2387
|
-
| "stale_read"
|
|
2388
|
-
/**
|
|
2389
|
-
* `57014` — the store cancelled the statement at its own timeout. Nothing was
|
|
2390
|
-
* refused on its merits and nothing was written; the same call can succeed on
|
|
2391
|
-
* a smaller page or a quieter moment. With `stale_read`, one of the only two
|
|
2392
|
-
* refusals in this list worth repeating.
|
|
2393
|
-
*/
|
|
2394
|
-
| "timed_out"
|
|
2395
|
-
/**
|
|
2396
|
-
* THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —
|
|
2397
|
-
* this package asked for a door that is not in the live catalogue, so it
|
|
2398
|
-
* refused to guess. `door_absent` always names the door and the lane that
|
|
2399
|
-
* owns it; it is never a silent no-op and never an empty list.
|
|
2400
|
-
*/
|
|
2401
|
-
| "door_absent"
|
|
2402
|
-
/**
|
|
2403
|
-
* `PGRST202` / `PGRST205` — PostgREST could not find the function or the
|
|
2404
|
-
* schema. The database this client is pointed at is not serving the record
|
|
2405
|
-
* store: the schema is not exposed, or the grants are not there.
|
|
2406
|
-
*/
|
|
2407
|
-
| "store_not_served"
|
|
2408
|
-
/** Anything the mapper could not place. It still carries the store's own words. */
|
|
2409
|
-
| "internal";
|
|
2410
|
-
/** A refusal, in the store's own words. */
|
|
2411
|
-
interface RecordsError {
|
|
2412
|
-
code: RecordsErrorCode;
|
|
2413
|
-
/** THE STORE'S message, verbatim. Never paraphrased. */
|
|
2414
|
-
message: string;
|
|
2415
|
-
/** THE STORE'S hint, verbatim — this is where the remedy is written. */
|
|
2416
|
-
hint?: string;
|
|
2417
|
-
/** The SQLSTATE, so a caller can be exact when a code is not exact enough. */
|
|
2418
|
-
sqlstate?: string;
|
|
2419
|
-
/** Whatever the store put in DETAIL, parsed when it was json. */
|
|
2420
|
-
detail?: unknown;
|
|
2421
|
-
}
|
|
2422
|
-
type RecordsResult<T> = {
|
|
2423
|
-
ok: true;
|
|
2424
|
-
data: T;
|
|
2425
|
-
} | {
|
|
2426
|
-
ok: false;
|
|
2427
|
-
error: RecordsError;
|
|
2428
|
-
};
|
|
2429
|
-
/** Narrowing helper for hosts compiled without `strictNullChecks`. */
|
|
2430
|
-
declare function isRecordsErr<T>(result: RecordsResult<T>): result is {
|
|
2431
|
-
ok: false;
|
|
2432
|
-
error: RecordsError;
|
|
2433
|
-
};
|
|
2434
|
-
declare const ok: <T>(data: T) => RecordsResult<T>;
|
|
2435
|
-
declare const err: <T>(error: RecordsError) => RecordsResult<T>;
|
|
2436
|
-
/**
|
|
2437
|
-
* A `stale_write` carries everything the screen needs to show the conflict
|
|
2438
|
-
* rather than a toast: which version you wrote against, which one won, and the
|
|
2439
|
-
* value of every field you touched as it stands now. The store builds this and
|
|
2440
|
-
* this type is its shape — nothing is reconstructed on the client.
|
|
2441
|
-
*/
|
|
2442
|
-
interface StaleWriteDetail {
|
|
2443
|
-
expected_version: number;
|
|
2444
|
-
current_version: number;
|
|
2445
|
-
contested_fields: Record<string, unknown>;
|
|
2446
|
-
}
|
|
2447
|
-
/** The parsed form of a `stale_write`, for `useRecordMutation`'s conflict state. */
|
|
2448
|
-
interface WriteConflict extends StaleWriteDetail {
|
|
2449
|
-
record_id: Uuid;
|
|
2450
|
-
/** The store's own sentence — what the screen shows. */
|
|
2451
|
-
message: string;
|
|
2452
|
-
/** The store's own remedy. */
|
|
2453
|
-
hint: string;
|
|
2454
|
-
}
|
|
2455
|
-
/**
|
|
2456
|
-
* The structural shape of a PostgREST failure as supabase-js resolves it: a
|
|
2457
|
-
* PLAIN OBJECT parsed from the response body, NOT an `Error`. Reading
|
|
2458
|
-
* `.message` off `instanceof Error` discards the real database message on every
|
|
2459
|
-
* genuine failure.
|
|
2460
|
-
*/
|
|
2461
|
-
interface PgError {
|
|
2462
|
-
code?: string | null;
|
|
2463
|
-
message: string;
|
|
2464
|
-
details?: string | null;
|
|
2465
|
-
hint?: string | null;
|
|
2466
|
-
}
|
|
2467
|
-
/** What the validation mirror answers: the same sentence the trigger would raise. */
|
|
2468
|
-
interface PredictedRefusal {
|
|
2469
|
-
/** The field key the store would name, when it names one. */
|
|
2470
|
-
field_key?: string;
|
|
2471
|
-
/** The message the store's own body would raise, word for word. */
|
|
2472
|
-
message: string;
|
|
2473
|
-
hint?: string;
|
|
2474
|
-
sqlstate: string;
|
|
2475
|
-
/**
|
|
2476
|
-
* Which of the store's bodies would raise it, so a reader can go and check
|
|
2477
|
-
* that this mirror still tells the truth.
|
|
2478
|
-
*/
|
|
2479
|
-
predicted_by: string;
|
|
2480
|
-
}
|
|
2481
|
-
/** VAL-5 / VAL-6, named so a caller can say which word was the problem. */
|
|
2482
|
-
interface ForbiddenEnvelopeWord {
|
|
2483
|
-
field_key: string;
|
|
2484
|
-
word: PerValueAccessWord;
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
2511
|
/**
|
|
2488
2512
|
* The data seam: a structural subset of `SupabaseClient`. The package never
|
|
2489
2513
|
* opens a database connection of its own and never holds a key — the HOST
|
|
@@ -2720,4 +2744,4 @@ interface ConversationScopeContext {
|
|
|
2720
2744
|
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
2721
2745
|
declare function scopeChip(scope: ConversationScope): string;
|
|
2722
2746
|
|
|
2723
|
-
export { Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type BookingSummary, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, Field, type FieldHistoryEntry, type
|
|
2747
|
+
export { Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type BookingSummary, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type ExternalPrincipalCard, Field, type FieldHistoryEntry, type FormSummary, Freshness, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, OnDelete, OverridePolicy, PERMISSION_LEVELS, PIPELINE_RULE_KINDS, ParityFieldType, type PermissionLevel, PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, type RecordComment, RecordDocument, type RecordHistoryEntry, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsTableQuery, type RegisteredTable, type Relation, RelationBinding, RelationCardinality, type RelationCarries, type RelationCoordinate, RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type Rule, type RuleAnswer, type RuleExpression, RuleNodeKind, RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, StorageMode, StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, type Table, type TableCapacity, TableDisplay, TableOrigin, TableType, Timestamp, Uuid, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, highestLevel, holdsARetiredChoice, indexedDbStore, isDecided, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, openCaptureQueue, optionKey, optionLabel, portalPath, publicFormPath, scopeChip };
|