@ai-matrx/records 0.57.0 → 0.57.2
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 +36 -0
- package/dist/core/index.cjs +113 -17
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +37 -3
- package/dist/core/index.d.ts +37 -3
- package/dist/core/index.js +113 -17
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +7 -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 +7 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +103 -11
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +61 -2
- package/dist/react/index.d.ts +61 -2
- package/dist/react/index.js +103 -11
- package/dist/react/index.js.map +1 -1
- package/dist/{types-DC2tYa4w.d.cts → types-BpBSMhYq.d.cts} +44 -2
- package/dist/{types-DC2tYa4w.d.ts → types-BpBSMhYq.d.ts} +44 -2
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3019,6 +3019,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
3019
3019
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
3020
3020
|
readonly returns: "jsonb";
|
|
3021
3021
|
readonly security: "definer";
|
|
3022
|
+
}, {
|
|
3023
|
+
readonly name: "table_facts";
|
|
3024
|
+
readonly args: "p_organization_id uuid";
|
|
3025
|
+
readonly returns: "TABLE(table_id uuid, visibility text, mine boolean)";
|
|
3026
|
+
readonly security: "definer";
|
|
3022
3027
|
}, {
|
|
3023
3028
|
readonly name: "table_from_example";
|
|
3024
3029
|
readonly args: "p_organization_id uuid, p_home_id uuid, p_example jsonb";
|
|
@@ -4026,6 +4031,8 @@ interface PredictedRefusal {
|
|
|
4026
4031
|
/** The message the store's own body would raise, word for word. */
|
|
4027
4032
|
message: string;
|
|
4028
4033
|
hint?: string;
|
|
4034
|
+
/** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */
|
|
4035
|
+
detail?: Record<string, unknown>;
|
|
4029
4036
|
sqlstate: string;
|
|
4030
4037
|
/**
|
|
4031
4038
|
* Which of the store's bodies would raise it, so a reader can go and check
|
|
@@ -4245,7 +4252,25 @@ interface RecordRead {
|
|
|
4245
4252
|
/** FLD-3. A constraint attached to a Field. A Rule, never a behaviour. */
|
|
4246
4253
|
interface FieldRule {
|
|
4247
4254
|
kind: "min" | "max" | "length" | "pattern" | "equals_field" | "differs_from_field";
|
|
4248
|
-
|
|
4255
|
+
/**
|
|
4256
|
+
* The rule's own number or word: the least / the most for `min` / `max`, the
|
|
4257
|
+
* LONGEST for `length`, the pattern for `pattern`, the other column's key for
|
|
4258
|
+
* `equals_field` / `differs_from_field`. A `length` rule that only says how
|
|
4259
|
+
* SHORT a value may be carries `min` and no `value`.
|
|
4260
|
+
*/
|
|
4261
|
+
value?: string | number;
|
|
4262
|
+
/**
|
|
4263
|
+
* STORE-RULE-GAPS (the older grid's `patternHint`). On a `pattern` rule only:
|
|
4264
|
+
* how a person writes it, e.g. `"949-555-0142"`. The store refuses an example
|
|
4265
|
+
* its own pattern would refuse, and a refused value is told "Enter it like
|
|
4266
|
+
* 949-555-0142." (the hint, and `detail.example`).
|
|
4267
|
+
*/
|
|
4268
|
+
example?: string;
|
|
4269
|
+
/**
|
|
4270
|
+
* STORE-RULE-GAPS (the older grid's `minLength`). On a `length` rule only: the
|
|
4271
|
+
* fewest characters. A blank is `required`'s question, never "too short".
|
|
4272
|
+
*/
|
|
4273
|
+
min?: number;
|
|
4249
4274
|
/** FLD-10. Empty means "wherever the Field applies". */
|
|
4250
4275
|
applies_to_types?: string[];
|
|
4251
4276
|
}
|
|
@@ -4450,6 +4475,12 @@ interface NewFieldDeclaration {
|
|
|
4450
4475
|
config?: Record<string, unknown>;
|
|
4451
4476
|
/** A text column that holds a signature (`custom.doc_sign` accepts no other). */
|
|
4452
4477
|
format?: string;
|
|
4478
|
+
/**
|
|
4479
|
+
* STORE-RULE-GAPS (the older grid's `allowOther`). A choice list only: a value
|
|
4480
|
+
* that is none of the choices is ADDED to the list as typed instead of
|
|
4481
|
+
* refused. Stored as `config.allow_other`; absent means off.
|
|
4482
|
+
*/
|
|
4483
|
+
allow_other?: boolean;
|
|
4453
4484
|
}
|
|
4454
4485
|
/**
|
|
4455
4486
|
* Every word `custom._field_document_for` resolves for `type`: any parity type
|
|
@@ -4519,6 +4550,12 @@ interface FieldPatch {
|
|
|
4519
4550
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
4520
4551
|
promoted?: boolean;
|
|
4521
4552
|
unique?: boolean;
|
|
4553
|
+
/**
|
|
4554
|
+
* STORE-RULE-GAPS. A choice list's "other values allowed" setting — see
|
|
4555
|
+
* `NewFieldDeclaration.allow_other`. Refused by name on any other column; a
|
|
4556
|
+
* retype that stays a list keeps it.
|
|
4557
|
+
*/
|
|
4558
|
+
allow_other?: boolean;
|
|
4522
4559
|
/** §D / T7: which fields a worked-out column reads. */
|
|
4523
4560
|
depends_on?: Uuid[];
|
|
4524
4561
|
/**
|
|
@@ -4557,6 +4594,11 @@ interface FieldPatch {
|
|
|
4557
4594
|
*/
|
|
4558
4595
|
expr?: Record<string, unknown>;
|
|
4559
4596
|
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Whether a choice column takes values that are not one of its choices
|
|
4599
|
+
* (`config.allow_other`, STORE-RULE-GAPS). Off unless the column says so.
|
|
4600
|
+
*/
|
|
4601
|
+
declare function allowsOtherValues(field: Pick<Field, "type" | "config">): boolean;
|
|
4560
4602
|
|
|
4561
4603
|
/**
|
|
4562
4604
|
* Who the data belongs to. A test organization is created under this name — the
|
|
@@ -4892,4 +4934,4 @@ interface UseCaseSummary {
|
|
|
4892
4934
|
rowCount: number;
|
|
4893
4935
|
}
|
|
4894
4936
|
|
|
4895
|
-
export {
|
|
4937
|
+
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 };
|
|
@@ -3019,6 +3019,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
3019
3019
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
3020
3020
|
readonly returns: "jsonb";
|
|
3021
3021
|
readonly security: "definer";
|
|
3022
|
+
}, {
|
|
3023
|
+
readonly name: "table_facts";
|
|
3024
|
+
readonly args: "p_organization_id uuid";
|
|
3025
|
+
readonly returns: "TABLE(table_id uuid, visibility text, mine boolean)";
|
|
3026
|
+
readonly security: "definer";
|
|
3022
3027
|
}, {
|
|
3023
3028
|
readonly name: "table_from_example";
|
|
3024
3029
|
readonly args: "p_organization_id uuid, p_home_id uuid, p_example jsonb";
|
|
@@ -4026,6 +4031,8 @@ interface PredictedRefusal {
|
|
|
4026
4031
|
/** The message the store's own body would raise, word for word. */
|
|
4027
4032
|
message: string;
|
|
4028
4033
|
hint?: string;
|
|
4034
|
+
/** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */
|
|
4035
|
+
detail?: Record<string, unknown>;
|
|
4029
4036
|
sqlstate: string;
|
|
4030
4037
|
/**
|
|
4031
4038
|
* Which of the store's bodies would raise it, so a reader can go and check
|
|
@@ -4245,7 +4252,25 @@ interface RecordRead {
|
|
|
4245
4252
|
/** FLD-3. A constraint attached to a Field. A Rule, never a behaviour. */
|
|
4246
4253
|
interface FieldRule {
|
|
4247
4254
|
kind: "min" | "max" | "length" | "pattern" | "equals_field" | "differs_from_field";
|
|
4248
|
-
|
|
4255
|
+
/**
|
|
4256
|
+
* The rule's own number or word: the least / the most for `min` / `max`, the
|
|
4257
|
+
* LONGEST for `length`, the pattern for `pattern`, the other column's key for
|
|
4258
|
+
* `equals_field` / `differs_from_field`. A `length` rule that only says how
|
|
4259
|
+
* SHORT a value may be carries `min` and no `value`.
|
|
4260
|
+
*/
|
|
4261
|
+
value?: string | number;
|
|
4262
|
+
/**
|
|
4263
|
+
* STORE-RULE-GAPS (the older grid's `patternHint`). On a `pattern` rule only:
|
|
4264
|
+
* how a person writes it, e.g. `"949-555-0142"`. The store refuses an example
|
|
4265
|
+
* its own pattern would refuse, and a refused value is told "Enter it like
|
|
4266
|
+
* 949-555-0142." (the hint, and `detail.example`).
|
|
4267
|
+
*/
|
|
4268
|
+
example?: string;
|
|
4269
|
+
/**
|
|
4270
|
+
* STORE-RULE-GAPS (the older grid's `minLength`). On a `length` rule only: the
|
|
4271
|
+
* fewest characters. A blank is `required`'s question, never "too short".
|
|
4272
|
+
*/
|
|
4273
|
+
min?: number;
|
|
4249
4274
|
/** FLD-10. Empty means "wherever the Field applies". */
|
|
4250
4275
|
applies_to_types?: string[];
|
|
4251
4276
|
}
|
|
@@ -4450,6 +4475,12 @@ interface NewFieldDeclaration {
|
|
|
4450
4475
|
config?: Record<string, unknown>;
|
|
4451
4476
|
/** A text column that holds a signature (`custom.doc_sign` accepts no other). */
|
|
4452
4477
|
format?: string;
|
|
4478
|
+
/**
|
|
4479
|
+
* STORE-RULE-GAPS (the older grid's `allowOther`). A choice list only: a value
|
|
4480
|
+
* that is none of the choices is ADDED to the list as typed instead of
|
|
4481
|
+
* refused. Stored as `config.allow_other`; absent means off.
|
|
4482
|
+
*/
|
|
4483
|
+
allow_other?: boolean;
|
|
4453
4484
|
}
|
|
4454
4485
|
/**
|
|
4455
4486
|
* Every word `custom._field_document_for` resolves for `type`: any parity type
|
|
@@ -4519,6 +4550,12 @@ interface FieldPatch {
|
|
|
4519
4550
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
4520
4551
|
promoted?: boolean;
|
|
4521
4552
|
unique?: boolean;
|
|
4553
|
+
/**
|
|
4554
|
+
* STORE-RULE-GAPS. A choice list's "other values allowed" setting — see
|
|
4555
|
+
* `NewFieldDeclaration.allow_other`. Refused by name on any other column; a
|
|
4556
|
+
* retype that stays a list keeps it.
|
|
4557
|
+
*/
|
|
4558
|
+
allow_other?: boolean;
|
|
4522
4559
|
/** §D / T7: which fields a worked-out column reads. */
|
|
4523
4560
|
depends_on?: Uuid[];
|
|
4524
4561
|
/**
|
|
@@ -4557,6 +4594,11 @@ interface FieldPatch {
|
|
|
4557
4594
|
*/
|
|
4558
4595
|
expr?: Record<string, unknown>;
|
|
4559
4596
|
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Whether a choice column takes values that are not one of its choices
|
|
4599
|
+
* (`config.allow_other`, STORE-RULE-GAPS). Off unless the column says so.
|
|
4600
|
+
*/
|
|
4601
|
+
declare function allowsOtherValues(field: Pick<Field, "type" | "config">): boolean;
|
|
4560
4602
|
|
|
4561
4603
|
/**
|
|
4562
4604
|
* Who the data belongs to. A test organization is created under this name — the
|
|
@@ -4892,4 +4934,4 @@ interface UseCaseSummary {
|
|
|
4892
4934
|
rowCount: number;
|
|
4893
4935
|
}
|
|
4894
4936
|
|
|
4895
|
-
export {
|
|
4937
|
+
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 };
|