@stndrds/schema 1.0.0-alpha.193 → 1.0.0-alpha.195

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.
Files changed (125) hide show
  1. package/dist/attributes-DP08iPCh.d.mts +889 -0
  2. package/dist/attributes-Ddhps_AU.d.ts +889 -0
  3. package/dist/{chunk-MAKSIK3P.js → chunk-5WATIVCA.js} +2 -2
  4. package/dist/{chunk-4KRLCWJM.mjs → chunk-6I2R22CX.mjs} +1 -1
  5. package/dist/{chunk-DC7YYE3U.js → chunk-ACKMC6FL.js} +2 -2
  6. package/dist/{chunk-TEQNVO7W.mjs → chunk-AYVHMVKQ.mjs} +1 -1
  7. package/dist/{chunk-P2BE2A2G.js → chunk-BV3IUMMW.js} +4 -7
  8. package/dist/{chunk-CCB4OY2O.js → chunk-E6JUYGJX.js} +2 -2
  9. package/dist/{chunk-7A3Y6O32.js → chunk-EBGRZUIH.js} +2 -2
  10. package/dist/{chunk-QWZHR2OO.js → chunk-EW5XR2X3.js} +2 -2
  11. package/dist/{chunk-UQVW4KPP.mjs → chunk-HRQEZUAA.mjs} +0 -1
  12. package/dist/{chunk-OAQWRMTP.js → chunk-HTSTPTNZ.js} +2 -2
  13. package/dist/{chunk-U4JC7P6D.mjs → chunk-HXDDJLHD.mjs} +37 -52
  14. package/dist/{chunk-Z75P63VF.mjs → chunk-JUKLL5RJ.mjs} +1 -1
  15. package/dist/{chunk-YQROI4IE.js → chunk-M5QIBMIH.js} +37 -52
  16. package/dist/{chunk-C47FE5UG.js → chunk-MZOEL7FN.js} +47 -41
  17. package/dist/{chunk-KWVCGQ7N.mjs → chunk-NOMHDOVE.mjs} +2 -5
  18. package/dist/{chunk-OLJLCVNY.mjs → chunk-NS63SPNN.mjs} +1 -1
  19. package/dist/{chunk-J5HRK3WD.js → chunk-O44XVGHE.js} +2 -2
  20. package/dist/{chunk-TMYBEXBT.mjs → chunk-OSSGN43B.mjs} +1 -1
  21. package/dist/{chunk-4KY24N26.mjs → chunk-PMKCDRRO.mjs} +26 -21
  22. package/dist/{chunk-4TC27SMF.mjs → chunk-QEZUDVTN.mjs} +1 -1
  23. package/dist/{chunk-BLXQGQLK.mjs → chunk-QVLQPW3O.mjs} +1 -1
  24. package/dist/{chunk-EZHMVZQ4.js → chunk-QWKLQRBX.js} +4 -4
  25. package/dist/{chunk-ROAZLZA2.js → chunk-ROLWVTU3.js} +2 -2
  26. package/dist/{chunk-3JINFUN3.js → chunk-SGSGREPG.js} +2 -6
  27. package/dist/{chunk-VXOTYFEW.js → chunk-T6L2MUG2.js} +2 -2
  28. package/dist/{chunk-KNYZH2WD.mjs → chunk-UANQJ2GH.mjs} +8 -1
  29. package/dist/{chunk-IRTRJH37.mjs → chunk-UXAHLSWC.mjs} +1 -1
  30. package/dist/{chunk-ACQ3TUFK.js → chunk-V2UA2D4E.js} +2 -2
  31. package/dist/{chunk-R4CJHCC4.mjs → chunk-XZ5RG2OG.mjs} +1 -4
  32. package/dist/{chunk-TKN73433.js → chunk-YIP5FJ5H.js} +9 -2
  33. package/dist/{chunk-T225DB55.js → chunk-YKWSHBT5.js} +0 -1
  34. package/dist/{chunk-TBYXYSGA.mjs → chunk-YUFTHPOE.mjs} +1 -1
  35. package/dist/{chunk-ITTQ4FGR.mjs → chunk-ZDMOXF3U.mjs} +1 -1
  36. package/dist/{chunk-SMOHDR6M.mjs → chunk-ZDQ5AP26.mjs} +1 -1
  37. package/dist/{helpers-Y9rNQ6sz.d.ts → helpers-Bph8AoY7.d.mts} +15 -3
  38. package/dist/{helpers-HrKmSkLi.d.mts → helpers-D9klos6x.d.ts} +15 -3
  39. package/dist/index.d.mts +1159 -236
  40. package/dist/index.d.ts +1159 -236
  41. package/dist/index.js +2331 -816
  42. package/dist/index.mjs +2264 -774
  43. package/dist/{types-Bdlhgrf7.d.ts → types-D38kriFw.d.mts} +1 -2
  44. package/dist/{types-C5DittlR.d.mts → types-iKvYBe6v.d.ts} +1 -2
  45. package/dist/validation/all.d.mts +3 -3
  46. package/dist/validation/all.d.ts +3 -3
  47. package/dist/validation/all.js +33 -30
  48. package/dist/validation/all.mjs +17 -18
  49. package/dist/validation/complex/currency.d.mts +2 -2
  50. package/dist/validation/complex/currency.d.ts +2 -2
  51. package/dist/validation/complex/currency.js +3 -3
  52. package/dist/validation/complex/currency.mjs +2 -2
  53. package/dist/validation/complex/file.d.mts +2 -2
  54. package/dist/validation/complex/file.d.ts +2 -2
  55. package/dist/validation/complex/file.js +3 -3
  56. package/dist/validation/complex/file.mjs +2 -2
  57. package/dist/validation/complex/location.d.mts +2 -2
  58. package/dist/validation/complex/location.d.ts +2 -2
  59. package/dist/validation/complex/location.js +3 -3
  60. package/dist/validation/complex/location.mjs +2 -2
  61. package/dist/validation/complex/phone.d.mts +2 -2
  62. package/dist/validation/complex/phone.d.ts +2 -2
  63. package/dist/validation/complex/phone.js +3 -3
  64. package/dist/validation/complex/phone.mjs +2 -2
  65. package/dist/validation/complex/relation.d.mts +2 -2
  66. package/dist/validation/complex/relation.d.ts +2 -2
  67. package/dist/validation/complex/relation.js +5 -5
  68. package/dist/validation/complex/relation.mjs +2 -2
  69. package/dist/validation/complex/richtext.d.mts +2 -2
  70. package/dist/validation/complex/richtext.d.ts +2 -2
  71. package/dist/validation/complex/richtext.js +3 -3
  72. package/dist/validation/complex/richtext.mjs +2 -2
  73. package/dist/validation/complex/select.d.mts +2 -2
  74. package/dist/validation/complex/select.d.ts +2 -2
  75. package/dist/validation/complex/select.js +5 -5
  76. package/dist/validation/complex/select.mjs +2 -2
  77. package/dist/validation/complex/user.d.mts +2 -2
  78. package/dist/validation/complex/user.d.ts +2 -2
  79. package/dist/validation/complex/user.js +3 -3
  80. package/dist/validation/complex/user.mjs +2 -2
  81. package/dist/validation/computed/formula.d.mts +2 -2
  82. package/dist/validation/computed/formula.d.ts +2 -2
  83. package/dist/validation/computed/formula.js +3 -3
  84. package/dist/validation/computed/formula.mjs +2 -2
  85. package/dist/validation/computed/rollup.d.mts +2 -2
  86. package/dist/validation/computed/rollup.d.ts +2 -2
  87. package/dist/validation/computed/rollup.js +3 -3
  88. package/dist/validation/computed/rollup.mjs +2 -2
  89. package/dist/validation/config/index.d.mts +1 -1
  90. package/dist/validation/config/index.d.ts +1 -1
  91. package/dist/validation/config/index.js +4 -4
  92. package/dist/validation/config/index.mjs +1 -1
  93. package/dist/validation/core/index.d.mts +3 -3
  94. package/dist/validation/core/index.d.ts +3 -3
  95. package/dist/validation/core/index.js +3 -3
  96. package/dist/validation/core/index.mjs +1 -1
  97. package/dist/validation/object/index.d.mts +3 -3
  98. package/dist/validation/object/index.d.ts +3 -3
  99. package/dist/validation/object/index.js +32 -29
  100. package/dist/validation/object/index.mjs +16 -17
  101. package/dist/validation/primitives/checkbox.d.mts +2 -2
  102. package/dist/validation/primitives/checkbox.d.ts +2 -2
  103. package/dist/validation/primitives/checkbox.js +3 -3
  104. package/dist/validation/primitives/checkbox.mjs +2 -2
  105. package/dist/validation/primitives/date.d.mts +2 -2
  106. package/dist/validation/primitives/date.d.ts +2 -2
  107. package/dist/validation/primitives/date.js +3 -3
  108. package/dist/validation/primitives/date.mjs +2 -2
  109. package/dist/validation/primitives/number.d.mts +2 -2
  110. package/dist/validation/primitives/number.d.ts +2 -2
  111. package/dist/validation/primitives/number.js +3 -3
  112. package/dist/validation/primitives/number.mjs +2 -2
  113. package/dist/validation/primitives/text.d.mts +3 -8
  114. package/dist/validation/primitives/text.d.ts +3 -8
  115. package/dist/validation/primitives/text.js +3 -7
  116. package/dist/validation/primitives/text.mjs +2 -2
  117. package/package.json +2 -13
  118. package/dist/chunk-D7WFIGXW.js +0 -14
  119. package/dist/chunk-RUYUFXNW.mjs +0 -12
  120. package/dist/filters-DVBn5tov.d.ts +0 -1630
  121. package/dist/filters-HDG4kLoo.d.mts +0 -1630
  122. package/dist/validation/primitives/rating.d.mts +0 -12
  123. package/dist/validation/primitives/rating.d.ts +0 -12
  124. package/dist/validation/primitives/rating.js +0 -11
  125. package/dist/validation/primitives/rating.mjs +0 -2
package/dist/index.d.mts CHANGED
@@ -1,15 +1,250 @@
1
- import { k as SortRule, l as FilterState, m as Timestamps, n as AttributeType, o as DocumentLayout, V as ViewType, p as ViewConfig, q as ConfigOverrides, j as CompletionStatus, A as Attribute, r as SchemaOperation, s as LocationGranularity, t as Location, e as FormulaAttribute, f as RollupAttribute, u as DocumentAttribute, d as StatusAttribute, c as SelectAttribute, b as MultiselectAttribute, v as Phone, w as Currency, D as DateAttribute, U as UserAttribute, x as DocumentSlotConfig, y as PropertySchema, z as FeatureGate, g as CheckboxAttribute, C as CurrencyAttribute, i as TextAttribute, T as TextAreaAttribute, N as NumberAttribute, P as PhoneAttribute, B as Option, h as RatingAttribute, L as LocationAttribute, F as FileAttribute, E as FormulaReturnType, R as RelationAttribute, G as BilateralConfig, S as SingleRelationAttribute, M as MultiRelationAttribute, H as RelationTarget, a as RichtextAttribute, I as RichtextFeature, J as RollupFunction, K as MigrationDefinition, O as ObjectDefinition, Q as DetailViewConfig, W as DetailViewDefinition, X as DetailViewLayout, Y as SidePanelConfig, Z as Field, _ as AttributeGroupField, $ as FieldGroup, a0 as RelationGroup, a1 as Group, a2 as TableTab, a3 as CreateMode, a4 as Tab, a5 as ListViewConfig, a6 as ListViewDefinition, a7 as FlagValueType, a8 as FeatureFlagDefinition, a9 as FlagLevel, aa as FeatureFlagsRepository, ab as StaticFlagDefault, ac as ResolvedFlag, ad as ViewDefinition, ae as ListViewTab, af as FilterOperator, ag as FilterValue, ah as FilterRule } from './filters-HDG4kLoo.mjs';
2
- export { ai as ActivityTab, aj as AdvancedFilterState, ak as AttributeGroup, al as BaseAttribute, am as BuiltInTransform, an as CreateDocument, ao as CreateDocumentLink, ap as CreateDocumentSlot, aq as CreateProcessingJob, ar as CurrencyFilterValue, as as CustomTab, at as DEFAULT_DOCUMENT_SLOT, au as DateFormat, av as DateValue, aw as Document, ax as DocumentKind, ay as DocumentLayoutVariant, az as DocumentListOptions, aA as DocumentSlot, aB as DocumentWithSlots, aC as DocumentWithSubCount, aD as DocumentsTab, aE as ExtendedFilterRule, aF as FeatureFlagsConfig, aG as FilterCombinator, aH as FilterGroup, aI as FlagOverride, aJ as FolderPreset, aK as FormDensity, aL as FormTab, aM as FormsTab, aN as InverseSource, aO as ListViewLayout, aP as MAX_PRESET_DEPTH, aQ as MigrationError, aR as NO_VALUE_OPERATORS, aS as NoValueOperator, aT as NumberUnit, aU as OPERATORS_BY_TYPE, aV as ObjectAttribute, aW as ObjectRecord, aX as OptionPropertyAttribute, aY as PhoneFilterValue, aZ as PresetNode, a_ as ProcessingJob, a$ as ProcessingJobStatus, b0 as ProcessingJobType, b1 as PropertyAttribute, b2 as PropertyType, b3 as QueryState, b4 as RELATION_TARGET_ANY, b5 as RESERVED_ATTRIBUTE_NAMES, b6 as RecordDocuments, b7 as RelationSource, b8 as RelativeDateValue, b9 as ReservedAttributeName, ba as RichtextTab, bb as SYSTEM_FIELD_NAMES, bc as SlotStatus, bd as SortDirection, be as StatusGroup, bf as SystemFieldName, bg as TabType, bh as TableSource, bi as UpdateDocument, bj as UpdateDocumentSlot, bk as UpdateProcessingJob, bl as ViewOperation, bm as ViewOverlay, bn as ViewTransform, bo as getRollupFilterOperators, bp as hasOptions, bq as inferInverseCardinality, br as isAttributeSortable, bs as isBilateralRelation, bt as isDetailView, bu as isFieldGroup, bv as isListView, bw as isNoValueOperator, bx as isRelationGroup, by as isUniversalRelation } from './filters-HDG4kLoo.mjs';
1
+ import { i as ComputedValueType, j as ComputedReturnType, k as AttributeType, l as ComputedOptionsSource, m as ComputedDependency, n as ComputedPlan, f as RollupAttribute, A as Attribute, o as Timestamps, p as DocumentLayout, h as CompletionStatus, q as SchemaOperation, r as LocationGranularity, s as Location, e as FormulaAttribute, t as DocumentAttribute, d as StatusAttribute, c as SelectAttribute, b as MultiselectAttribute, u as Phone, v as Currency, D as DateAttribute, U as UserAttribute, w as DocumentSlotConfig, x as PropertySchema, g as CheckboxAttribute, C as CurrencyAttribute, T as TextAttribute, N as NumberAttribute, P as PhoneAttribute, y as Option, L as LocationAttribute, F as FileAttribute, z as FormulaReturnType, R as RelationAttribute, B as BilateralConfig, S as SingleRelationAttribute, M as MultiRelationAttribute, E as RelationTarget, a as RichtextAttribute, G as RollupFunction, H as UserReferenceType, I as MigrationDefinition, O as ObjectDefinition } from './attributes-DP08iPCh.mjs';
2
+ export { J as AttributeGroup, K as BaseAttribute, Q as BuiltInTransform, V as ComputedAttributeState, W as ComputedFieldKind, X as ComputedStateStatus, Y as CreateDocument, Z as CreateDocumentLink, _ as CreateDocumentSlot, $ as DEFAULT_DOCUMENT_SLOT, a0 as DateFormat, a1 as DateValue, a2 as Document, a3 as DocumentKind, a4 as DocumentLayoutVariant, a5 as DocumentListOptions, a6 as DocumentSlot, a7 as DocumentWithSlots, a8 as DocumentWithSubCount, a9 as FolderPreset, aa as MAX_PRESET_DEPTH, ab as NumberUnit, ac as ObjectAttribute, ad as ObjectRecord, ae as OptionPropertyAttribute, af as PresetNode, ag as PropertyAttribute, ah as PropertyType, ai as RELATION_TARGET_ANY, aj as RESERVED_ATTRIBUTE_NAMES, ak as RecordDocuments, al as ReservedAttributeName, am as RichTextAttribute, an as SYSTEM_FIELD_NAMES, ao as SlotStatus, ap as StatusGroup, aq as SystemFieldName, ar as UpdateDocument, as as UpdateDocumentSlot, at as hasOptions, au as inferInverseCardinality, av as isAttributeSortable, aw as isBilateralRelation, ax as isUniversalRelation } from './attributes-DP08iPCh.mjs';
3
3
  import { MimeType, IconName, ColorId, CountryIso3, CurrencyCode } from '@stndrds/constants';
4
4
  import { Uuid, TenantId } from './utils.mjs';
5
5
  export { UserId, asTenantId, asUserId, deepEqual, generateId, indexBy } from './utils.mjs';
6
6
  import { StandardSchemaV1 } from '@standard-schema/spec';
7
7
  export { StandardSchemaV1 } from '@standard-schema/spec';
8
8
  import z from 'zod';
9
- export { V as ValidationMessages } from './types-C5DittlR.mjs';
9
+ export { V as ValidationMessages } from './types-D38kriFw.mjs';
10
10
  export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './validation/core/index.mjs';
11
11
  export { parseAttributeConfig } from './validation/config/index.mjs';
12
- export { c as computeRecordStatus, a as createFormAttributeValidator, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from './helpers-HrKmSkLi.mjs';
12
+ export { c as computeRecordStatus, a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, v as validateDraft, b as validateDraftOrThrow, d as validateObject, e as validateObjectOrThrow } from './helpers-Bph8AoY7.mjs';
13
+
14
+ declare const COMPUTED_FUNCTION_NAMES: readonly ["if", "concat", "sum", "avg", "count", "min", "max", "earliest", "latest", "unique", "first", "percent_empty", "percent_not_empty", "count_empty", "count_not_empty", "count_unique"];
15
+ type ComputedFunctionName = (typeof COMPUTED_FUNCTION_NAMES)[number];
16
+ interface ComputedFunctionSignature {
17
+ name: ComputedFunctionName;
18
+ returnType: ComputedValueType | "argument" | "branch" | "source_item";
19
+ minArgs: number;
20
+ maxArgs?: number;
21
+ }
22
+ declare const COMPUTED_FUNCTIONS: Record<ComputedFunctionName, ComputedFunctionSignature>;
23
+ declare function isComputedFunctionName(name: string): name is ComputedFunctionName;
24
+
25
+ type ComputedFormulaAstNode = ComputedFormulaLiteralNode | ComputedFormulaPathNode | ComputedFormulaCallNode | ComputedFormulaBinaryNode;
26
+ interface ComputedFormulaLiteralNode {
27
+ kind: "literal";
28
+ value: string | number | boolean | null;
29
+ }
30
+ interface ComputedFormulaPathNode {
31
+ kind: "path";
32
+ parts: string[];
33
+ }
34
+ interface ComputedFormulaCallNode {
35
+ kind: "call";
36
+ functionName: string;
37
+ args: ComputedFormulaAstNode[];
38
+ }
39
+ interface ComputedFormulaBinaryNode {
40
+ kind: "binary";
41
+ operator: ComputedFormulaBinaryOperator;
42
+ left: ComputedFormulaAstNode;
43
+ right: ComputedFormulaAstNode;
44
+ }
45
+ type ComputedFormulaBinaryOperator = ">" | "<" | ">=" | "<=" | "==" | "!=" | "+" | "-" | "*" | "/";
46
+ declare class ComputedFormulaParseError extends Error {
47
+ constructor(message: string);
48
+ }
49
+ declare function parseComputedFormula(expression: string): ComputedFormulaAstNode;
50
+
51
+ interface ComputedCompileAttribute {
52
+ name: string;
53
+ type: AttributeType;
54
+ id?: string;
55
+ returnType?: ComputedReturnType;
56
+ optionsSource?: ComputedOptionsSource;
57
+ options?: readonly unknown[];
58
+ cardinality?: "one" | "many";
59
+ targetObjectName?: string;
60
+ targets?: readonly {
61
+ object: string;
62
+ }[];
63
+ }
64
+ interface ComputedCompileObject {
65
+ objectName: string;
66
+ attributes: readonly ComputedCompileAttribute[];
67
+ }
68
+ interface ComputedCompileSchema extends ComputedCompileObject {
69
+ relatedObjects?: Record<string, ComputedCompileObject>;
70
+ }
71
+ interface CompileComputedFormulaInput {
72
+ attributeName: string;
73
+ expression: string;
74
+ returnType: ComputedReturnType;
75
+ schema: ComputedCompileSchema;
76
+ }
77
+ interface ComputedDependencyGraphNode {
78
+ attributeName: string;
79
+ dependencies: readonly ComputedDependency[];
80
+ }
81
+ declare class ComputedFormulaCompileError extends Error {
82
+ constructor(message: string);
83
+ }
84
+ declare function compileComputedFormula(input: CompileComputedFormulaInput): ComputedPlan;
85
+ declare function assertAcyclicComputedDependencies(nodes: readonly ComputedDependencyGraphNode[]): void;
86
+
87
+ declare function rollupToFormulaExpression(attr: RollupAttribute): string;
88
+ declare function inferRollupReturnType(attr: RollupAttribute, schema: ComputedCompileSchema): ComputedReturnType;
89
+ declare function compileRollupAttribute(attr: RollupAttribute, schema: ComputedCompileSchema): ComputedPlan;
90
+
91
+ declare function isPlainRecord(value: unknown): value is Record<string, unknown>;
92
+ declare function formatComputedResult(value: unknown, returnType: ComputedReturnType, decimals?: number): unknown;
93
+ declare function evaluateComputedAst(node: ComputedFormulaAstNode, input: Record<string, unknown>): unknown;
94
+ declare function evaluateComputedFormula(expression: string, input: Record<string, unknown>): unknown;
95
+ interface ComputedFormulaResult {
96
+ value: unknown;
97
+ error?: string;
98
+ }
99
+ declare function evaluateComputedFormulaWithResult(expression: string, input: Record<string, unknown>, returnType?: ComputedReturnType, decimals?: number): ComputedFormulaResult;
100
+
101
+ type ComputedFunctionCategory = "logic" | "text" | "number" | "date" | "collection";
102
+ interface ComputedFunctionMetadata {
103
+ name: ComputedFunctionName;
104
+ signature: string;
105
+ description: string;
106
+ category: ComputedFunctionCategory;
107
+ example: string;
108
+ }
109
+ declare const COMPUTED_FUNCTION_METADATA: ComputedFunctionMetadata[];
110
+
111
+ /** Operators for text-based attributes */
112
+ type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
113
+ /** Operators for number-based attributes */
114
+ type NumberFilterOperator = "eq" | "neq" | "lt" | "gt" | "lte" | "gte" | "is_empty" | "is_not_empty";
115
+ /** Operators for checkbox */
116
+ type CheckboxFilterOperator = "is_checked" | "is_not_checked";
117
+ /** Operators for date-based attributes */
118
+ type DateFilterOperator = "is" | "is_not" | "before" | "after" | "on_or_before" | "on_or_after" | "is_within" | "day_month_eq" | "is_empty" | "is_not_empty";
119
+ /** Operators for select-based attributes (supports single or multi-value filtering) */
120
+ type SelectFilterOperator = "is" | "is_not" | "any_of" | "none_of" | "is_empty" | "is_not_empty";
121
+ /** Operators for multiselect-based attributes */
122
+ type MultiselectFilterOperator = "contains" | "not_contains" | "is_empty" | "is_not_empty";
123
+ /**
124
+ * Operators for relation-based attributes (covers single, multi-value, and
125
+ * reference-shaped filtering — file, user, relation, document all share the
126
+ * same edge-backed operator set as of Phase 4.4).
127
+ */
128
+ type RelationFilterOperator = "is" | "is_not" | "any_of" | "none_of" | "contains" | "not_contains" | "is_empty" | "is_not_empty";
129
+ /** All possible filter operators */
130
+ type FilterOperator = TextFilterOperator | NumberFilterOperator | CheckboxFilterOperator | DateFilterOperator | SelectFilterOperator | MultiselectFilterOperator | RelationFilterOperator;
131
+ /** Relative date value for "is_within" operator */
132
+ interface RelativeDateValue {
133
+ amount: number;
134
+ unit: "days" | "weeks" | "months" | "years";
135
+ direction: "past" | "future";
136
+ }
137
+ /** Currency filter value with amount and optional currency codes
138
+ * - code: undefined or [] = any currency
139
+ * - code: string[] = filter by specific currencies
140
+ */
141
+ interface CurrencyFilterValue {
142
+ value: number | null;
143
+ code?: string[];
144
+ }
145
+ /** Phone filter value with number and optional country code */
146
+ interface PhoneFilterValue {
147
+ phoneNumber: string | null;
148
+ countryCode?: string;
149
+ }
150
+ /** Filter value can be various types depending on the attribute */
151
+ type FilterValue = string | number | boolean | string[] | RelativeDateValue | CurrencyFilterValue | PhoneFilterValue | null;
152
+ /** A single filter rule */
153
+ interface FilterRule {
154
+ /** Root attribute name (scalar attribute, or a reference attribute when `property` is set). */
155
+ attribute: string;
156
+ /**
157
+ * If set, this rule filters on a qualified edge property.
158
+ * Requires `attribute` to be a reference attribute (today: `relation` or `document`) that has `.qualifyWith()`.
159
+ * The `operator` must be valid for the property's type, not the root attribute's type.
160
+ */
161
+ property?: string;
162
+ /** Filter operator */
163
+ operator: FilterOperator;
164
+ /** Filter value (null for operators like is_empty) */
165
+ value: FilterValue;
166
+ }
167
+ /**
168
+ * Extended filter rule with optional attribute definition.
169
+ * When provided, enables smarter type-aware filtering (e.g., array operators for multiselect).
170
+ */
171
+ interface ExtendedFilterRule extends FilterRule {
172
+ /** Full attribute definition for type-aware filtering */
173
+ attributeDef?: Attribute;
174
+ }
175
+ /** Combinator for filter rules */
176
+ type FilterCombinator = "and" | "or";
177
+ /** Complete filter state (simple mode) */
178
+ interface FilterState {
179
+ /** How to combine rules */
180
+ combinator: FilterCombinator;
181
+ /** List of filter rules */
182
+ rules: FilterRule[];
183
+ }
184
+ /**
185
+ * A filter group containing rules (used in advanced mode)
186
+ * Groups can be nested up to 2 levels deep
187
+ */
188
+ interface FilterGroup {
189
+ /** Unique identifier for this group */
190
+ id: string;
191
+ /** How to combine rules within this group */
192
+ combinator: FilterCombinator;
193
+ /** List of filter rules in this group */
194
+ rules: FilterRule[];
195
+ }
196
+ /**
197
+ * Advanced filter state with nested groups
198
+ * Structure: AdvancedFilterState -> FilterGroup[] -> FilterRule[]
199
+ * Maximum 2 levels of nesting
200
+ */
201
+ interface AdvancedFilterState {
202
+ /** How to combine groups at the top level */
203
+ combinator: FilterCombinator;
204
+ /** List of filter groups */
205
+ groups: FilterGroup[];
206
+ }
207
+ /** Sort direction */
208
+ type SortDirection = "asc" | "desc";
209
+ /** A single sort rule */
210
+ interface SortRule {
211
+ /** Attribute name to sort by */
212
+ attribute: string;
213
+ /** Sort direction */
214
+ direction: SortDirection;
215
+ }
216
+ /** Complete query state with search, filters, sorts, and pagination */
217
+ interface QueryState {
218
+ /** Full-text search query */
219
+ search?: string;
220
+ /** Filter configuration (simple mode) */
221
+ filters?: FilterState;
222
+ /** Advanced filter configuration (grouped mode) */
223
+ advancedFilters?: AdvancedFilterState;
224
+ /** Sort configuration (multiple sorts supported) */
225
+ sorts?: SortRule[];
226
+ /** Pagination */
227
+ limit?: number;
228
+ offset?: number;
229
+ }
230
+ /** Mapping of attribute types to their valid operators (rollup excluded — use getRollupFilterOperators()) */
231
+ declare const OPERATORS_BY_TYPE: Record<Exclude<AttributeType, "rollup">, readonly FilterOperator[]>;
232
+ /** Check if an operator requires a value */
233
+ type NoValueOperator = "is_empty" | "is_not_empty" | "is_checked" | "is_not_checked";
234
+ /** Operators that don't require a value */
235
+ declare const NO_VALUE_OPERATORS: readonly NoValueOperator[];
236
+ /**
237
+ * Check if an operator requires a value
238
+ */
239
+ declare function isNoValueOperator(operator: FilterOperator): operator is NoValueOperator;
240
+ /**
241
+ * Get the filter operators for a rollup attribute based on its aggregation function and target type.
242
+ *
243
+ * - earliest / latest → date operators
244
+ * - original → operators matching targetAttributeType (falls back to numeric if unknown)
245
+ * - all other functions → numeric operators (sum, avg, count, percent, etc.)
246
+ */
247
+ declare function getRollupFilterOperators(attr: RollupAttribute): readonly FilterOperator[];
13
248
 
14
249
  /**
15
250
  * Generic list options for pagination and sorting
@@ -189,6 +424,427 @@ interface UpdateFile {
189
424
  allowedUsers?: Uuid[];
190
425
  }
191
426
 
427
+ /**
428
+ * Type of view - determines the config structure
429
+ */
430
+ type ViewType = "detail" | "list";
431
+ /**
432
+ * Creation behavior when clicking the "+" button
433
+ * - `redirect`: Create the record then navigate to its detail page
434
+ * - `inline`: Insert an empty row in the table (no navigation)
435
+ * - `modal`: Open a stacked modal for creation
436
+ */
437
+ type CreateMode = "redirect" | "inline" | "modal";
438
+ /**
439
+ * Inline attribute group configuration
440
+ * Groups multiple attributes into a single composite field with dropdown editing
441
+ */
442
+ interface AttributeGroupField {
443
+ /** Unique identifier for the group */
444
+ id: string;
445
+ /** Display label for the composite field */
446
+ label: string;
447
+ /** Description shown in the dropdown */
448
+ description?: string;
449
+ /** Attribute names to include in this group */
450
+ attributes: string[];
451
+ /**
452
+ * Template for the display value
453
+ * Uses {attributeName} syntax for interpolation
454
+ * @example "{billing_street}, {billing_city} {billing_postal_code}"
455
+ */
456
+ displayTemplate?: string;
457
+ }
458
+ /**
459
+ * Field definition within a form group
460
+ * Can be either a single attribute or an inline attribute group
461
+ */
462
+ interface Field {
463
+ /** Attribute name to display (for single attribute fields) */
464
+ attribute?: string;
465
+ /** Inline attribute group (groups multiple attributes into one composite field) */
466
+ attributeGroup?: AttributeGroupField;
467
+ /** Grid span (1-12 columns) */
468
+ span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
469
+ /** Override label for this view (only for single attribute fields) */
470
+ label?: string;
471
+ /** Force read-only display */
472
+ readOnly?: boolean;
473
+ }
474
+ /**
475
+ * Base properties shared by all group types
476
+ */
477
+ interface BaseGroup {
478
+ id: string;
479
+ label: string;
480
+ description?: string;
481
+ collapsible?: boolean;
482
+ collapsed?: boolean;
483
+ order?: number;
484
+ }
485
+ /**
486
+ * Group of fields for organizing forms (default group type)
487
+ */
488
+ interface FieldGroup extends BaseGroup {
489
+ /** Discriminant — optional for backward compatibility with existing data */
490
+ type?: "fields";
491
+ fields: Field[];
492
+ }
493
+ /**
494
+ * Group that displays related records for a relation attribute
495
+ */
496
+ interface RelationGroup extends BaseGroup {
497
+ type: "relation";
498
+ /** Relation attribute name on the source object */
499
+ attribute: string;
500
+ /** Columns to display (auto-detected from target object if empty) */
501
+ columns?: string[];
502
+ /** Read-only mode */
503
+ readOnly?: boolean;
504
+ /** Allow creating new related records */
505
+ allowCreate?: boolean;
506
+ /**
507
+ * Two-level traversal — display records from the target's relation.
508
+ * When set, parent rows become grouping headers and the sub-rows
509
+ * (from `through.attribute`) are the primary display.
510
+ *
511
+ * @example attribute = "members", through.attribute = "companies"
512
+ * → displays companies of each member
513
+ */
514
+ through?: {
515
+ /** Relation attribute on the first-level target object */
516
+ attribute: string;
517
+ };
518
+ }
519
+ /**
520
+ * Discriminated union of all group types
521
+ */
522
+ type Group = FieldGroup | RelationGroup;
523
+ type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms";
524
+ /**
525
+ * Base properties shared by all tab types
526
+ */
527
+ interface BaseTab {
528
+ id: string;
529
+ name: string;
530
+ label: string;
531
+ icon?: IconName;
532
+ order?: number;
533
+ }
534
+ /**
535
+ * Form layout density
536
+ */
537
+ type FormDensity = "compact" | "comfortable" | "spacious";
538
+ /**
539
+ * Form tab - displays attributes organized in groups
540
+ */
541
+ interface FormTab extends BaseTab {
542
+ type: "form";
543
+ groups: Group[];
544
+ /** Number of grid columns (1, 2, or 3). Default: 2 */
545
+ formColumns?: 1 | 2 | 3;
546
+ /** Layout density. Default: "comfortable" */
547
+ density?: FormDensity;
548
+ }
549
+ /**
550
+ * Direct relation on the current object
551
+ *
552
+ * @example Contact.companies → shows Companies linked via the "companies" relation
553
+ */
554
+ interface RelationSource {
555
+ type: "relation";
556
+ /** Relation attribute name on the current object */
557
+ attribute: string;
558
+ }
559
+ /**
560
+ * Inverse lookup — records from another object that point to us
561
+ *
562
+ * @example On Company, show Contacts where Contact.company = this Company
563
+ */
564
+ interface InverseSource {
565
+ type: "inverse";
566
+ /** Object name that has the relation to us */
567
+ object: string;
568
+ /** Relation attribute name on the source object that points to us */
569
+ attribute: string;
570
+ }
571
+ /**
572
+ * Where table data comes from — either a direct relation or an inverse lookup
573
+ */
574
+ type TableSource = RelationSource | InverseSource;
575
+ /**
576
+ * Table tab - displays related records in a table
577
+ *
578
+ * The `source` field determines where data comes from.
579
+ *
580
+ * @example Direct: source = { type: "relation", attribute: "members" }
581
+ * @example Inverse: source = { type: "inverse", object: "contacts", attribute: "company" }
582
+ */
583
+ interface TableTab extends BaseTab {
584
+ type: "table";
585
+ /** Where the data comes from */
586
+ source: TableSource;
587
+ /** Columns to display (attribute names from the resolved target object) */
588
+ columns: string[];
589
+ /**
590
+ * Traverse a 2nd-level relation to display nested data.
591
+ * When active, `columns` stores the 2nd-level object's attribute names.
592
+ *
593
+ * @example source.attribute = "members", through.attribute = "companies"
594
+ * → displays companies of each member
595
+ */
596
+ through?: {
597
+ /** Relation attribute on the first-level target object */
598
+ attribute: string;
599
+ /** Show _source and _target columns */
600
+ showSourceTarget?: boolean;
601
+ };
602
+ /** Allow creating new records */
603
+ allowCreate?: boolean;
604
+ /** Creation behavior when allowCreate is true. Default: "redirect" */
605
+ createMode?: CreateMode;
606
+ /** Allow inline editing */
607
+ allowEdit?: boolean;
608
+ /** Allow deleting records */
609
+ allowDelete?: boolean;
610
+ /** Default filters applied to the table */
611
+ filters?: FilterState;
612
+ /** Default sort rules */
613
+ sorts?: SortRule[];
614
+ }
615
+ /**
616
+ * Custom tab - renders a developer-defined component
617
+ */
618
+ interface CustomTab extends BaseTab {
619
+ type: "custom";
620
+ /** Component identifier to render */
621
+ component: string;
622
+ /** Props to pass to the component */
623
+ props?: Record<string, unknown>;
624
+ }
625
+ /**
626
+ * Activity tab - displays activity feed for the current record
627
+ */
628
+ interface ActivityTab extends BaseTab {
629
+ type: "activity";
630
+ limit?: number;
631
+ }
632
+ /**
633
+ * Richtext tab - displays a block editor for a richtext attribute
634
+ */
635
+ interface RichtextTab extends BaseTab {
636
+ type: "richtext";
637
+ /** Richtext attribute to display in the BlockEditor */
638
+ attribute: string;
639
+ /** Optional text attribute for an editable title input above the editor */
640
+ titleAttribute?: string;
641
+ }
642
+ /**
643
+ * Documents tab - displays all documents attached to the record
644
+ */
645
+ interface DocumentsTab extends BaseTab {
646
+ type: "documents";
647
+ allowUpload?: boolean;
648
+ allowRemove?: boolean;
649
+ hideAttachments?: boolean;
650
+ }
651
+ /**
652
+ * Forms tab - displays available forms for creating related records
653
+ */
654
+ interface FormsTab extends BaseTab {
655
+ type: "forms";
656
+ /** Object name to filter forms by slot (derived from record context, but can be overridden) */
657
+ objectName?: string;
658
+ }
659
+ /**
660
+ * Union of all tab types (for detail views)
661
+ */
662
+ type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | DocumentsTab | FormsTab;
663
+ /**
664
+ * Detail view layout mode
665
+ * - `page`: Full view with multiple tabs
666
+ * - `modal`: Simplified view for modals (single FormTab, no tabs UI)
667
+ */
668
+ type DetailViewLayout = "page" | "modal";
669
+ /**
670
+ * List view layout mode
671
+ * - `table`: Table/grid layout
672
+ * - `kanban`: Kanban board layout (grouped by attribute)
673
+ */
674
+ type ListViewLayout = "table" | "kanban";
675
+ /**
676
+ * Tab within a list view — each tab carries its own full display configuration.
677
+ *
678
+ * @example
679
+ * ```typescript
680
+ * const tabs: ListViewTab[] = [
681
+ * { id: "all", label: "All Contacts", default: true, layout: "table", columns: ["name", "email", "status"] },
682
+ * { id: "active", label: "Active", layout: "table", columns: ["name", "email"], filters: activeFilter },
683
+ * { id: "pipeline", label: "Pipeline", layout: "kanban", columns: ["name", "amount"], groupByAttribute: "stage" },
684
+ * ];
685
+ * ```
686
+ */
687
+ interface ListViewTab {
688
+ /** Unique identifier */
689
+ id: string;
690
+ /** Display label */
691
+ label: string;
692
+ /** Icon */
693
+ icon?: IconName;
694
+ /** Default tab (shown on load) */
695
+ default?: boolean;
696
+ /** Layout mode */
697
+ layout: ListViewLayout;
698
+ /** Attribute names to display as columns */
699
+ columns: string[];
700
+ /** Column widths in pixels */
701
+ columnSizing?: Record<string, number>;
702
+ /** Filters applied to this tab */
703
+ filters?: FilterGroup;
704
+ /** Sort rules for this tab */
705
+ sorts?: SortRule[];
706
+ /** Attribute to group by (required when layout is "kanban") */
707
+ groupByAttribute?: string;
708
+ /** When true, the tab is read-only: no cell editing, no create, no delete */
709
+ readOnly?: boolean;
710
+ /** Creation behavior when clicking "+". Default: "redirect" */
711
+ createMode?: CreateMode;
712
+ /** User attribute to display on kanban cards (bottom-left) */
713
+ cardUserAttribute?: string;
714
+ /** Date attribute to display on kanban cards (bottom-right) */
715
+ cardDateAttribute?: string;
716
+ /** Order of kanban columns (by option value) - for kanban layout only */
717
+ kanbanColumnOrder?: string[];
718
+ /** Visibility of kanban columns (by option value) - for kanban layout only */
719
+ kanbanColumnVisibility?: Record<string, boolean>;
720
+ /** Pinned kanban columns (by option value) - for kanban layout only */
721
+ kanbanPinnedColumns?: string[];
722
+ }
723
+ /**
724
+ * Configuration for the side panel displayed alongside tab content.
725
+ * When present, a right-side panel shows the configured attributes as flat fields.
726
+ */
727
+ interface SidePanelConfig {
728
+ /** Attribute names to display as flat fields in the panel */
729
+ attributes: string[];
730
+ /** Width in pixels. @default 320 */
731
+ width?: number;
732
+ }
733
+ /**
734
+ * Configuration for detail views (RecordEditView)
735
+ */
736
+ interface DetailViewConfig {
737
+ /** Layout mode */
738
+ layout: DetailViewLayout;
739
+ /** Tabs in this view */
740
+ tabs: Tab[];
741
+ /** Optional side panel with flat attribute fields (not available for modal layout) */
742
+ sidePanel?: SidePanelConfig;
743
+ }
744
+ /**
745
+ * Configuration for list views (RecordsView)
746
+ *
747
+ * Each tab carries its own full config (layout, columns, filters, sorts, groupBy).
748
+ * The view only holds shared base filters applied to ALL tabs.
749
+ */
750
+ interface ListViewConfig {
751
+ /** Base filters applied to ALL tabs (scoping, tenant, etc.) */
752
+ defaultFilters?: FilterGroup;
753
+ /** Tabs — at least one required. Each carries its own full config. */
754
+ tabs: ListViewTab[];
755
+ }
756
+ /**
757
+ * Union of all view configs
758
+ */
759
+ type ViewConfig = DetailViewConfig | ListViewConfig;
760
+ /**
761
+ * Base view properties shared by all view types
762
+ */
763
+ interface BaseViewDefinition {
764
+ /** Unique identifier (UUID, assigned by database) */
765
+ id?: string;
766
+ /** Technical name (kebab-case) */
767
+ name: string;
768
+ /** Display label */
769
+ label: string;
770
+ /** Description */
771
+ description?: string;
772
+ /** Icon */
773
+ icon?: IconName;
774
+ /** Object this view belongs to (object name) */
775
+ object: string;
776
+ /** Default view for this object+type combination */
777
+ default?: boolean;
778
+ /** Extensible metadata */
779
+ metadata?: Record<string, unknown>;
780
+ /** Current schema version of this view definition */
781
+ schema_version: number;
782
+ }
783
+ /**
784
+ * Detail view definition
785
+ */
786
+ interface DetailViewDefinition extends BaseViewDefinition {
787
+ type: "detail";
788
+ config: DetailViewConfig;
789
+ }
790
+ /**
791
+ * List view definition
792
+ */
793
+ interface ListViewDefinition extends BaseViewDefinition {
794
+ type: "list";
795
+ config: ListViewConfig;
796
+ }
797
+ /**
798
+ * Unified view definition - discriminated union by type
799
+ */
800
+ type ViewDefinition = DetailViewDefinition | ListViewDefinition;
801
+ /**
802
+ * Configuration overrides for user customizations
803
+ * Only stores the delta from the source view
804
+ */
805
+ interface ConfigOverrides {
806
+ tabs?: ListViewTab[];
807
+ hiddenTabIds?: string[];
808
+ detailTabs?: Tab[];
809
+ hiddenDetailTabIds?: string[];
810
+ }
811
+ /**
812
+ * User customization overlay for a view
813
+ * Stored per user, merged at runtime with the source view
814
+ */
815
+ interface ViewOverlay {
816
+ /** Unique identifier */
817
+ id: string;
818
+ /** View ID this overlay applies to (UUID or virtual ID) */
819
+ viewId: string;
820
+ /** User ID who owns this overlay */
821
+ userId: string;
822
+ /** Configuration overrides (delta only) */
823
+ configOverrides: ConfigOverrides;
824
+ /** User's default view for this object (stored in overlay) */
825
+ isUserDefault?: boolean;
826
+ /** Created timestamp */
827
+ createdAt: Date;
828
+ /** Updated timestamp */
829
+ updatedAt: Date;
830
+ }
831
+ /**
832
+ * Check if a view is a detail view
833
+ */
834
+ declare function isDetailView(view: ViewDefinition): view is DetailViewDefinition;
835
+ /**
836
+ * Check if a view is a list view
837
+ */
838
+ declare function isListView(view: ViewDefinition): view is ListViewDefinition;
839
+ /**
840
+ * Check if a group is a field group (default type)
841
+ */
842
+ declare function isFieldGroup(group: Group): group is FieldGroup;
843
+ /**
844
+ * Check if a group is a relation group
845
+ */
846
+ declare function isRelationGroup(group: Group): group is RelationGroup;
847
+
192
848
  /**
193
849
  * Object as stored in database (metadata)
194
850
  */
@@ -344,13 +1000,6 @@ interface SearchOptions extends ListOptions {
344
1000
  * Ignored if the search adapter has no embedder configured.
345
1001
  */
346
1002
  semanticRatio?: number;
347
- /**
348
- * When set, restrict results to records whose `id` is in this list.
349
- * `null` means "no constraint" (same as omitted). Used by callers that want
350
- * to intersect search results with a precomputed allow-list (e.g. derived
351
- * elsewhere in the application).
352
- */
353
- constrainToIds?: string[] | null;
354
1003
  /**
355
1004
  * Controls which records are returned based on soft-delete state.
356
1005
  * Defaults to `liveOnly` when omitted.
@@ -1121,7 +1770,7 @@ declare const IDENTITY_PROPERTIES: readonly ["name", "type"];
1121
1770
  * Behavior properties - Protected for system attributes
1122
1771
  * These affect business logic and data integrity.
1123
1772
  */
1124
- declare const BEHAVIOR_PROPERTIES: readonly ["required", "disabled", "hidden", "archived", "deprecated", "defaultValue", "config", "order", "unique"];
1773
+ declare const BEHAVIOR_PROPERTIES: readonly ["required", "hidden", "archived", "deprecated", "defaultValue", "config", "order", "unique"];
1125
1774
  /**
1126
1775
  * Presentation properties - Always modifiable
1127
1776
  * These only affect display, not logic.
@@ -1276,7 +1925,6 @@ interface FieldHistoryEntry {
1276
1925
  type AgentRunStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "paused";
1277
1926
  type AgentSessionStatus = "active" | "idle" | "completed" | "failed" | "cancelled" | "waiting_human" | "timeout" | "expired";
1278
1927
  type AgentSessionMode = "interactive" | "autonomous";
1279
- type QuestionStatus = "pending" | "answered" | "timeout" | "cancelled";
1280
1928
  type TriggerEventType = "record.created" | "record.updated" | "record.deleted" | "form.submitted" | "agent.completed" | "webhook" | "schedule";
1281
1929
  type AgentTriggerType = Extract<TriggerEventType, "record.created" | "record.updated" | "record.deleted">;
1282
1930
  type ProviderName = "anthropic" | "openai" | "google" | "mistral";
@@ -1360,11 +2008,6 @@ interface AgentMessageAttachment {
1360
2008
  mimeType: string;
1361
2009
  size: number;
1362
2010
  }
1363
- interface TimeoutPolicy {
1364
- timeoutMs: number;
1365
- action: "cancel" | "auto_decide" | "escalate";
1366
- fallbackValue?: unknown;
1367
- }
1368
2011
  interface AgentDefinition {
1369
2012
  id: string;
1370
2013
  tenantId: string;
@@ -1516,36 +2159,6 @@ interface AgentToolCall {
1516
2159
  error?: string;
1517
2160
  durationMs?: number;
1518
2161
  }
1519
- interface AgentContextEntry {
1520
- id: string;
1521
- rootRunId: string;
1522
- runId: string;
1523
- namespace: string;
1524
- key: string;
1525
- value: unknown;
1526
- createdAt: Date;
1527
- updatedAt: Date;
1528
- }
1529
- interface AgentQuestion {
1530
- id: string;
1531
- runId: string;
1532
- sessionId?: string;
1533
- tenantId: string;
1534
- question: string;
1535
- options?: string[];
1536
- metadata?: Record<string, unknown>;
1537
- status: QuestionStatus;
1538
- response?: QuestionResponse;
1539
- timeoutPolicy?: TimeoutPolicy;
1540
- createdAt: Date;
1541
- answeredAt?: Date;
1542
- expiresAt?: Date;
1543
- }
1544
- interface QuestionResponse {
1545
- answer: unknown;
1546
- answeredBy?: string;
1547
- source: "user" | "auto_decide" | "timeout";
1548
- }
1549
2162
  interface RecordAgentEvent {
1550
2163
  type: AgentTriggerType;
1551
2164
  objectId: string;
@@ -1615,6 +2228,8 @@ interface AIAvailableModel {
1615
2228
  };
1616
2229
  /** If true, this model is used for generating compaction summaries */
1617
2230
  isCompactionModel?: boolean;
2231
+ /** If true, this model is used for fast utility generations (regex, formula, …) */
2232
+ isUtilityModel?: boolean;
1618
2233
  }
1619
2234
  /**
1620
2235
  * Tool call status during execution
@@ -1892,6 +2507,84 @@ interface AICompactionSummary {
1892
2507
  compactedAt: Date;
1893
2508
  }
1894
2509
 
2510
+ type AttributeLike = Pick<Attribute, "type"> & Partial<Attribute>;
2511
+ type AttributeLifecycleCapabilities = {
2512
+ active: boolean;
2513
+ deprecated: boolean;
2514
+ visibleInArchitect: boolean;
2515
+ visibleInRuntime: boolean;
2516
+ warningWhenDeprecated: boolean;
2517
+ };
2518
+ type AttributeStorageMode = "value" | "edge" | "computed";
2519
+ type AttributeCardinality = "one" | "many";
2520
+ type AttributePolymorphicCapability = "none" | "code-only" | "internal";
2521
+ type AttributeStorageCapabilities = {
2522
+ mode: AttributeStorageMode;
2523
+ cardinality: AttributeCardinality;
2524
+ edgeBacked: boolean;
2525
+ preservesExistingValues: boolean;
2526
+ qualifiedProperties: boolean;
2527
+ polymorphic: AttributePolymorphicCapability;
2528
+ maxItems: boolean;
2529
+ };
2530
+ type AttributeRequiredCapability = "allowed" | "forbidden";
2531
+ type AttributeDefaultValueCapability = "static" | "automatic" | "forbidden";
2532
+ type AttributeAuthoringCapabilities = {
2533
+ editable: boolean;
2534
+ readOnly: boolean;
2535
+ directEdit: boolean;
2536
+ required: AttributeRequiredCapability;
2537
+ defaultValue: AttributeDefaultValueCapability;
2538
+ placeholder: boolean;
2539
+ maxItems: boolean;
2540
+ };
2541
+ type AttributePresentationCapabilities = {
2542
+ formField: boolean;
2543
+ tableCell: boolean;
2544
+ defaultColumn: boolean;
2545
+ compactDisplay: boolean;
2546
+ popoverEditor: boolean;
2547
+ placeholder: boolean;
2548
+ warningWhenDeprecated: boolean;
2549
+ };
2550
+ type AttributeQueryCapabilities = {
2551
+ filterable: boolean;
2552
+ searchable: boolean;
2553
+ sortable: boolean;
2554
+ groupable: boolean;
2555
+ kanbanGroupable: boolean;
2556
+ operators: readonly FilterOperator[];
2557
+ };
2558
+ type AttributeAgentCapabilities = {
2559
+ readable: boolean;
2560
+ writable: boolean;
2561
+ compactReadable: boolean;
2562
+ contentReadable: boolean;
2563
+ requiresDedicatedTool: boolean;
2564
+ };
2565
+ type AttributeExchangeCapabilities = {
2566
+ importable: boolean;
2567
+ exportable: boolean;
2568
+ schemaExportable: boolean;
2569
+ metadataExportable: boolean;
2570
+ };
2571
+ type AttributeCapabilities = {
2572
+ lifecycle: AttributeLifecycleCapabilities;
2573
+ storage: AttributeStorageCapabilities;
2574
+ authoring: AttributeAuthoringCapabilities;
2575
+ presentation: AttributePresentationCapabilities;
2576
+ query: AttributeQueryCapabilities;
2577
+ agent: AttributeAgentCapabilities;
2578
+ exchange: AttributeExchangeCapabilities;
2579
+ };
2580
+ declare const ATTRIBUTE_FILTER_OPERATORS: Readonly<Record<Exclude<AttributeType, "rollup">, readonly FilterOperator[]>>;
2581
+ declare function getAttributeCapabilities(attribute: AttributeLike): AttributeCapabilities;
2582
+ declare function getAttributeFilterOperators(attribute: AttributeLike): readonly FilterOperator[];
2583
+ declare function isAttributeFilterable(attribute: AttributeLike): boolean;
2584
+ declare function isAttributeSearchable(attribute: AttributeLike): boolean;
2585
+ declare function isAttributeGroupable(attribute: AttributeLike): boolean;
2586
+ declare function isAttributeKanbanGroupable(attribute: AttributeLike): boolean;
2587
+
1895
2588
  /**
1896
2589
  * Common configuration for all builders (Objects & Attributes)
1897
2590
  */
@@ -2299,6 +2992,156 @@ declare function isObjectReferencedError(error: unknown): error is ObjectReferen
2299
2992
  */
2300
2993
  declare function getErrorMessage(error: unknown): string;
2301
2994
 
2995
+ /**
2996
+ * Feature flag levels (resolution priority: user > tenant > global).
2997
+ *
2998
+ * - `global`: Applies to all tenants and users
2999
+ * - `tenant`: Applies to a specific tenant
3000
+ * - `user`: Applies to a specific user within a tenant
3001
+ */
3002
+ type FlagLevel = "global" | "tenant" | "user";
3003
+ /**
3004
+ * Flag value types supported by the system.
3005
+ */
3006
+ type FlagValueType = "boolean" | "string" | "number" | "json";
3007
+ /**
3008
+ * Definition of a feature flag.
3009
+ * Created using the flag builders (booleanFlag, stringFlag, etc.)
3010
+ */
3011
+ interface FeatureFlagDefinition<T = unknown> {
3012
+ /** Unique identifier for the flag (kebab-case) */
3013
+ name: string;
3014
+ /** Human-readable label */
3015
+ label: string;
3016
+ /** Optional description */
3017
+ description?: string;
3018
+ /** Type of the flag value */
3019
+ valueType: FlagValueType;
3020
+ /** Default value when no override exists */
3021
+ defaultValue: T;
3022
+ /** Levels at which this flag can be overridden */
3023
+ allowedLevels: FlagLevel[];
3024
+ /** Grouping category for UI */
3025
+ category?: string;
3026
+ /** System flag - cannot be modified via API */
3027
+ system?: boolean;
3028
+ }
3029
+ /**
3030
+ * Stored override for a feature flag.
3031
+ * Represents a row in the feature_flag_overrides table.
3032
+ */
3033
+ interface FlagOverride<T = unknown> {
3034
+ /** Name of the flag being overridden */
3035
+ flagName: string;
3036
+ /** Level of the override */
3037
+ level: FlagLevel;
3038
+ /** Target ID (tenantId for tenant-level, userId for user-level) */
3039
+ targetId?: string;
3040
+ /** Override value */
3041
+ value: T;
3042
+ /** Optional expiration date */
3043
+ expiresAt?: Date;
3044
+ /** Who created this override */
3045
+ createdBy?: string;
3046
+ /** When the override was created */
3047
+ createdAt: Date;
3048
+ /** When the override was last updated */
3049
+ updatedAt: Date;
3050
+ }
3051
+ /**
3052
+ * Resolved flag value with source information.
3053
+ * Result of flag resolution including where the value came from.
3054
+ */
3055
+ interface ResolvedFlag<T = unknown> {
3056
+ /** Flag name */
3057
+ name: string;
3058
+ /** Resolved value */
3059
+ value: T;
3060
+ /** Where the value came from */
3061
+ source: FlagLevel | "default";
3062
+ /** ID of the source (tenantId or userId) if not default */
3063
+ sourceId?: string;
3064
+ }
3065
+ /**
3066
+ * Feature gate configuration for conditional feature visibility.
3067
+ */
3068
+ interface FeatureGate {
3069
+ /** Name of the flag to check */
3070
+ flag: string;
3071
+ /**
3072
+ * Expected value for the gate to pass.
3073
+ * For boolean flags, defaults to `true`.
3074
+ * For other types, compares with strict equality.
3075
+ */
3076
+ expectedValue?: unknown;
3077
+ /**
3078
+ * Behavior when the gate fails.
3079
+ * - `hide`: The gated feature is completely hidden (default)
3080
+ * - `show`: The gated feature is shown regardless (no gating)
3081
+ * - `disable`: The gated feature is visible but read-only
3082
+ */
3083
+ fallback?: "hide" | "show" | "disable";
3084
+ }
3085
+ /**
3086
+ * Repository interface for feature flag overrides storage.
3087
+ * Added to DatabaseAdapter as an optional repository.
3088
+ *
3089
+ * If not provided, only static defaults from module config are used.
3090
+ */
3091
+ interface FeatureFlagsRepository {
3092
+ /**
3093
+ * Get all overrides matching the criteria.
3094
+ * Returns overrides from the database (global, tenant, or user level).
3095
+ */
3096
+ getOverrides(options: {
3097
+ /** Filter by level */
3098
+ level?: FlagLevel;
3099
+ /** Filter by target ID (tenantId or userId) */
3100
+ targetId?: string;
3101
+ /** Filter by flag names (for efficient single/batch lookups) */
3102
+ flagNames?: string[];
3103
+ }): Promise<FlagOverride[]>;
3104
+ /**
3105
+ * Create or update an override.
3106
+ * Uses upsert semantics based on (flagName, level, targetId).
3107
+ */
3108
+ setOverride(override: Omit<FlagOverride, "createdAt" | "updatedAt">): Promise<FlagOverride>;
3109
+ /**
3110
+ * Delete an override.
3111
+ */
3112
+ deleteOverride(flagName: string, level: FlagLevel, targetId?: string): Promise<void>;
3113
+ }
3114
+ /**
3115
+ * Static flag default value for module configuration.
3116
+ */
3117
+ interface StaticFlagDefault {
3118
+ /** Flag name */
3119
+ name: string;
3120
+ /** Default value */
3121
+ value: unknown;
3122
+ }
3123
+ /**
3124
+ * Feature flags configuration for SchemaModule.
3125
+ */
3126
+ interface FeatureFlagsConfig {
3127
+ /**
3128
+ * Static default values for flags.
3129
+ * These are always applied and used when no database override exists.
3130
+ *
3131
+ * @example
3132
+ * ```typescript
3133
+ * featureFlags: {
3134
+ * defaults: [
3135
+ * { name: "architect-mode", value: false },
3136
+ * { name: "ai-chat", value: false },
3137
+ * { name: "tier", value: "free" },
3138
+ * ],
3139
+ * }
3140
+ * ```
3141
+ */
3142
+ defaults?: StaticFlagDefault[];
3143
+ }
3144
+
2302
3145
  declare const FORM_FORBIDDEN_ATTRIBUTE_TYPES: readonly ["relation", "multiRelation", "formula", "rollup", "file", "document", "richtext", "user"];
2303
3146
  interface FormSlotFieldRef {
2304
3147
  type: "slot";
@@ -2607,7 +3450,6 @@ declare class NoopGeocodingAdapter implements GeocodingAdapter {
2607
3450
  */
2608
3451
  type AttributeValueMap = {
2609
3452
  text: string;
2610
- textarea: string;
2611
3453
  /** Semantic markdown string (parsed at runtime to TiptapDocument) */
2612
3454
  richtext: string;
2613
3455
  number: number;
@@ -2620,7 +3462,6 @@ type AttributeValueMap = {
2620
3462
  file: string;
2621
3463
  user: string;
2622
3464
  relation: string;
2623
- rating: number;
2624
3465
  /** Document IDs — always an array (documents are always-multi by construction). */
2625
3466
  document: string[];
2626
3467
  };
@@ -2652,6 +3493,43 @@ type InferMultiselectValue<A extends MultiselectAttribute> = A["options"] extend
2652
3493
  interface QualifiedDocumentBrand<TProps extends Record<string, unknown>> {
2653
3494
  readonly __qualifiedDocumentProps: TProps;
2654
3495
  }
3496
+ /**
3497
+ * Public, nominally-named return type for `DocumentAttributeBuilder.qualifyWith()`.
3498
+ *
3499
+ * Exposes only the inference surface (`_types`, `$infer`) plus `build()`. The concrete
3500
+ * builder class has `protected` members (`attr`, `setRequired`, …) that TypeScript cannot
3501
+ * emit when a consumer's exported object definition carries a qualified document under
3502
+ * `declaration: true` — it inlines the class as an anonymous type and fails with TS4094.
3503
+ * Returning this named interface keeps the type emittable while preserving full record
3504
+ * inference (`.attribute()` reads `_types`, `.build()` is invoked at runtime).
3505
+ */
3506
+ interface QualifiedDocumentAttributeBuilder<TName extends string, TProps extends Record<string, unknown>, TRequired extends boolean = false> {
3507
+ readonly _types: {
3508
+ name: TName;
3509
+ attribute: DocumentAttribute & QualifiedDocumentBrand<TProps>;
3510
+ required: TRequired;
3511
+ };
3512
+ readonly $infer: {
3513
+ value: Array<{
3514
+ id: string;
3515
+ props: TProps;
3516
+ }>;
3517
+ definition: DocumentAttribute;
3518
+ };
3519
+ build(): DocumentAttribute;
3520
+ }
3521
+ /**
3522
+ * Forces eager materialization of a computed type into a concrete object shape.
3523
+ *
3524
+ * Without this, a type alias application like `InferQualifiedProps<[DateBuilder, …]>`
3525
+ * is kept deferred in emitted `.d.ts` files, dragging the (non-exported) builder
3526
+ * classes into a consumer's declaration output and triggering TS4094. Resolving it
3527
+ * to a plain `{ key: value }` object removes any reference to the builders. The
3528
+ * mapped type is homomorphic, so optional/readonly modifiers are preserved.
3529
+ */
3530
+ type Eager<T> = T extends infer U ? {
3531
+ [K in keyof U]: U[K];
3532
+ } : never;
2655
3533
  /**
2656
3534
  * @internal — used by DocumentAttributeBuilder.qualifyWith().
2657
3535
  *
@@ -3107,6 +3985,54 @@ interface InviteUserInput {
3107
3985
  redirectTo?: string;
3108
3986
  }
3109
3987
 
3988
+ /**
3989
+ * Contracts for the AI generation module (regex, formula, …).
3990
+ * Client-safe: no prompts or server logic here.
3991
+ */
3992
+ /** Supported generator types in V1. */
3993
+ type AIGenerationType = "regex" | "formula";
3994
+ /** Request payload for a regex generation. */
3995
+ interface RegexGenerationInput {
3996
+ /** Natural-language description of what to validate. */
3997
+ description: string;
3998
+ /** Optional label of the field, used as extra context. */
3999
+ fieldLabel?: string;
4000
+ }
4001
+ /** A single attribute the formula generator is allowed to reference. */
4002
+ interface FormulaGenerationAttribute {
4003
+ id: string;
4004
+ name: string;
4005
+ type: string;
4006
+ }
4007
+ /** Request payload for a formula generation. */
4008
+ interface FormulaGenerationInput {
4009
+ /** Natural-language description of the formula. */
4010
+ description: string;
4011
+ /** Attributes the expression may reference (by name). */
4012
+ attributes: FormulaGenerationAttribute[];
4013
+ /** Expected return type of the formula (scalar types only). */
4014
+ returnType: "text" | "number" | "boolean" | "date";
4015
+ }
4016
+ /** Map from generator type to its input payload. */
4017
+ interface AIGenerationInputMap {
4018
+ regex: RegexGenerationInput;
4019
+ formula: FormulaGenerationInput;
4020
+ }
4021
+ /** Token usage returned to the caller (mirrors AI SDK usage). */
4022
+ interface AIGenerationUsage {
4023
+ inputTokens: number;
4024
+ outputTokens: number;
4025
+ }
4026
+ /** Result of a successful generation. */
4027
+ interface AIGenerationResult {
4028
+ /** The final value to apply (the regex pattern / the formula expression). */
4029
+ value: string;
4030
+ /** Plain-language explanation of what was generated. */
4031
+ explanation?: string;
4032
+ /** Token usage for the whole request (sum across repair attempts). */
4033
+ usage: AIGenerationUsage;
4034
+ }
4035
+
3110
4036
  interface AddAttributeInput {
3111
4037
  name: string;
3112
4038
  label: string;
@@ -3258,7 +4184,7 @@ declare function validateSlotAgainstConfig(slotName: string, mimeType: string, s
3258
4184
  * The set of attribute types allowed as relation/document properties.
3259
4185
  * This is the complement of the internal FORBIDDEN_PROPERTY_TYPES list.
3260
4186
  */
3261
- declare const ALLOWED_PROPERTY_TYPES: readonly ["text", "textarea", "number", "checkbox", "date", "phone", "currency", "status", "select", "multiselect", "rating", "location"];
4187
+ declare const ALLOWED_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "status", "select", "multiselect", "location"];
3262
4188
  interface BuilderLike {
3263
4189
  build(): {
3264
4190
  type: string;
@@ -3537,7 +4463,6 @@ declare abstract class BaseAttributeBuilder<TAttr extends Attribute> implements
3537
4463
  * - Will be picked up by `standards diff` as runtime drift
3538
4464
  */
3539
4465
  runtime(): this;
3540
- disabled(): this;
3541
4466
  hidden(): this;
3542
4467
  placeholder(value: string): this;
3543
4468
  description(value: string): this;
@@ -3545,28 +4470,6 @@ declare abstract class BaseAttributeBuilder<TAttr extends Attribute> implements
3545
4470
  order(value: number): this;
3546
4471
  defaultValue(value: "defaultValue" extends keyof TAttr ? TAttr["defaultValue"] : never): this;
3547
4472
  metadata(value: Record<string, unknown>): this;
3548
- /**
3549
- * Add a feature gate to conditionally show/hide/disable this attribute.
3550
- *
3551
- * @param flagName - Name of the feature flag to check
3552
- * @param options - Optional configuration for expected value and fallback behavior
3553
- *
3554
- * @example Hide attribute when flag is disabled
3555
- * ```typescript
3556
- * text({ name: "aiSummary", label: "AI Summary" })
3557
- * .featureGate("ai-features")
3558
- * ```
3559
- *
3560
- * @example Disable attribute when tier is not enterprise
3561
- * ```typescript
3562
- * text({ name: "advancedField", label: "Advanced Field" })
3563
- * .featureGate("tier", { expectedValue: "enterprise", fallback: "disable" })
3564
- * ```
3565
- */
3566
- featureGate(flagName: string, options?: {
3567
- expectedValue?: unknown;
3568
- fallback?: FeatureGate["fallback"];
3569
- }): this;
3570
4473
  build(): TAttr;
3571
4474
  }
3572
4475
  declare class TextAttributeBuilder<TName extends string, TRequired extends boolean = false> extends BaseAttributeBuilder<TextAttribute> {
@@ -3601,6 +4504,7 @@ declare class TextAttributeBuilder<TName extends string, TRequired extends boole
3601
4504
  minLength(value: number): this;
3602
4505
  maxLength(value: number): this;
3603
4506
  pattern(value: string): this;
4507
+ multiline(value?: boolean): this;
3604
4508
  required(): TextAttributeBuilder<TName, true>;
3605
4509
  optional(): TextAttributeBuilder<TName, false>;
3606
4510
  /**
@@ -3617,30 +4521,6 @@ declare class TextAttributeBuilder<TName extends string, TRequired extends boole
3617
4521
  slug(): this;
3618
4522
  }
3619
4523
  declare function text<TName extends string>(config: TypedBuilderConfig<TName>): TextAttributeBuilder<TName, false>;
3620
- declare class TextAreaAttributeBuilder<TName extends string, TRequired extends boolean = false> extends BaseAttributeBuilder<TextAreaAttribute> {
3621
- /**
3622
- * Phantom type for inference
3623
- */
3624
- readonly _types: {
3625
- name: TName;
3626
- attribute: TextAreaAttribute;
3627
- required: TRequired;
3628
- };
3629
- /**
3630
- * Drizzle-style static type inference property.
3631
- * @see TextAttributeBuilder.$infer for documentation
3632
- */
3633
- readonly $infer: {
3634
- /** The runtime value type for this attribute */
3635
- value: string;
3636
- /** The full attribute definition type */
3637
- definition: TextAreaAttribute;
3638
- };
3639
- constructor(name: TName, label: string);
3640
- required(): TextAreaAttributeBuilder<TName, true>;
3641
- optional(): TextAreaAttributeBuilder<TName, false>;
3642
- }
3643
- declare function textarea<TName extends string>(config: TypedBuilderConfig<TName>): TextAreaAttributeBuilder<TName, false>;
3644
4524
  /**
3645
4525
  * Builder for richtext attributes (Tiptap editor)
3646
4526
  */
@@ -3661,19 +4541,6 @@ declare class RichtextAttributeBuilder<TName extends string, TRequired extends b
3661
4541
  definition: RichtextAttribute;
3662
4542
  };
3663
4543
  constructor(name: TName, label: string);
3664
- /**
3665
- * Set enabled features for the richtext editor
3666
- * If not called, all features are enabled by default
3667
- *
3668
- * @param list - Array of features to enable
3669
- *
3670
- * @example
3671
- * ```typescript
3672
- * richtext({ name: "content", label: "Content" })
3673
- * .features(["headings", "bold", "italic", "lists", "links"])
3674
- * ```
3675
- */
3676
- features(list: RichtextFeature[]): this;
3677
4544
  required(): RichtextAttributeBuilder<TName, true>;
3678
4545
  optional(): RichtextAttributeBuilder<TName, false>;
3679
4546
  }
@@ -3685,20 +4552,6 @@ declare class RichtextAttributeBuilder<TName extends string, TRequired extends b
3685
4552
  * richtext({ name: "content", label: "Content" })
3686
4553
  * .required()
3687
4554
  * ```
3688
- *
3689
- * @example With specific features
3690
- * ```typescript
3691
- * richtext({ name: "description", label: "Description" })
3692
- * .features(["headings", "bold", "italic", "lists", "links"])
3693
- * .placeholder("Write something...")
3694
- * ```
3695
- *
3696
- * @example Full-featured (notes, articles)
3697
- * ```typescript
3698
- * richtext({ name: "body", label: "Body" })
3699
- * .features(["headings", "bold", "italic", "lists", "links", "images", "codeBlocks", "tables"])
3700
- * .required()
3701
- * ```
3702
4555
  */
3703
4556
  declare function richtext<TName extends string>(config: TypedBuilderConfig<TName>): RichtextAttributeBuilder<TName, false>;
3704
4557
  declare class NumberAttributeBuilder<TName extends string, TRequired extends boolean = false> extends BaseAttributeBuilder<NumberAttribute> {
@@ -3723,6 +4576,7 @@ declare class NumberAttributeBuilder<TName extends string, TRequired extends boo
3723
4576
  integer(): this;
3724
4577
  decimal(decimals?: number): this;
3725
4578
  percentage(): this;
4579
+ renderAs(value: "number" | "rating"): this;
3726
4580
  required(): NumberAttributeBuilder<TName, true>;
3727
4581
  optional(): NumberAttributeBuilder<TName, false>;
3728
4582
  }
@@ -3926,11 +4780,8 @@ declare class LocationAttributeBuilder<TName extends string, TRequired extends b
3926
4780
  };
3927
4781
  constructor(name: TName, label: string);
3928
4782
  granularity(value: LocationAttribute["granularity"]): this;
3929
- enableAutocomplete(): this;
3930
- enableMap(): this;
3931
4783
  defaultCountry(value: CountryIso3): this;
3932
4784
  allowedCountries(value: CountryIso3[]): this;
3933
- displayFormat(value: LocationAttribute["displayFormat"]): this;
3934
4785
  required(): LocationAttributeBuilder<TName, true>;
3935
4786
  optional(): LocationAttributeBuilder<TName, false>;
3936
4787
  }
@@ -3980,7 +4831,7 @@ declare class UserAttributeBuilder<TName extends string, TRequired extends boole
3980
4831
  definition: UserAttribute;
3981
4832
  };
3982
4833
  constructor(name: TName, label: string);
3983
- allowedRoles(roles: string[]): this;
4834
+ types(types: UserReferenceType[]): this;
3984
4835
  /**
3985
4836
  * Allow multiple users to be selected
3986
4837
  */
@@ -4009,7 +4860,7 @@ interface RelationBuilderInitOptions {
4009
4860
  * Union of attribute builders allowed as qualified relation properties.
4010
4861
  * Matches PropertyType — excludes complex types (formula, rollup, relation, etc.)
4011
4862
  */
4012
- type PropertyAttributeBuilder = TextAttributeBuilder<string, boolean> | TextAreaAttributeBuilder<string, boolean> | NumberAttributeBuilder<string, boolean> | CheckboxAttributeBuilder<string, boolean> | DateAttributeBuilder<string, boolean> | PhoneAttributeBuilder<string, boolean> | CurrencyAttributeBuilder<string, boolean> | StatusAttributeBuilder<string, readonly Option[], boolean> | SelectAttributeBuilder<string, readonly Option[], boolean> | MultiselectAttributeBuilder<string, readonly Option[], boolean> | RatingAttributeBuilder<string, boolean> | LocationAttributeBuilder<string, boolean>;
4863
+ type PropertyAttributeBuilder = TextAttributeBuilder<string, boolean> | NumberAttributeBuilder<string, boolean> | CheckboxAttributeBuilder<string, boolean> | DateAttributeBuilder<string, boolean> | PhoneAttributeBuilder<string, boolean> | CurrencyAttributeBuilder<string, boolean> | StatusAttributeBuilder<string, readonly Option[], boolean> | SelectAttributeBuilder<string, readonly Option[], boolean> | MultiselectAttributeBuilder<string, readonly Option[], boolean> | LocationAttributeBuilder<string, boolean>;
4013
4864
  /**
4014
4865
  * Base builder for relation attributes (single and multi).
4015
4866
  * Carries shared methods: to(), toAny(), qualifyWith(), bilateral()
@@ -4094,10 +4945,6 @@ declare class MultiRelationAttributeBuilder<TName extends string, TRequired exte
4094
4945
  definition: MultiRelationAttribute;
4095
4946
  };
4096
4947
  constructor(name: TName, label: string, initOptions?: RelationBuilderInitOptions);
4097
- /**
4098
- * Set minimum number of relations required
4099
- */
4100
- minItems(count: number): this;
4101
4948
  /**
4102
4949
  * Set maximum number of relations allowed
4103
4950
  */
@@ -4134,29 +4981,6 @@ declare class MultiRelationAttributeBuilder<TName extends string, TRequired exte
4134
4981
  * ```
4135
4982
  */
4136
4983
  declare function relation<TName extends string>(config: TypedBuilderConfig<TName>): SingleRelationAttributeBuilder<TName, false>;
4137
- declare class RatingAttributeBuilder<TName extends string, TRequired extends boolean = false> extends BaseAttributeBuilder<RatingAttribute> {
4138
- readonly _types: {
4139
- name: TName;
4140
- attribute: RatingAttribute;
4141
- required: TRequired;
4142
- };
4143
- /**
4144
- * Drizzle-style static type inference property.
4145
- * @see TextAttributeBuilder.$infer for documentation
4146
- */
4147
- readonly $infer: {
4148
- /** The runtime value type for this attribute */
4149
- value: number;
4150
- /** The full attribute definition type */
4151
- definition: RatingAttribute;
4152
- };
4153
- constructor(name: TName, label: string);
4154
- max(value: number): this;
4155
- iconType(value: RatingAttribute["iconType"]): this;
4156
- required(): RatingAttributeBuilder<TName, true>;
4157
- optional(): RatingAttributeBuilder<TName, false>;
4158
- }
4159
- declare function rating<TName extends string>(config: TypedBuilderConfig<TName>): RatingAttributeBuilder<TName, false>;
4160
4984
  /**
4161
4985
  * Builder for formula attributes (computed values)
4162
4986
  *
@@ -4303,8 +5127,8 @@ declare class RollupAttributeBuilder<TName extends string> extends BaseAttribute
4303
5127
  * .using("original")
4304
5128
  * .targetType("status")
4305
5129
  * .targetOptions([
4306
- * { id: "active", label: "Active", value: "active", color: "green" },
4307
- * { id: "inactive", label: "Inactive", value: "inactive", color: "red" }
5130
+ * { label: "Active", value: "active", color: "green" },
5131
+ * { label: "Inactive", value: "inactive", color: "red" }
4308
5132
  * ])
4309
5133
  * ```
4310
5134
  */
@@ -4320,8 +5144,7 @@ declare function rollup<TName extends string>(config: TypedBuilderConfig<TName>)
4320
5144
  * @example
4321
5145
  * ```typescript
4322
5146
  * document({ name: "contracts", label: "Contrats" })
4323
- * .autoProcess()
4324
- * .maxDocuments(10)
5147
+ * .slots([{ name: "signed", label: "Signed contract" }])
4325
5148
  * ```
4326
5149
  */
4327
5150
  declare class DocumentAttributeBuilder<TName extends string, TRequired extends boolean = false, TProps extends Record<string, unknown> = never> extends BaseAttributeBuilder<DocumentAttribute> {
@@ -4344,40 +5167,11 @@ declare class DocumentAttributeBuilder<TName extends string, TRequired extends b
4344
5167
  definition: DocumentAttribute;
4345
5168
  };
4346
5169
  constructor(name: TName, label: string);
4347
- /**
4348
- * Maximum number of documents.
4349
- */
4350
- maxDocuments(count: number): this;
4351
- /**
4352
- * Automatically trigger agent-compatible processing on upload.
4353
- */
4354
- autoProcess(): this;
4355
5170
  /**
4356
5171
  * Define named upload slots for this document attribute.
4357
5172
  * An empty array falls back to a single default slot.
4358
5173
  */
4359
5174
  slots(configs: DocumentSlotConfig[]): this;
4360
- /**
4361
- * Add a child attribute that qualifies the record→document edge.
4362
- *
4363
- * Equivalent to `.qualifyWith(builder)` for a single attribute, with the
4364
- * difference that the accepted type is broader (`Attribute`) and the
4365
- * accumulation is mutating rather than type-tracking. When the produced
4366
- * attribute is one of the `ALLOWED_PROPERTY_TYPES`, it is also pushed
4367
- * onto `attribute.properties.definitions`, so hydration and validation
4368
- * treat the document as qualified — same effect as `.qualifyWith()`.
4369
- *
4370
- * Both `attribute.attributes` and `attribute.properties` are populated to
4371
- * keep backwards compatibility with consumers that read either field.
4372
- *
4373
- * @example
4374
- * document({ name: "invoices" })
4375
- * .attribute(date({ name: "invoiceDate", label: "Date" }).required())
4376
- * .attribute(select({ name: "status", label: "Statut" }).options([...]))
4377
- */
4378
- attribute<TAttr extends Attribute>(builder: {
4379
- build(): TAttr;
4380
- }): this;
4381
5175
  /**
4382
5176
  * Add properties to qualify each document using existing attribute builders.
4383
5177
  * Returns a new builder type that carries the inferred props shape for $infer.
@@ -4389,7 +5183,7 @@ declare class DocumentAttributeBuilder<TName extends string, TRequired extends b
4389
5183
  * number({ name: "amount", label: "Amount" }).min(0),
4390
5184
  * )
4391
5185
  */
4392
- qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders): DocumentAttributeBuilder<TName, TRequired, InferQualifiedProps<TBuilders>>;
5186
+ qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders): QualifiedDocumentAttributeBuilder<TName, Eager<InferQualifiedProps<TBuilders>>, TRequired>;
4393
5187
  /**
4394
5188
  * Mark this attribute as required.
4395
5189
  */
@@ -4405,7 +5199,6 @@ declare class DocumentAttributeBuilder<TName extends string, TRequired extends b
4405
5199
  * @example
4406
5200
  * ```typescript
4407
5201
  * document({ name: "identityDocument", label: "Pièce d'identité" })
4408
- * .autoProcess()
4409
5202
  * .required()
4410
5203
  * ```
4411
5204
  */
@@ -4621,8 +5414,8 @@ type AddAttribute<TRecord extends Record<string, unknown>, TName extends string,
4621
5414
  * .attribute(
4622
5415
  * status({ name: "status", label: "Status" })
4623
5416
  * .options([
4624
- * { id: "active", label: "Active", value: "active", color: "green" },
4625
- * { id: "draft", label: "Draft", value: "draft", color: "yellow" }
5417
+ * { label: "Active", value: "active", color: "green" },
5418
+ * { label: "Draft", value: "draft", color: "yellow" }
4626
5419
  * ])
4627
5420
  * .required()
4628
5421
  * );
@@ -4640,6 +5433,8 @@ declare class ObjectBuilder<TRecord extends Record<string, unknown> = {}> implem
4640
5433
  private _labelExpression?;
4641
5434
  private _pluralLabel?;
4642
5435
  private _migrations;
5436
+ private _sealed;
5437
+ private _toleratedAttributes;
4643
5438
  /**
4644
5439
  * Phantom type property for type extraction
4645
5440
  * Never used at runtime, only for TypeScript inference
@@ -4715,6 +5510,37 @@ declare class ObjectBuilder<TRecord extends Record<string, unknown> = {}> implem
4715
5510
  * - Will be picked up by `standards diff` as runtime drift
4716
5511
  */
4717
5512
  runtime(): this;
5513
+ /**
5514
+ * Marks this object as sealed — no custom (user-created) attributes allowed.
5515
+ *
5516
+ * When sealed, `standards diff` reports an error if any custom attribute
5517
+ * exists in the DB that is not listed in `.tolerate()`.
5518
+ *
5519
+ * @example
5520
+ * ```typescript
5521
+ * object({ name: "invoice", label: "Invoice" })
5522
+ * .sealed()
5523
+ * .attribute(number({ name: "amount", label: "Amount" }))
5524
+ * ```
5525
+ */
5526
+ sealed(): this;
5527
+ /**
5528
+ * Explicitly acknowledges custom attribute names on this object.
5529
+ *
5530
+ * On a sealed object: listed names will NOT trigger a CI failure in `standards diff`.
5531
+ * On an extensible object: purely documentary.
5532
+ *
5533
+ * @param names - Array of custom attribute names to tolerate
5534
+ *
5535
+ * @example
5536
+ * ```typescript
5537
+ * object({ name: "invoice", label: "Invoice" })
5538
+ * .sealed()
5539
+ * .tolerate(["legacy_ref", "old_status"])
5540
+ * .attribute(number({ name: "amount", label: "Amount" }))
5541
+ * ```
5542
+ */
5543
+ tolerate(names: string[]): this;
4718
5544
  /**
4719
5545
  * Add an attribute to the object with type accumulation
4720
5546
  *
@@ -6651,50 +7477,147 @@ interface DomainEvent<T extends EventType = EventType> {
6651
7477
  metadata?: Record<string, unknown>;
6652
7478
  }
6653
7479
 
6654
- interface FormulaResult {
7480
+ type LiveChannelKind = "workspace" | "object" | "record" | "view" | "agent" | "user" | "conversation";
7481
+ type LiveChannel = {
7482
+ kind: "workspace";
7483
+ workspaceId: string;
7484
+ } | {
7485
+ kind: "object";
7486
+ objectId: string;
7487
+ } | {
7488
+ kind: "record";
7489
+ objectId: string;
7490
+ recordId: string;
7491
+ } | {
7492
+ kind: "view";
7493
+ viewId: string;
7494
+ } | {
7495
+ kind: "agent";
7496
+ workspaceId: string;
7497
+ } | {
7498
+ kind: "user";
7499
+ actorId: string;
7500
+ } | {
7501
+ kind: "conversation";
7502
+ sessionId: string;
7503
+ };
7504
+ declare function liveChannelKey(channel: LiveChannel): string;
7505
+ declare function parseLiveChannelKey(key: string): LiveChannel | null;
7506
+
7507
+ declare const LIVE_STREAM_START_CURSOR = "0-0";
7508
+ declare function isLiveStreamCursor(value: unknown): value is string;
7509
+ declare function assertLiveStreamCursor(cursor: string | null, label?: string): asserts cursor is string | null;
7510
+ declare function compareLiveStreamCursors(left: string, right: string): -1 | 0 | 1;
7511
+
7512
+ type RecordFieldPatch = {
7513
+ fieldKey: string;
6655
7514
  value: unknown;
6656
- error?: string;
6657
- }
6658
- declare function evaluateFormula(expression: string, values: Record<string, unknown>): unknown;
6659
- declare function evaluateFormulaWithResult(expression: string, values: Record<string, unknown>): FormulaResult;
6660
- declare function formatFormulaResult(value: unknown, returnType: FormulaReturnType, decimals?: number): unknown;
6661
- declare function evaluateFormulaAttribute(attr: FormulaAttribute, values: Record<string, unknown>): unknown;
6662
- declare function validateFormulaExpression(expression: string): {
6663
- valid: boolean;
6664
- error?: string;
7515
+ version: number;
7516
+ };
7517
+ type RecordPatchLiveEvent = {
7518
+ type: "record.patch";
7519
+ objectId: string;
7520
+ recordId: string;
7521
+ recordVersion: number;
7522
+ label?: string;
7523
+ completionStatus?: CompletionStatus;
7524
+ metadata?: Record<string, unknown>;
7525
+ fieldPatches: RecordFieldPatch[];
7526
+ updatedAt: string;
7527
+ };
7528
+ type RecordDeletedLiveEvent = {
7529
+ type: "record.deleted";
7530
+ objectId: string;
7531
+ recordId: string;
7532
+ recordVersion: number;
7533
+ deletedAt: string;
6665
7534
  };
6666
- declare function extractFormulaVariables(expression: string): string[];
6667
- declare function extractRelationReferences(expression: string): string[];
6668
- declare function extractRelationNames(expression: string): string[];
6669
- declare function hasRelationReferences(expression: string): boolean;
6670
- declare function flattenRelationsForEval(resolvedRelations: Record<string, Record<string, unknown>>): Record<string, unknown>;
7535
+ type ViewProjectionStaleLiveEvent = {
7536
+ type: "view.projection.stale";
7537
+ viewId: string;
7538
+ reason: "membership-unknown" | "sort-unknown" | "permissions-changed";
7539
+ };
7540
+ type AgentSessionPatchLiveEvent = {
7541
+ type: "agent.session.patch";
7542
+ workspaceId: string;
7543
+ sessionId: string;
7544
+ patch: Record<string, unknown>;
7545
+ version: number;
7546
+ updatedAt: string;
7547
+ };
7548
+ type AgentUnreadPatchLiveEvent = {
7549
+ type: "agent.unread.patch";
7550
+ workspaceId: string;
7551
+ targetActorId: string;
7552
+ sessionId: string;
7553
+ unreadCount: number;
7554
+ version: number;
7555
+ updatedAt: string;
7556
+ session?: Record<string, unknown>;
7557
+ };
7558
+ type ConversationRenamedLiveEvent = {
7559
+ type: "conversation.renamed";
7560
+ workspaceId: string;
7561
+ sessionId: string;
7562
+ title: string;
7563
+ version: number;
7564
+ updatedAt: string;
7565
+ };
7566
+ type ChannelRevokedLiveEvent = {
7567
+ type: "channel.revoked";
7568
+ channel: string;
7569
+ reason: "permission-revoked" | "workspace-left" | "object-deleted";
7570
+ };
7571
+ type LiveEventPayload = RecordPatchLiveEvent | RecordDeletedLiveEvent | ViewProjectionStaleLiveEvent | AgentSessionPatchLiveEvent | AgentUnreadPatchLiveEvent | ConversationRenamedLiveEvent | ChannelRevokedLiveEvent;
7572
+ type LiveEventType = LiveEventPayload["type"];
7573
+ declare const LIVE_EVENT_TYPES: readonly LiveEventType[];
7574
+ declare function isLiveEventType(value: unknown): value is LiveEventType;
7575
+ declare function isLiveEventPayload(payload: unknown): payload is LiveEventPayload;
7576
+ declare function isLiveEventPayloadForType(type: string, payload: unknown): payload is LiveEventPayload;
6671
7577
 
6672
- type PathSegmentType = "relation" | "attribute";
6673
- type PathCardinality = "one" | "many";
6674
- interface PathSegment {
6675
- name: string;
6676
- type: PathSegmentType;
6677
- cardinality?: PathCardinality;
6678
- targetObject?: string;
6679
- }
6680
- declare class InvalidPathError extends Error {
6681
- readonly path: string;
6682
- readonly segment: string;
6683
- readonly reason: string;
6684
- constructor(path: string, segment: string, reason: string);
6685
- }
6686
- declare class MaxDepthExceededError extends Error {
6687
- readonly path: string;
6688
- readonly maxDepth: number;
6689
- constructor(path: string, maxDepth: number);
6690
- }
6691
- type SchemaResolver = (objectName: string) => Promise<ObjectDefinition | null>;
6692
- declare function parsePath(path: string, startSchema: ObjectDefinition, getSchema: SchemaResolver, maxDepth?: number): Promise<PathSegment[]>;
6693
- declare function validatePath(path: string, startSchema: ObjectDefinition, getSchema: SchemaResolver, maxDepth?: number): Promise<boolean>;
6694
- declare function pathHasManyCardinality(segments: PathSegment[]): boolean;
6695
- declare function getPathDepth(segments: PathSegment[]): number;
6696
- declare function getTargetAttributeName(path: string): string;
6697
- declare function getRelationPath(path: string): string | null;
7578
+ type UnknownRecord = Record<string, unknown>;
7579
+ type LiveEventEnvelope = {
7580
+ id: string;
7581
+ channel: string;
7582
+ type: string;
7583
+ payload: UnknownRecord;
7584
+ occurredAt: string;
7585
+ tenantId?: string;
7586
+ workspaceId?: string;
7587
+ actorId?: string | null;
7588
+ correlationId?: string | null;
7589
+ schemaVersion?: number;
7590
+ };
7591
+ type LiveSubscribePayload = {
7592
+ channel: string;
7593
+ cursor: string | null;
7594
+ };
7595
+ type LiveUnsubscribePayload = {
7596
+ channel?: string;
7597
+ };
7598
+ type LiveReplayCompletePayload = {
7599
+ channel: string;
7600
+ cursor: string | null;
7601
+ };
7602
+ type LiveGapPayload = {
7603
+ channel: string;
7604
+ requestedAfterId?: string | null;
7605
+ oldestAvailableId?: string | null;
7606
+ [key: string]: unknown;
7607
+ };
7608
+ type LiveErrorPayload = {
7609
+ channel: string;
7610
+ code?: string;
7611
+ message?: string;
7612
+ [key: string]: unknown;
7613
+ };
7614
+ declare function getLiveProtocolPayloadChannel(payload: unknown): string | null;
7615
+ declare function isLiveEventEnvelope(payload: unknown): payload is LiveEventEnvelope;
7616
+ declare function parseLiveSubscribePayload(payload: unknown): LiveSubscribePayload | null;
7617
+ declare function parseLiveUnsubscribePayload(payload: unknown): LiveUnsubscribePayload | null;
7618
+ declare function isLiveReplayCompletePayload(payload: unknown): payload is LiveReplayCompletePayload;
7619
+ declare function isLiveGapPayload(payload: unknown): payload is LiveGapPayload;
7620
+ declare function isLiveErrorPayload(payload: unknown): payload is LiveErrorPayload;
6698
7621
 
6699
7622
  interface OperatorSpec {
6700
7623
  /** Attribute types this operator applies to. Used by both UI and evaluators. */
@@ -6718,4 +7641,4 @@ interface QualifiedRuleValidationContext {
6718
7641
  }
6719
7642
  declare function validateQualifiedRule(rule: FilterRule, context: QualifiedRuleValidationContext): void;
6720
7643
 
6721
- export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, ChangeTypeNotSupportedError, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterRule, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getOperatorPolarity, getPathDepth, getRelationPath, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isDocumentAttribute, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parsePath, parseQualifiedAttribute, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
7644
+ export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompileComputedFormulaInput, CompletionStatus, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, type ComputedFormulaAstNode, type ComputedFormulaBinaryNode, type ComputedFormulaBinaryOperator, type ComputedFormulaCallNode, ComputedFormulaCompileError, type ComputedFormulaLiteralNode, ComputedFormulaParseError, type ComputedFormulaPathNode, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type Eager, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parseComputedFormula, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };