@ai-matrx/records 0.57.0 → 0.57.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/CHANGELOG.md +25 -0
- package/dist/core/index.cjs +94 -17
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +36 -3
- package/dist/core/index.d.ts +36 -3
- package/dist/core/index.js +94 -17
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +84 -11
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +56 -2
- package/dist/react/index.d.ts +56 -2
- package/dist/react/index.js +84 -11
- package/dist/react/index.js.map +1 -1
- package/dist/{types-DC2tYa4w.d.cts → types-Bsamaf-a.d.cts} +39 -2
- package/dist/{types-DC2tYa4w.d.ts → types-Bsamaf-a.d.ts} +39 -2
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -4026,6 +4026,8 @@ interface PredictedRefusal {
|
|
|
4026
4026
|
/** The message the store's own body would raise, word for word. */
|
|
4027
4027
|
message: string;
|
|
4028
4028
|
hint?: string;
|
|
4029
|
+
/** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */
|
|
4030
|
+
detail?: Record<string, unknown>;
|
|
4029
4031
|
sqlstate: string;
|
|
4030
4032
|
/**
|
|
4031
4033
|
* Which of the store's bodies would raise it, so a reader can go and check
|
|
@@ -4245,7 +4247,25 @@ interface RecordRead {
|
|
|
4245
4247
|
/** FLD-3. A constraint attached to a Field. A Rule, never a behaviour. */
|
|
4246
4248
|
interface FieldRule {
|
|
4247
4249
|
kind: "min" | "max" | "length" | "pattern" | "equals_field" | "differs_from_field";
|
|
4248
|
-
|
|
4250
|
+
/**
|
|
4251
|
+
* The rule's own number or word: the least / the most for `min` / `max`, the
|
|
4252
|
+
* LONGEST for `length`, the pattern for `pattern`, the other column's key for
|
|
4253
|
+
* `equals_field` / `differs_from_field`. A `length` rule that only says how
|
|
4254
|
+
* SHORT a value may be carries `min` and no `value`.
|
|
4255
|
+
*/
|
|
4256
|
+
value?: string | number;
|
|
4257
|
+
/**
|
|
4258
|
+
* STORE-RULE-GAPS (the older grid's `patternHint`). On a `pattern` rule only:
|
|
4259
|
+
* how a person writes it, e.g. `"949-555-0142"`. The store refuses an example
|
|
4260
|
+
* its own pattern would refuse, and a refused value is told "Enter it like
|
|
4261
|
+
* 949-555-0142." (the hint, and `detail.example`).
|
|
4262
|
+
*/
|
|
4263
|
+
example?: string;
|
|
4264
|
+
/**
|
|
4265
|
+
* STORE-RULE-GAPS (the older grid's `minLength`). On a `length` rule only: the
|
|
4266
|
+
* fewest characters. A blank is `required`'s question, never "too short".
|
|
4267
|
+
*/
|
|
4268
|
+
min?: number;
|
|
4249
4269
|
/** FLD-10. Empty means "wherever the Field applies". */
|
|
4250
4270
|
applies_to_types?: string[];
|
|
4251
4271
|
}
|
|
@@ -4450,6 +4470,12 @@ interface NewFieldDeclaration {
|
|
|
4450
4470
|
config?: Record<string, unknown>;
|
|
4451
4471
|
/** A text column that holds a signature (`custom.doc_sign` accepts no other). */
|
|
4452
4472
|
format?: string;
|
|
4473
|
+
/**
|
|
4474
|
+
* STORE-RULE-GAPS (the older grid's `allowOther`). A choice list only: a value
|
|
4475
|
+
* that is none of the choices is ADDED to the list as typed instead of
|
|
4476
|
+
* refused. Stored as `config.allow_other`; absent means off.
|
|
4477
|
+
*/
|
|
4478
|
+
allow_other?: boolean;
|
|
4453
4479
|
}
|
|
4454
4480
|
/**
|
|
4455
4481
|
* Every word `custom._field_document_for` resolves for `type`: any parity type
|
|
@@ -4519,6 +4545,12 @@ interface FieldPatch {
|
|
|
4519
4545
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
4520
4546
|
promoted?: boolean;
|
|
4521
4547
|
unique?: boolean;
|
|
4548
|
+
/**
|
|
4549
|
+
* STORE-RULE-GAPS. A choice list's "other values allowed" setting — see
|
|
4550
|
+
* `NewFieldDeclaration.allow_other`. Refused by name on any other column; a
|
|
4551
|
+
* retype that stays a list keeps it.
|
|
4552
|
+
*/
|
|
4553
|
+
allow_other?: boolean;
|
|
4522
4554
|
/** §D / T7: which fields a worked-out column reads. */
|
|
4523
4555
|
depends_on?: Uuid[];
|
|
4524
4556
|
/**
|
|
@@ -4557,6 +4589,11 @@ interface FieldPatch {
|
|
|
4557
4589
|
*/
|
|
4558
4590
|
expr?: Record<string, unknown>;
|
|
4559
4591
|
}
|
|
4592
|
+
/**
|
|
4593
|
+
* Whether a choice column takes values that are not one of its choices
|
|
4594
|
+
* (`config.allow_other`, STORE-RULE-GAPS). Off unless the column says so.
|
|
4595
|
+
*/
|
|
4596
|
+
declare function allowsOtherValues(field: Pick<Field, "type" | "config">): boolean;
|
|
4560
4597
|
|
|
4561
4598
|
/**
|
|
4562
4599
|
* Who the data belongs to. A test organization is created under this name — the
|
|
@@ -4892,4 +4929,4 @@ interface UseCaseSummary {
|
|
|
4892
4929
|
rowCount: number;
|
|
4893
4930
|
}
|
|
4894
4931
|
|
|
4895
|
-
export {
|
|
4932
|
+
export { ENTITY_TOKENS as $, type FieldProposal as A, type BusinessIdentity as B, type TableProposal as C, type RecordsError as D, type PgError as E, type FormAudience as F, type StaleWriteDetail as G, type PredictedRefusal as H, ABSENCE_REASONS as I, ACTOR_VOCABULARY as J, type AbsenceReason as K, type Actor as L, COMPUTE_ON as M, type NotificationChannel as N, CONTEXT_POLICIES as O, type PostalAddress as P, type ComputeOn as Q, type RecordsErrorCode as R, type StoredRecord as S, type Timestamp as T, type UseCase as U, type ContextPolicy as V, type WriteConflict as W, DECLARABLE_FIELD_KINDS as X, DELIVERIES as Y, type DeclarableFieldKind as Z, type Delivery as _, type UseCaseSummary as a, allowsOtherValues as a$, type EntityToken as a0, FIELD_SENSITIVITIES as a1, FIELD_SOURCES as a2, FRESHNESS as a3, type FieldBehavior as a4, type FieldRule as a5, type FieldSensitivity as a6, type FieldSource as a7, type FieldTypeWord as a8, type ForbiddenEnvelopeWord as a9, type RelationBinding as aA, type RelationCardinality as aB, type RelationDisplay as aC, type RelationFlavor as aD, type RetiredActorWord as aE, type RuleNodeKind as aF, type RuleUse as aG, STORAGE_MODES as aH, STORE_DOORS as aI, STORE_KNOBS as aJ, STORE_REFUSAL_CODES as aK, type StorageMode as aL, type StoreDoorName as aM, type StoreRefusalCode as aN, TABLE_DISPLAYS as aO, TABLE_ORIGINS as aP, TABLE_TYPES as aQ, type TableDisplay as aR, type TableOrigin as aS, type TableType as aT, VALUE_ALTERNATE_KEYS as aU, VALUE_ENVELOPE_KEYS as aV, type ValueAlternate as aW, type ValueAlternateKey as aX, type ValueEnvelope as aY, type ValueEnvelopeKey as aZ, type ValueSource as a_, type Freshness as aa, type HiddenFieldNotice as ab, KERNEL_TABLES as ac, type KernelTableName as ad, MERGE_FIELD_MODIFIERS as ae, MERGE_FIELD_SEMANTIC_TYPES as af, MERGE_FIELD_SOURCES as ag, type MergeFieldModifier as ah, type MergeFieldSemanticType as ai, type MergeFieldSource as aj, ON_DELETE as ak, OVERRIDE_POLICIES as al, type OnDelete as am, type OverridePolicy as an, PARITY_FIELD_TYPES as ao, PER_VALUE_ACCESS_WORDS as ap, type ParityFieldType as aq, type ParityFieldTypeDescriptor as ar, type PerValueAccessWord as as, type ProvenancePointer as at, RELATION_BINDINGS as au, RELATION_CARDINALITIES as av, RELATION_FLAVORS as aw, RETIRED_ACTOR_WORDS as ax, RULE_NODE_KINDS as ay, RULE_USES as az, type UseCaseDashboardQuestion as b, err as b0, isRecordsErr as b1, ok as b2, type UseCaseDocumentTemplate as c, type UseCaseField as d, type UseCaseForm as e, type UseCaseFormField as f, type UseCaseMergeField as g, type UseCaseNotificationRule as h, type UseCaseNotificationTrigger as i, type UseCasePipeline as j, type UseCasePipelineStage as k, type UseCaseProvenance as l, type UseCaseRelationship as m, type UseCaseRow as n, type UseCaseTable as o, type Uuid as p, type RecordDocument as q, type RecordsResult as r, type RecordGraphWritten as s, type RecordRead as t, type ReadRow as u, type Field as v, type NewFieldDeclaration as w, type FieldPatch as x, type RecordRevision as y, type ReadValue as z };
|
|
@@ -4026,6 +4026,8 @@ interface PredictedRefusal {
|
|
|
4026
4026
|
/** The message the store's own body would raise, word for word. */
|
|
4027
4027
|
message: string;
|
|
4028
4028
|
hint?: string;
|
|
4029
|
+
/** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */
|
|
4030
|
+
detail?: Record<string, unknown>;
|
|
4029
4031
|
sqlstate: string;
|
|
4030
4032
|
/**
|
|
4031
4033
|
* Which of the store's bodies would raise it, so a reader can go and check
|
|
@@ -4245,7 +4247,25 @@ interface RecordRead {
|
|
|
4245
4247
|
/** FLD-3. A constraint attached to a Field. A Rule, never a behaviour. */
|
|
4246
4248
|
interface FieldRule {
|
|
4247
4249
|
kind: "min" | "max" | "length" | "pattern" | "equals_field" | "differs_from_field";
|
|
4248
|
-
|
|
4250
|
+
/**
|
|
4251
|
+
* The rule's own number or word: the least / the most for `min` / `max`, the
|
|
4252
|
+
* LONGEST for `length`, the pattern for `pattern`, the other column's key for
|
|
4253
|
+
* `equals_field` / `differs_from_field`. A `length` rule that only says how
|
|
4254
|
+
* SHORT a value may be carries `min` and no `value`.
|
|
4255
|
+
*/
|
|
4256
|
+
value?: string | number;
|
|
4257
|
+
/**
|
|
4258
|
+
* STORE-RULE-GAPS (the older grid's `patternHint`). On a `pattern` rule only:
|
|
4259
|
+
* how a person writes it, e.g. `"949-555-0142"`. The store refuses an example
|
|
4260
|
+
* its own pattern would refuse, and a refused value is told "Enter it like
|
|
4261
|
+
* 949-555-0142." (the hint, and `detail.example`).
|
|
4262
|
+
*/
|
|
4263
|
+
example?: string;
|
|
4264
|
+
/**
|
|
4265
|
+
* STORE-RULE-GAPS (the older grid's `minLength`). On a `length` rule only: the
|
|
4266
|
+
* fewest characters. A blank is `required`'s question, never "too short".
|
|
4267
|
+
*/
|
|
4268
|
+
min?: number;
|
|
4249
4269
|
/** FLD-10. Empty means "wherever the Field applies". */
|
|
4250
4270
|
applies_to_types?: string[];
|
|
4251
4271
|
}
|
|
@@ -4450,6 +4470,12 @@ interface NewFieldDeclaration {
|
|
|
4450
4470
|
config?: Record<string, unknown>;
|
|
4451
4471
|
/** A text column that holds a signature (`custom.doc_sign` accepts no other). */
|
|
4452
4472
|
format?: string;
|
|
4473
|
+
/**
|
|
4474
|
+
* STORE-RULE-GAPS (the older grid's `allowOther`). A choice list only: a value
|
|
4475
|
+
* that is none of the choices is ADDED to the list as typed instead of
|
|
4476
|
+
* refused. Stored as `config.allow_other`; absent means off.
|
|
4477
|
+
*/
|
|
4478
|
+
allow_other?: boolean;
|
|
4453
4479
|
}
|
|
4454
4480
|
/**
|
|
4455
4481
|
* Every word `custom._field_document_for` resolves for `type`: any parity type
|
|
@@ -4519,6 +4545,12 @@ interface FieldPatch {
|
|
|
4519
4545
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
4520
4546
|
promoted?: boolean;
|
|
4521
4547
|
unique?: boolean;
|
|
4548
|
+
/**
|
|
4549
|
+
* STORE-RULE-GAPS. A choice list's "other values allowed" setting — see
|
|
4550
|
+
* `NewFieldDeclaration.allow_other`. Refused by name on any other column; a
|
|
4551
|
+
* retype that stays a list keeps it.
|
|
4552
|
+
*/
|
|
4553
|
+
allow_other?: boolean;
|
|
4522
4554
|
/** §D / T7: which fields a worked-out column reads. */
|
|
4523
4555
|
depends_on?: Uuid[];
|
|
4524
4556
|
/**
|
|
@@ -4557,6 +4589,11 @@ interface FieldPatch {
|
|
|
4557
4589
|
*/
|
|
4558
4590
|
expr?: Record<string, unknown>;
|
|
4559
4591
|
}
|
|
4592
|
+
/**
|
|
4593
|
+
* Whether a choice column takes values that are not one of its choices
|
|
4594
|
+
* (`config.allow_other`, STORE-RULE-GAPS). Off unless the column says so.
|
|
4595
|
+
*/
|
|
4596
|
+
declare function allowsOtherValues(field: Pick<Field, "type" | "config">): boolean;
|
|
4560
4597
|
|
|
4561
4598
|
/**
|
|
4562
4599
|
* Who the data belongs to. A test organization is created under this name — the
|
|
@@ -4892,4 +4929,4 @@ interface UseCaseSummary {
|
|
|
4892
4929
|
rowCount: number;
|
|
4893
4930
|
}
|
|
4894
4931
|
|
|
4895
|
-
export {
|
|
4932
|
+
export { ENTITY_TOKENS as $, type FieldProposal as A, type BusinessIdentity as B, type TableProposal as C, type RecordsError as D, type PgError as E, type FormAudience as F, type StaleWriteDetail as G, type PredictedRefusal as H, ABSENCE_REASONS as I, ACTOR_VOCABULARY as J, type AbsenceReason as K, type Actor as L, COMPUTE_ON as M, type NotificationChannel as N, CONTEXT_POLICIES as O, type PostalAddress as P, type ComputeOn as Q, type RecordsErrorCode as R, type StoredRecord as S, type Timestamp as T, type UseCase as U, type ContextPolicy as V, type WriteConflict as W, DECLARABLE_FIELD_KINDS as X, DELIVERIES as Y, type DeclarableFieldKind as Z, type Delivery as _, type UseCaseSummary as a, allowsOtherValues as a$, type EntityToken as a0, FIELD_SENSITIVITIES as a1, FIELD_SOURCES as a2, FRESHNESS as a3, type FieldBehavior as a4, type FieldRule as a5, type FieldSensitivity as a6, type FieldSource as a7, type FieldTypeWord as a8, type ForbiddenEnvelopeWord as a9, type RelationBinding as aA, type RelationCardinality as aB, type RelationDisplay as aC, type RelationFlavor as aD, type RetiredActorWord as aE, type RuleNodeKind as aF, type RuleUse as aG, STORAGE_MODES as aH, STORE_DOORS as aI, STORE_KNOBS as aJ, STORE_REFUSAL_CODES as aK, type StorageMode as aL, type StoreDoorName as aM, type StoreRefusalCode as aN, TABLE_DISPLAYS as aO, TABLE_ORIGINS as aP, TABLE_TYPES as aQ, type TableDisplay as aR, type TableOrigin as aS, type TableType as aT, VALUE_ALTERNATE_KEYS as aU, VALUE_ENVELOPE_KEYS as aV, type ValueAlternate as aW, type ValueAlternateKey as aX, type ValueEnvelope as aY, type ValueEnvelopeKey as aZ, type ValueSource as a_, type Freshness as aa, type HiddenFieldNotice as ab, KERNEL_TABLES as ac, type KernelTableName as ad, MERGE_FIELD_MODIFIERS as ae, MERGE_FIELD_SEMANTIC_TYPES as af, MERGE_FIELD_SOURCES as ag, type MergeFieldModifier as ah, type MergeFieldSemanticType as ai, type MergeFieldSource as aj, ON_DELETE as ak, OVERRIDE_POLICIES as al, type OnDelete as am, type OverridePolicy as an, PARITY_FIELD_TYPES as ao, PER_VALUE_ACCESS_WORDS as ap, type ParityFieldType as aq, type ParityFieldTypeDescriptor as ar, type PerValueAccessWord as as, type ProvenancePointer as at, RELATION_BINDINGS as au, RELATION_CARDINALITIES as av, RELATION_FLAVORS as aw, RETIRED_ACTOR_WORDS as ax, RULE_NODE_KINDS as ay, RULE_USES as az, type UseCaseDashboardQuestion as b, err as b0, isRecordsErr as b1, ok as b2, type UseCaseDocumentTemplate as c, type UseCaseField as d, type UseCaseForm as e, type UseCaseFormField as f, type UseCaseMergeField as g, type UseCaseNotificationRule as h, type UseCaseNotificationTrigger as i, type UseCasePipeline as j, type UseCasePipelineStage as k, type UseCaseProvenance as l, type UseCaseRelationship as m, type UseCaseRow as n, type UseCaseTable as o, type Uuid as p, type RecordDocument as q, type RecordsResult as r, type RecordGraphWritten as s, type RecordRead as t, type ReadRow as u, type Field as v, type NewFieldDeclaration as w, type FieldPatch as x, type RecordRevision as y, type ReadValue as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UseCase, a as UseCaseSummary } from '../types-
|
|
2
|
-
export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProvenance, m as UseCaseRelationship, n as UseCaseRow, o as UseCaseTable } from '../types-
|
|
1
|
+
import { U as UseCase, a as UseCaseSummary } from '../types-Bsamaf-a.cjs';
|
|
2
|
+
export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProvenance, m as UseCaseRelationship, n as UseCaseRow, o as UseCaseTable } from '../types-Bsamaf-a.cjs';
|
|
3
3
|
|
|
4
4
|
/** One banned pattern, with the reason and what to do instead. */
|
|
5
5
|
interface PlaceholderPattern {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UseCase, a as UseCaseSummary } from '../types-
|
|
2
|
-
export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProvenance, m as UseCaseRelationship, n as UseCaseRow, o as UseCaseTable } from '../types-
|
|
1
|
+
import { U as UseCase, a as UseCaseSummary } from '../types-Bsamaf-a.js';
|
|
2
|
+
export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProvenance, m as UseCaseRelationship, n as UseCaseRow, o as UseCaseTable } from '../types-Bsamaf-a.js';
|
|
3
3
|
|
|
4
4
|
/** One banned pattern, with the reason and what to do instead. */
|
|
5
5
|
interface PlaceholderPattern {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/records",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.1",
|
|
4
4
|
"description": "The headless client of the AI Matrx record store: the Table / Field / Rule / Record / Relation / Home types, the closed vocabularies and refusal codes read from the store itself, the typed calls over the store's doors and nothing else, the merge-field declaration, a validation mirror that predicts only what the store's own triggers refuse, and the never-throw result envelope. Zero React, zero DOM in the root and /core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|