@ram_28/kf-ai-sdk 1.0.10 → 1.0.12

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 (193) hide show
  1. package/README.md +55 -48
  2. package/dist/api/client.d.ts +23 -13
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/datetime.d.ts +5 -5
  5. package/dist/api/datetime.d.ts.map +1 -1
  6. package/dist/api/index.d.ts +1 -1
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/metadata.d.ts +2 -2
  9. package/dist/api/metadata.d.ts.map +1 -1
  10. package/dist/api.cjs +1 -0
  11. package/dist/api.d.ts +4 -0
  12. package/dist/api.d.ts.map +1 -0
  13. package/dist/api.mjs +27 -0
  14. package/dist/api.types.cjs +1 -0
  15. package/dist/api.types.d.ts +4 -0
  16. package/dist/api.types.d.ts.map +1 -0
  17. package/dist/api.types.mjs +1 -0
  18. package/dist/auth/AuthProvider.d.ts +3 -3
  19. package/dist/auth/AuthProvider.d.ts.map +1 -1
  20. package/dist/auth/authClient.d.ts +4 -4
  21. package/dist/auth/authClient.d.ts.map +1 -1
  22. package/dist/auth/authConfig.d.ts +5 -5
  23. package/dist/auth/authConfig.d.ts.map +1 -1
  24. package/dist/auth/index.d.ts +1 -1
  25. package/dist/auth/index.d.ts.map +1 -1
  26. package/dist/auth/types.d.ts +21 -21
  27. package/dist/auth/types.d.ts.map +1 -1
  28. package/dist/auth/useAuth.d.ts +2 -2
  29. package/dist/auth/useAuth.d.ts.map +1 -1
  30. package/dist/auth.cjs +1 -0
  31. package/dist/auth.d.ts +5 -0
  32. package/dist/auth.d.ts.map +1 -0
  33. package/dist/auth.mjs +280 -0
  34. package/dist/auth.types.cjs +1 -0
  35. package/dist/auth.types.d.ts +2 -0
  36. package/dist/auth.types.d.ts.map +1 -0
  37. package/dist/auth.types.mjs +1 -0
  38. package/dist/base-types.d.ts +2 -0
  39. package/dist/base-types.d.ts.map +1 -0
  40. package/dist/client-C15j4O5B.cjs +1 -0
  41. package/dist/client-CfvLiGfP.js +233 -0
  42. package/dist/cn-Dr87sK3i.js +2775 -0
  43. package/dist/cn-mXUIg4vp.cjs +1 -0
  44. package/dist/components/hooks/index.d.ts +3 -3
  45. package/dist/components/hooks/index.d.ts.map +1 -1
  46. package/dist/components/hooks/useFilter/index.d.ts +2 -2
  47. package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
  48. package/dist/components/hooks/useFilter/types.d.ts +19 -31
  49. package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
  50. package/dist/components/hooks/useFilter/useFilter.d.ts +2 -2
  51. package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
  52. package/dist/components/hooks/useForm/apiClient.d.ts +6 -6
  53. package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
  54. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +7 -7
  55. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
  56. package/dist/components/hooks/useForm/index.d.ts +5 -5
  57. package/dist/components/hooks/useForm/index.d.ts.map +1 -1
  58. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +10 -10
  59. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
  60. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -12
  61. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
  62. package/dist/components/hooks/useForm/schemaParser.utils.d.ts +7 -7
  63. package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
  64. package/dist/components/hooks/useForm/types.d.ts +79 -70
  65. package/dist/components/hooks/useForm/types.d.ts.map +1 -1
  66. package/dist/components/hooks/useForm/useForm.d.ts +2 -2
  67. package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
  68. package/dist/components/hooks/useKanban/apiClient.d.ts +16 -16
  69. package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -1
  70. package/dist/components/hooks/useKanban/context.d.ts +3 -3
  71. package/dist/components/hooks/useKanban/context.d.ts.map +1 -1
  72. package/dist/components/hooks/useKanban/dragDropManager.d.ts +7 -7
  73. package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -1
  74. package/dist/components/hooks/useKanban/index.d.ts +1 -1
  75. package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
  76. package/dist/components/hooks/useKanban/types.d.ts +65 -67
  77. package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
  78. package/dist/components/hooks/useKanban/useKanban.d.ts +2 -2
  79. package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
  80. package/dist/components/hooks/useTable/index.d.ts +1 -1
  81. package/dist/components/hooks/useTable/index.d.ts.map +1 -1
  82. package/dist/components/hooks/useTable/types.d.ts +10 -10
  83. package/dist/components/hooks/useTable/types.d.ts.map +1 -1
  84. package/dist/components/hooks/useTable/useTable.d.ts +2 -2
  85. package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
  86. package/dist/filter.cjs +1 -0
  87. package/dist/filter.d.ts +3 -0
  88. package/dist/filter.d.ts.map +1 -0
  89. package/dist/filter.mjs +6 -0
  90. package/dist/filter.types.cjs +1 -0
  91. package/dist/filter.types.d.ts +2 -0
  92. package/dist/filter.types.d.ts.map +1 -0
  93. package/dist/filter.types.mjs +1 -0
  94. package/dist/form.cjs +1 -0
  95. package/dist/form.d.ts +3 -0
  96. package/dist/form.d.ts.map +1 -0
  97. package/dist/form.mjs +1346 -0
  98. package/dist/form.types.cjs +1 -0
  99. package/dist/form.types.d.ts +2 -0
  100. package/dist/form.types.d.ts.map +1 -0
  101. package/dist/form.types.mjs +1 -0
  102. package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
  103. package/dist/jsx-runtime-DGlMoOmv.js +630 -0
  104. package/dist/kanban.cjs +13 -0
  105. package/dist/kanban.d.ts +5 -0
  106. package/dist/kanban.d.ts.map +1 -0
  107. package/dist/kanban.mjs +694 -0
  108. package/dist/kanban.types.cjs +1 -0
  109. package/dist/kanban.types.d.ts +2 -0
  110. package/dist/kanban.types.d.ts.map +1 -0
  111. package/dist/kanban.types.mjs +1 -0
  112. package/dist/kanban.ui.cjs +1 -0
  113. package/dist/kanban.ui.d.ts +2 -0
  114. package/dist/kanban.ui.d.ts.map +1 -0
  115. package/dist/kanban.ui.mjs +104 -0
  116. package/dist/metadata-2FLBsFcf.cjs +1 -0
  117. package/dist/metadata-DBcoDth-.js +43 -0
  118. package/dist/table.cjs +1 -0
  119. package/dist/table.d.ts +2 -0
  120. package/dist/table.d.ts.map +1 -0
  121. package/dist/table.mjs +148 -0
  122. package/dist/table.types.cjs +1 -0
  123. package/dist/table.types.d.ts +2 -0
  124. package/dist/table.types.d.ts.map +1 -0
  125. package/dist/table.types.mjs +1 -0
  126. package/dist/types/base-fields.d.ts +45 -45
  127. package/dist/types/base-fields.d.ts.map +1 -1
  128. package/dist/types/common.d.ts +45 -61
  129. package/dist/types/common.d.ts.map +1 -1
  130. package/dist/types.cjs +1 -0
  131. package/dist/types.mjs +1 -0
  132. package/dist/useFilter-CXFqEHyI.js +129 -0
  133. package/dist/useFilter-D-bCDo6Z.cjs +1 -0
  134. package/dist/utils/formatting.d.ts +4 -4
  135. package/dist/utils/formatting.d.ts.map +1 -1
  136. package/dist/utils.cjs +4 -0
  137. package/dist/utils.d.ts +3 -0
  138. package/dist/utils.d.ts.map +1 -0
  139. package/dist/utils.mjs +105 -0
  140. package/package.json +147 -9
  141. package/sdk/api/client.ts +76 -49
  142. package/sdk/api/datetime.ts +5 -5
  143. package/sdk/api/index.ts +28 -33
  144. package/sdk/api/metadata.ts +4 -4
  145. package/sdk/api.ts +24 -0
  146. package/sdk/api.types.ts +58 -0
  147. package/sdk/auth/AuthProvider.tsx +18 -18
  148. package/sdk/auth/authClient.ts +9 -9
  149. package/sdk/auth/authConfig.ts +9 -9
  150. package/sdk/auth/index.ts +5 -5
  151. package/sdk/auth/types.ts +21 -21
  152. package/sdk/auth/useAuth.ts +2 -2
  153. package/sdk/auth.ts +22 -0
  154. package/sdk/auth.types.ts +28 -0
  155. package/sdk/base-types.ts +45 -0
  156. package/sdk/components/hooks/index.ts +22 -22
  157. package/sdk/components/hooks/useFilter/index.ts +8 -14
  158. package/sdk/components/hooks/useFilter/types.ts +29 -58
  159. package/sdk/components/hooks/useFilter/useFilter.ts +41 -44
  160. package/sdk/components/hooks/useForm/apiClient.ts +8 -8
  161. package/sdk/components/hooks/useForm/expressionValidator.utils.ts +18 -18
  162. package/sdk/components/hooks/useForm/index.ts +24 -24
  163. package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +22 -22
  164. package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +26 -62
  165. package/sdk/components/hooks/useForm/schemaParser.utils.ts +24 -24
  166. package/sdk/components/hooks/useForm/types.ts +85 -75
  167. package/sdk/components/hooks/useForm/useForm.ts +160 -40
  168. package/sdk/components/hooks/useKanban/apiClient.ts +54 -54
  169. package/sdk/components/hooks/useKanban/context.ts +3 -3
  170. package/sdk/components/hooks/useKanban/dragDropManager.ts +19 -19
  171. package/sdk/components/hooks/useKanban/index.ts +26 -26
  172. package/sdk/components/hooks/useKanban/types.ts +69 -71
  173. package/sdk/components/hooks/useKanban/useKanban.ts +43 -51
  174. package/sdk/components/hooks/useKanban/useKanbanSimple.ts +4 -4
  175. package/sdk/components/hooks/useTable/index.ts +5 -1
  176. package/sdk/components/hooks/useTable/types.ts +10 -10
  177. package/sdk/components/hooks/useTable/useTable.ts +10 -10
  178. package/sdk/filter.ts +13 -0
  179. package/sdk/filter.types.ts +17 -0
  180. package/sdk/form.ts +15 -0
  181. package/sdk/form.types.ts +46 -0
  182. package/sdk/kanban.ts +23 -0
  183. package/sdk/kanban.types.ts +50 -0
  184. package/sdk/kanban.ui.ts +16 -0
  185. package/sdk/table.ts +7 -0
  186. package/sdk/table.types.ts +13 -0
  187. package/sdk/types/base-fields.ts +47 -47
  188. package/sdk/types/common.ts +47 -71
  189. package/sdk/types/index.ts +1 -1
  190. package/sdk/utils/formatting.ts +4 -4
  191. package/sdk/utils.ts +10 -0
  192. package/dist/index.cjs +0 -45
  193. package/dist/index.mjs +0 -6327
@@ -11,7 +11,6 @@ import type {
11
11
  PathValue,
12
12
  RegisterOptions,
13
13
  SetValueConfig,
14
- FormState,
15
14
  } from "react-hook-form";
16
15
 
17
16
  // ============================================================
@@ -29,7 +28,7 @@ import type {
29
28
  * 2. Clean data & call API → FAILS → onError(apiError)
30
29
  * 3. SUCCESS → onSuccess(responseData)
31
30
  */
32
- export type HandleSubmit<T extends RHFFieldValues> = (
31
+ export type HandleSubmitType<T extends RHFFieldValues> = (
33
32
  onSuccess?: (data: T, e?: React.BaseSyntheticEvent) => void | Promise<void>,
34
33
  onError?: (
35
34
  error: FieldErrors<T> | Error,
@@ -45,7 +44,7 @@ export type HandleSubmit<T extends RHFFieldValues> = (
45
44
  * Expression tree node types from backend validation system
46
45
  * Used for evaluating validation rules, computed fields, and default values
47
46
  */
48
- export interface ExpressionTree {
47
+ export interface ExpressionTreeType {
49
48
  Type:
50
49
  | "BinaryExpression"
51
50
  | "LogicalExpression"
@@ -57,7 +56,7 @@ export interface ExpressionTree {
57
56
  | "Literal";
58
57
  Operator?: string;
59
58
  Callee?: string;
60
- Arguments?: ExpressionTree[];
59
+ Arguments?: ExpressionTreeType[];
61
60
  Name?: string;
62
61
  Source?: string;
63
62
  Property?: {
@@ -77,12 +76,12 @@ export interface ExpressionTree {
77
76
  * Validation rule from BDO schema
78
77
  * Defines a validation, computation, or business logic rule
79
78
  */
80
- export interface SchemaValidationRule {
79
+ export interface SchemaValidationRuleType {
81
80
  Id: string;
82
81
  Name: string;
83
82
  Description: string;
84
83
  Expression: string;
85
- ExpressionTree: ExpressionTree;
84
+ ExpressionTree: ExpressionTreeType;
86
85
  ResultType: string;
87
86
  Message?: string;
88
87
  }
@@ -90,27 +89,27 @@ export interface SchemaValidationRule {
90
89
  /**
91
90
  * Formula definition for computed fields
92
91
  */
93
- export interface ComputedFieldFormula {
92
+ export interface ComputedFieldFormulaType {
94
93
  Id?: string;
95
94
  Name?: string;
96
95
  Description?: string;
97
96
  Expression: string;
98
- ExpressionTree: ExpressionTree;
97
+ ExpressionTree: ExpressionTreeType;
99
98
  ResultType?: string;
100
99
  }
101
100
 
102
101
  /**
103
102
  * Default value expression for a field
104
103
  */
105
- export interface DefaultValueExpression {
104
+ export interface DefaultValueExpressionType {
106
105
  Expression: string;
107
- ExpressionTree: ExpressionTree;
106
+ ExpressionTree: ExpressionTreeType;
108
107
  }
109
108
 
110
109
  /**
111
110
  * Reference field configuration for dynamic lookups
112
111
  */
113
- export interface ReferenceFieldConfig {
112
+ export interface ReferenceFieldConfigType {
114
113
  Mode: "Dynamic" | "Static";
115
114
  Reference?: {
116
115
  BusinessObject: string;
@@ -120,7 +119,7 @@ export interface ReferenceFieldConfig {
120
119
  LhsField: string;
121
120
  Operator: string;
122
121
  RhsType: string;
123
- RhsValue?: DefaultValueExpression;
122
+ RhsValue?: DefaultValueExpressionType;
124
123
  }>;
125
124
  };
126
125
  Sort?: Array<{
@@ -133,19 +132,19 @@ export interface ReferenceFieldConfig {
133
132
  /**
134
133
  * Field options configuration for select/dropdown fields
135
134
  */
136
- export interface FieldOptionsConfig {
135
+ export interface FieldOptionsConfigType {
137
136
  Mode: "Static" | "Dynamic";
138
137
  Items?: Array<{
139
138
  Value: string | number | boolean;
140
139
  Label: string;
141
140
  }>;
142
- Reference?: ReferenceFieldConfig["Reference"];
141
+ Reference?: ReferenceFieldConfigType["Reference"];
143
142
  }
144
143
 
145
144
  /**
146
145
  * BDO field definition structure
147
146
  */
148
- export interface BDOFieldDefinition {
147
+ export interface BDOFieldDefinitionType {
149
148
  Id: string;
150
149
  Name: string;
151
150
  Type:
@@ -160,32 +159,32 @@ export interface BDOFieldDefinition {
160
159
  | "ActivityFlow";
161
160
  Required?: boolean;
162
161
  Unique?: boolean;
163
- DefaultValue?: DefaultValueExpression;
164
- Formula?: ComputedFieldFormula;
162
+ DefaultValue?: DefaultValueExpressionType;
163
+ Formula?: ComputedFieldFormulaType;
165
164
  Computed?: boolean;
166
- Validation?: string[] | SchemaValidationRule[]; // Array of rule IDs OR inline validation rule objects
167
- Values?: FieldOptionsConfig;
165
+ Validation?: string[] | SchemaValidationRuleType[]; // Array of rule IDs OR inline validation rule objects
166
+ Values?: FieldOptionsConfigType;
168
167
  Items?: {
169
168
  Type: string;
170
- Property?: Record<string, BDOFieldDefinition>;
169
+ Property?: Record<string, BDOFieldDefinitionType>;
171
170
  };
172
- Property?: Record<string, BDOFieldDefinition>;
171
+ Property?: Record<string, BDOFieldDefinitionType>;
173
172
  Description?: string;
174
173
  }
175
174
 
176
175
  /**
177
176
  * Business Object Rule definitions from BDO schema
178
177
  */
179
- export interface BusinessObjectRules {
180
- Computation?: Record<string, SchemaValidationRule>;
181
- Validation?: Record<string, SchemaValidationRule>;
182
- BusinessLogic?: Record<string, SchemaValidationRule>;
178
+ export interface BusinessObjectRulesType {
179
+ Computation?: Record<string, SchemaValidationRuleType>;
180
+ Validation?: Record<string, SchemaValidationRuleType>;
181
+ BusinessLogic?: Record<string, SchemaValidationRuleType>;
183
182
  }
184
183
 
185
184
  /**
186
185
  * Role permission definition from BDO schema
187
186
  */
188
- export interface RolePermission {
187
+ export interface RolePermissionType {
189
188
  Editable?: string[];
190
189
  ReadOnly?: string[];
191
190
  Methods?: string[];
@@ -203,14 +202,14 @@ export interface RolePermission {
203
202
  /**
204
203
  * Complete BDO (Business Data Object) schema structure
205
204
  */
206
- export interface BDOSchema {
205
+ export interface BDOSchemaType {
207
206
  Id: string;
208
207
  Name: string;
209
208
  Kind: "BusinessObject";
210
209
  Description: string;
211
- Rules: BusinessObjectRules;
212
- Fields: Record<string, BDOFieldDefinition>;
213
- RolePermission: Record<string, RolePermission>;
210
+ Rules: BusinessObjectRulesType;
211
+ Fields: Record<string, BDOFieldDefinitionType>;
212
+ RolePermission: Record<string, RolePermissionType>;
214
213
  Roles: Record<
215
214
  string,
216
215
  {
@@ -227,29 +226,36 @@ export interface BDOSchema {
227
226
  /**
228
227
  * Form operation mode
229
228
  */
230
- export type FormOperation = "create" | "update";
229
+ export type FormOperationType = "create" | "update";
230
+
231
+ /**
232
+ * Form interaction mode
233
+ * - "interactive" (default): Real-time server-side validation and computation on every field blur
234
+ * - "non-interactive": Draft only for computed field dependencies (legacy behavior)
235
+ */
236
+ export type InteractionModeType = "interactive" | "non-interactive";
231
237
 
232
238
  /**
233
239
  * Form validation mode (from react-hook-form)
234
240
  */
235
- export type FormMode = Mode;
241
+ export type FormModeType = Mode;
236
242
 
237
243
  /**
238
244
  * Rule classification types
239
245
  */
240
- export type RuleType = "Validation" | "Computation" | "BusinessLogic";
246
+ export type RuleTypeType = "Validation" | "Computation" | "BusinessLogic";
241
247
 
242
248
  /**
243
249
  * useForm hook options with strict typing
244
250
  */
245
- export interface UseFormOptions<
251
+ export interface UseFormOptionsType<
246
252
  T extends Record<string, any> = Record<string, any>,
247
253
  > {
248
254
  /** Data source identifier (Business Object name) */
249
255
  source: string;
250
256
 
251
257
  /** Form operation type */
252
- operation: FormOperation;
258
+ operation: FormOperationType;
253
259
 
254
260
  /** Record ID for update operations */
255
261
  recordId?: string;
@@ -274,7 +280,7 @@ export interface UseFormOptions<
274
280
  * @default "onBlur"
275
281
  * @see https://react-hook-form.com/docs/useform for more details on validation modes
276
282
  */
277
- mode?: FormMode;
283
+ mode?: FormModeType;
278
284
 
279
285
  /** Whether to enable schema fetching and form initialization (default: true) */
280
286
  enabled?: boolean;
@@ -289,14 +295,15 @@ export interface UseFormOptions<
289
295
  skipSchemaFetch?: boolean;
290
296
 
291
297
  /** Manual schema (use instead of fetching) */
292
- schema?: BDOSchema;
298
+ schema?: BDOSchemaType;
293
299
 
294
300
  /**
295
- * Trigger draft API call on every field change (after validation passes)
296
- * If true: draft API is called for any field change
297
- * If false (default): draft API is called only when computed field dependencies change
301
+ * Form interaction mode
302
+ * - "interactive" (default): Real-time server-side validation and computation on every field blur
303
+ * - "non-interactive": Draft only for computed field dependencies
304
+ * @default "interactive"
298
305
  */
299
- draftOnEveryChange?: boolean;
306
+ interactionMode?: InteractionModeType;
300
307
  }
301
308
 
302
309
  // ============================================================
@@ -306,7 +313,7 @@ export interface UseFormOptions<
306
313
  /**
307
314
  * Field permission for current user
308
315
  */
309
- export interface FieldPermission {
316
+ export interface FieldPermissionType {
310
317
  /** Can user edit this field */
311
318
  editable: boolean;
312
319
 
@@ -320,7 +327,7 @@ export interface FieldPermission {
320
327
  /**
321
328
  * Field input types for form rendering
322
329
  */
323
- export type FormFieldType =
330
+ export type FormFieldTypeType =
324
331
  | "text"
325
332
  | "number"
326
333
  | "email"
@@ -335,7 +342,7 @@ export type FormFieldType =
335
342
  /**
336
343
  * Select option for dropdown fields
337
344
  */
338
- export interface SelectOption {
345
+ export interface SelectOptionType {
339
346
  value: any;
340
347
  label: string;
341
348
  }
@@ -343,7 +350,7 @@ export interface SelectOption {
343
350
  /**
344
351
  * Field rule IDs by category
345
352
  */
346
- export interface FieldRuleIds {
353
+ export interface FieldRuleIdsType {
347
354
  validation: string[];
348
355
  computation: string[];
349
356
  businessLogic: string[];
@@ -353,12 +360,12 @@ export interface FieldRuleIds {
353
360
  * Form field configuration for rendering
354
361
  * Contains all metadata needed to render and validate a form field
355
362
  */
356
- export interface FormFieldConfig {
363
+ export interface FormFieldConfigType {
357
364
  /** Field name/identifier */
358
365
  name: string;
359
366
 
360
367
  /** Field input type */
361
- type: FormFieldType;
368
+ type: FormFieldTypeType;
362
369
 
363
370
  /** Display label */
364
371
  label: string;
@@ -373,7 +380,7 @@ export interface FormFieldConfig {
373
380
  defaultValue?: any;
374
381
 
375
382
  /** Select options (for select/reference fields) */
376
- options?: SelectOption[];
383
+ options?: SelectOptionType[];
377
384
 
378
385
  /** Validation configuration */
379
386
  validation: any;
@@ -382,22 +389,22 @@ export interface FormFieldConfig {
382
389
  description?: string;
383
390
 
384
391
  /** Original BDO field definition (for advanced use) */
385
- _bdoField: BDOFieldDefinition;
392
+ _bdoField: BDOFieldDefinitionType;
386
393
 
387
394
  /** Field permissions for current user */
388
- permission: FieldPermission;
395
+ permission: FieldPermissionType;
389
396
 
390
397
  /** Associated rule IDs by category */
391
- rules: FieldRuleIds;
398
+ rules: FieldRuleIdsType;
392
399
  }
393
400
 
394
401
  /**
395
402
  * Form schema configuration after processing
396
403
  * Contains all fields and rules ready for form rendering
397
404
  */
398
- export interface FormSchemaConfig {
405
+ export interface FormSchemaConfigType {
399
406
  /** All fields by name */
400
- fields: Record<string, FormFieldConfig>;
407
+ fields: Record<string, FormFieldConfigType>;
401
408
 
402
409
  /** Field names in display order */
403
410
  fieldOrder: string[];
@@ -409,20 +416,20 @@ export interface FormSchemaConfig {
409
416
  requiredFields: string[];
410
417
 
411
418
  /** Cross-field validation rules */
412
- crossFieldValidation: SchemaValidationRule[];
419
+ crossFieldValidation: SchemaValidationRuleType[];
413
420
 
414
421
  /** Classified rules by type */
415
422
  rules: {
416
- validation: Record<string, SchemaValidationRule>;
417
- computation: Record<string, SchemaValidationRule>;
418
- businessLogic: Record<string, SchemaValidationRule>;
423
+ validation: Record<string, SchemaValidationRuleType>;
424
+ computation: Record<string, SchemaValidationRuleType>;
425
+ businessLogic: Record<string, SchemaValidationRuleType>;
419
426
  };
420
427
 
421
428
  /** Field-to-rule mapping for quick lookup */
422
- fieldRules: Record<string, FieldRuleIds>;
429
+ fieldRules: Record<string, FieldRuleIdsType>;
423
430
 
424
431
  /** Role permissions */
425
- rolePermissions?: Record<string, RolePermission>;
432
+ rolePermissions?: Record<string, RolePermissionType>;
426
433
  }
427
434
 
428
435
  // ============================================================
@@ -432,7 +439,7 @@ export interface FormSchemaConfig {
432
439
  /**
433
440
  * useForm hook return type with flattened state access and strict typing
434
441
  */
435
- export interface UseFormReturn<
442
+ export interface UseFormReturnType<
436
443
  T extends Record<string, any> = Record<string, any>,
437
444
  > {
438
445
  // ============================================================
@@ -476,7 +483,7 @@ export interface UseFormReturn<
476
483
  * // Programmatic submission
477
484
  * await form.handleSubmit(onSuccess, onError)();
478
485
  */
479
- handleSubmit: HandleSubmit<T>;
486
+ handleSubmit: HandleSubmitType<T>;
480
487
 
481
488
  /** Watch field values with strict typing */
482
489
  watch: <K extends Path<T> | readonly Path<T>[]>(
@@ -516,13 +523,6 @@ export interface UseFormReturn<
516
523
  /** Form submission was successful - direct access */
517
524
  isSubmitSuccessful: boolean;
518
525
 
519
- // ============================================================
520
- // BACKWARD COMPATIBILITY
521
- // ============================================================
522
-
523
- /** Form state object (for backward compatibility with existing components) */
524
- formState: FormState<T>;
525
-
526
526
  // ============================================================
527
527
  // LOADING STATES
528
528
  // ============================================================
@@ -536,6 +536,16 @@ export interface UseFormReturn<
536
536
  /** Any loading state active */
537
537
  isLoading: boolean;
538
538
 
539
+ // ============================================================
540
+ // INTERACTIVE MODE STATE
541
+ // ============================================================
542
+
543
+ /** Draft ID for interactive create mode */
544
+ draftId: string | null;
545
+
546
+ /** Whether draft is being created (interactive create only) */
547
+ isCreatingDraft: boolean;
548
+
539
549
  // ============================================================
540
550
  // ERROR HANDLING
541
551
  // ============================================================
@@ -551,10 +561,10 @@ export interface UseFormReturn<
551
561
  // ============================================================
552
562
 
553
563
  /** Raw BDO schema */
554
- schema: BDOSchema | null;
564
+ schema: BDOSchemaType | null;
555
565
 
556
566
  /** Processed schema configuration for rendering */
557
- schemaConfig: FormSchemaConfig | null;
567
+ schemaConfig: FormSchemaConfigType | null;
558
568
 
559
569
  /** Computed field names as typed array */
560
570
  computedFields: Array<keyof T>;
@@ -567,10 +577,10 @@ export interface UseFormReturn<
567
577
  // ============================================================
568
578
 
569
579
  /** Get field configuration with strict typing */
570
- getField: <K extends keyof T>(fieldName: K) => FormFieldConfig | null;
580
+ getField: <K extends keyof T>(fieldName: K) => FormFieldConfigType | null;
571
581
 
572
582
  /** Get all field configurations with strict typing */
573
- getFields: () => Record<keyof T, FormFieldConfig>;
583
+ getFields: () => Record<keyof T, FormFieldConfigType>;
574
584
 
575
585
  /** Check if field exists with strict typing */
576
586
  hasField: <K extends keyof T>(fieldName: K) => boolean;
@@ -602,7 +612,7 @@ export interface UseFormReturn<
602
612
  /**
603
613
  * Expression evaluation context
604
614
  */
605
- export interface ExpressionContext<T = Record<string, any>> {
615
+ export interface ExpressionContextType<T = Record<string, any>> {
606
616
  /** Current form values */
607
617
  formValues: Partial<T>;
608
618
 
@@ -616,7 +626,7 @@ export interface ExpressionContext<T = Record<string, any>> {
616
626
  /**
617
627
  * Field validation result
618
628
  */
619
- export interface FieldValidationResult<T = Record<string, any>> {
629
+ export interface FieldValidationResultType<T = Record<string, any>> {
620
630
  /** Is validation passing */
621
631
  isValid: boolean;
622
632
 
@@ -630,7 +640,7 @@ export interface FieldValidationResult<T = Record<string, any>> {
630
640
  /**
631
641
  * Form submission result
632
642
  */
633
- export interface SubmissionResult {
643
+ export interface SubmissionResultType {
634
644
  /** Was submission successful */
635
645
  success: boolean;
636
646