@praxisui/visual-builder 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,3600 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges, ElementRef, ChangeDetectorRef } from '@angular/core';
3
+ import { ContextProvider, FunctionRegistry, ExportOptions as ExportOptions$1, ValidationIssue as ValidationIssue$1, ContextualSpecification } from '@praxisui/specification';
4
+ import { SpecificationMetadata, Specification } from '@praxisui/specification-core';
5
+ export { SpecificationMetadata } from '@praxisui/specification-core';
6
+ import { Observable } from 'rxjs';
7
+ import { FormBuilder, FormGroup, FormArray } from '@angular/forms';
8
+ import { MatSnackBar } from '@angular/material/snack-bar';
9
+ import { MatButtonToggleChange } from '@angular/material/button-toggle';
10
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
11
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
12
+ import { MatSelectChange } from '@angular/material/select';
13
+ import { MatSlideToggleChange } from '@angular/material/slide-toggle';
14
+ import { MatChipInputEvent } from '@angular/material/chips';
15
+
16
+ /**
17
+ * Models for the Visual Rule Builder
18
+ */
19
+
20
+ /**
21
+ * Value types for rule configuration
22
+ */
23
+ type ValueType = 'literal' | 'field' | 'context' | 'function';
24
+ /**
25
+ * Valid comparison operators (aligned with @praxisui/specification)
26
+ */
27
+ type ValidComparisonOperator = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'contains' | 'startsWith' | 'endsWith' | 'in';
28
+ interface RuleNode {
29
+ /** Unique identifier for this rule node */
30
+ id: string;
31
+ /** Type of rule node */
32
+ type: RuleNodeType | RuleNodeTypeString;
33
+ /** Human-readable label for this rule */
34
+ label?: string;
35
+ /** Rule metadata */
36
+ metadata?: SpecificationMetadata;
37
+ /** Whether this node is currently selected */
38
+ selected?: boolean;
39
+ /** Whether this node is expanded (for groups) */
40
+ expanded?: boolean;
41
+ /** Parent node ID */
42
+ parentId?: string;
43
+ /** Child node IDs (for groups) */
44
+ children?: string[];
45
+ /** Rule-specific configuration */
46
+ config?: RuleNodeConfig;
47
+ }
48
+ declare enum RuleNodeType {
49
+ FIELD_CONDITION = "fieldCondition",
50
+ AND_GROUP = "andGroup",
51
+ OR_GROUP = "orGroup",
52
+ NOT_GROUP = "notGroup",
53
+ XOR_GROUP = "xorGroup",
54
+ IMPLIES_GROUP = "impliesGroup",
55
+ REQUIRED_IF = "requiredIf",
56
+ VISIBLE_IF = "visibleIf",
57
+ DISABLED_IF = "disabledIf",
58
+ READONLY_IF = "readonlyIf",
59
+ FOR_EACH = "forEach",
60
+ UNIQUE_BY = "uniqueBy",
61
+ MIN_LENGTH = "minLength",
62
+ MAX_LENGTH = "maxLength",
63
+ IF_DEFINED = "ifDefined",
64
+ IF_NOT_NULL = "ifNotNull",
65
+ IF_EXISTS = "ifExists",
66
+ WITH_DEFAULT = "withDefault",
67
+ FUNCTION_CALL = "functionCall",
68
+ FIELD_TO_FIELD = "fieldToField",
69
+ CONTEXTUAL = "contextual",
70
+ AT_LEAST = "atLeast",
71
+ EXACTLY = "exactly",
72
+ EXPRESSION = "expression",
73
+ CONTEXTUAL_TEMPLATE = "contextualTemplate",
74
+ CUSTOM = "custom"
75
+ }
76
+ /**
77
+ * String literal type for rule node types (for flexibility)
78
+ */
79
+ type RuleNodeTypeString = 'fieldCondition' | 'andGroup' | 'orGroup' | 'notGroup' | 'xorGroup' | 'impliesGroup' | 'requiredIf' | 'visibleIf' | 'disabledIf' | 'readonlyIf' | 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength' | 'ifDefined' | 'ifNotNull' | 'ifExists' | 'withDefault' | 'functionCall' | 'fieldToField' | 'contextual' | 'atLeast' | 'exactly' | 'expression' | 'contextualTemplate' | 'custom';
80
+ type RuleNodeConfig = FieldConditionConfig | BooleanGroupConfig | ConditionalValidatorConfig | CollectionValidationConfig | CollectionValidatorConfig | OptionalFieldConfig | FunctionCallConfig | FieldToFieldConfig | ContextualConfig$1 | CardinalityConfig | ExpressionConfig | ContextualTemplateConfig | CustomConfig;
81
+ interface FieldConditionConfig {
82
+ type: 'fieldCondition';
83
+ /** Primary field name */
84
+ fieldName: string;
85
+ /** Comparison operator aligned with @praxisui/specification */
86
+ operator: ValidComparisonOperator | string;
87
+ /** Comparison value */
88
+ value: unknown;
89
+ /** Type of value for proper handling */
90
+ valueType?: ValueType;
91
+ /** Field to compare against (for field-to-field comparisons) */
92
+ compareToField?: string;
93
+ /** Context variable to use as value */
94
+ contextVariable?: string;
95
+ /** Optional metadata for error messages and UI hints */
96
+ metadata?: SpecificationMetadata;
97
+ /** Legacy field alias for backward compatibility */
98
+ field?: string;
99
+ }
100
+ interface BooleanGroupConfig {
101
+ type: 'booleanGroup' | 'andGroup' | 'orGroup' | 'notGroup' | 'xorGroup' | 'impliesGroup';
102
+ /** Boolean operator type */
103
+ operator: 'and' | 'or' | 'not' | 'xor' | 'implies';
104
+ /** Minimum required true conditions (for atLeast scenarios) */
105
+ minimumRequired?: number;
106
+ /** Exact required true conditions (for exactly scenarios) */
107
+ exactRequired?: number;
108
+ /** Optional metadata for group validation */
109
+ metadata?: SpecificationMetadata;
110
+ }
111
+ interface ConditionalValidatorConfig {
112
+ type: 'requiredIf' | 'visibleIf' | 'disabledIf' | 'readonlyIf';
113
+ /** Specific validator type (mirrors type for backward compatibility) */
114
+ validatorType: 'requiredIf' | 'visibleIf' | 'disabledIf' | 'readonlyIf';
115
+ /** Target field to apply conditional logic */
116
+ targetField: string;
117
+ /** Optional single condition (legacy support) */
118
+ condition?: RuleNode;
119
+ /** Multiple conditions for advanced mode */
120
+ conditions?: RuleNode[];
121
+ /** Reference to condition rule node ID (for backward compatibility) */
122
+ conditionNodeId?: string;
123
+ /** Whether to invert the condition result */
124
+ inverse?: boolean;
125
+ /** Logic operator to combine multiple conditions */
126
+ logicOperator?: 'and' | 'or';
127
+ /** Custom error message */
128
+ errorMessage?: string;
129
+ /** Validate on value change */
130
+ validateOnChange?: boolean;
131
+ /** Validate on blur */
132
+ validateOnBlur?: boolean;
133
+ /** Show error immediately */
134
+ showErrorImmediately?: boolean;
135
+ /** Animation type */
136
+ animation?: string;
137
+ /** Hide field label */
138
+ hideLabel?: boolean;
139
+ /** Preserve space when hidden */
140
+ preserveSpace?: boolean;
141
+ /** Style when disabled */
142
+ disabledStyle?: string;
143
+ /** Clear value when disabled */
144
+ clearOnDisable?: boolean;
145
+ /** Show disabled message */
146
+ showDisabledMessage?: boolean;
147
+ /** Custom disabled message */
148
+ disabledMessage?: string;
149
+ /** Readonly style */
150
+ readonlyStyle?: string;
151
+ /** Show readonly indicator */
152
+ showReadonlyIndicator?: boolean;
153
+ /** Metadata aligned with @praxisui/specification */
154
+ metadata?: SpecificationMetadata;
155
+ }
156
+ interface CollectionValidationConfig {
157
+ type: 'collectionValidation';
158
+ /** Type of collection validation */
159
+ validationType: 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength';
160
+ /** Array field to validate */
161
+ arrayField: string;
162
+ /** Reference to rule node ID for forEach validation */
163
+ itemCondition?: string;
164
+ /** Property name for uniqueBy validation */
165
+ uniqueKey?: string;
166
+ /** Length value for min/max length validation */
167
+ lengthValue?: number;
168
+ /** Optional metadata for validation */
169
+ metadata?: SpecificationMetadata;
170
+ }
171
+ /**
172
+ * Enhanced collection validator configuration (Phase 2 Implementation)
173
+ * Aligned with @praxisui/specification collection validation patterns
174
+ */
175
+ interface CollectionValidatorConfig {
176
+ type: 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength';
177
+ /** Target collection field name */
178
+ targetCollection: string;
179
+ /** Variable name for current item in forEach */
180
+ itemVariable?: string;
181
+ /** Variable name for current index in forEach */
182
+ indexVariable?: string;
183
+ /** Validation rules applied to each item */
184
+ itemValidationRules?: {
185
+ ruleType: string;
186
+ fieldPath: string;
187
+ errorMessage?: string;
188
+ }[];
189
+ /** Fields to check uniqueness by */
190
+ uniqueByFields?: string[];
191
+ /** Case-sensitive uniqueness check */
192
+ caseSensitive?: boolean;
193
+ /** Ignore empty values in uniqueness check */
194
+ ignoreEmpty?: boolean;
195
+ /** Custom error message for duplicates */
196
+ duplicateErrorMessage?: string;
197
+ /** Minimum number of items */
198
+ minItems?: number;
199
+ /** Maximum number of items */
200
+ maxItems?: number;
201
+ /** Custom error message for length validation */
202
+ lengthErrorMessage?: string;
203
+ /** Show current item count in UI */
204
+ showItemCount?: boolean;
205
+ /** Prevent adding items beyond maxItems */
206
+ preventExcess?: boolean;
207
+ /** Validate when items are added */
208
+ validateOnAdd?: boolean;
209
+ /** Validate when items are removed */
210
+ validateOnRemove?: boolean;
211
+ /** Validate when items are changed */
212
+ validateOnChange?: boolean;
213
+ /** Validate on form submit */
214
+ validateOnSubmit?: boolean;
215
+ /** Error display strategy */
216
+ errorStrategy?: 'summary' | 'inline' | 'both';
217
+ /** Stop validation on first error */
218
+ stopOnFirstError?: boolean;
219
+ /** Highlight items with errors */
220
+ highlightErrorItems?: boolean;
221
+ /** Batch size for large collections */
222
+ batchSize?: number;
223
+ /** Debounce validation for performance */
224
+ debounceValidation?: boolean;
225
+ /** Debounce delay in milliseconds */
226
+ debounceDelay?: number;
227
+ /** Optional metadata for validation messages */
228
+ metadata?: SpecificationMetadata;
229
+ }
230
+ interface FunctionCallConfig {
231
+ type: 'functionCall';
232
+ /** Name of the function to call */
233
+ functionName: string;
234
+ /** Function parameters with type information */
235
+ parameters: FunctionParameter[];
236
+ /** Optional metadata for validation */
237
+ metadata?: SpecificationMetadata;
238
+ }
239
+ interface FunctionParameter {
240
+ /** Parameter name */
241
+ name: string;
242
+ /** Parameter value */
243
+ value: unknown;
244
+ /** Type of parameter value */
245
+ valueType: ValueType;
246
+ /** Field name if valueType is 'field' */
247
+ fieldName?: string;
248
+ /** Context variable name if valueType is 'context' */
249
+ contextVariable?: string;
250
+ }
251
+ interface FieldToFieldConfig {
252
+ type: 'fieldToField';
253
+ /** Left side field name */
254
+ leftField: string;
255
+ /** Comparison operator */
256
+ operator: ValidComparisonOperator | string;
257
+ /** Right side field name */
258
+ rightField: string;
259
+ /** Transform functions applied to left field */
260
+ leftTransforms?: string[];
261
+ /** Transform functions applied to right field */
262
+ rightTransforms?: string[];
263
+ /** Optional metadata for validation */
264
+ metadata?: SpecificationMetadata;
265
+ }
266
+ interface ContextualConfig$1 {
267
+ type: 'contextual';
268
+ /** Template string with context placeholders */
269
+ template: string;
270
+ /** Available context variables */
271
+ contextVariables: Record<string, unknown>;
272
+ /** Optional context provider for dynamic values */
273
+ contextProvider?: ContextProvider;
274
+ /** Strict validation of context tokens */
275
+ strictContextValidation?: boolean;
276
+ /** Optional metadata */
277
+ metadata?: SpecificationMetadata;
278
+ }
279
+ interface CardinalityConfig {
280
+ type: 'cardinality';
281
+ /** Type of cardinality check */
282
+ cardinalityType: 'atLeast' | 'exactly';
283
+ /** Required count of true conditions */
284
+ count: number;
285
+ /** References to rule node IDs to evaluate */
286
+ conditions: string[];
287
+ /** Optional metadata for validation */
288
+ metadata?: SpecificationMetadata;
289
+ }
290
+ interface CustomConfig {
291
+ type: 'custom';
292
+ /** Custom configuration type identifier */
293
+ customType: string;
294
+ /** Custom properties specific to the type */
295
+ properties: Record<string, unknown>;
296
+ /** Optional metadata for validation */
297
+ metadata?: SpecificationMetadata;
298
+ }
299
+ /**
300
+ * Validator types for conditional validation
301
+ */
302
+ declare enum ConditionalValidatorType {
303
+ REQUIRED_IF = "requiredIf",
304
+ VISIBLE_IF = "visibleIf",
305
+ DISABLED_IF = "disabledIf",
306
+ READONLY_IF = "readonlyIf"
307
+ }
308
+ /**
309
+ * Preview data for conditional validator simulation
310
+ */
311
+ interface ConditionalValidatorPreview {
312
+ targetField: string;
313
+ currentValue: unknown;
314
+ conditionResult: boolean;
315
+ validatorType: ConditionalValidatorType;
316
+ resultingState: {
317
+ isRequired?: boolean;
318
+ isVisible?: boolean;
319
+ isDisabled?: boolean;
320
+ isReadonly?: boolean;
321
+ };
322
+ example: string;
323
+ }
324
+ /**
325
+ * Rule building session state
326
+ */
327
+ interface RuleBuilderState {
328
+ /** All rule nodes in the current session */
329
+ nodes: Record<string, RuleNode>;
330
+ /** Root node IDs (top-level rules) */
331
+ rootNodes: string[];
332
+ /** Currently selected node ID */
333
+ selectedNodeId?: string;
334
+ /** Current DSL representation */
335
+ currentDSL?: string;
336
+ /** Current JSON representation */
337
+ currentJSON?: unknown;
338
+ /** Validation errors */
339
+ validationErrors: ValidationError$1[];
340
+ /** Build mode */
341
+ mode: 'visual' | 'dsl' | 'json';
342
+ /** Whether the rule is dirty (has unsaved changes) */
343
+ isDirty: boolean;
344
+ /** Undo/redo history */
345
+ history: RuleBuilderSnapshot[];
346
+ /** Current history position */
347
+ historyPosition: number;
348
+ }
349
+ interface ValidationError$1 {
350
+ /** Error ID */
351
+ id: string;
352
+ /** Error message */
353
+ message: string;
354
+ /** Error severity */
355
+ severity: 'error' | 'warning' | 'info';
356
+ /** Associated node ID */
357
+ nodeId?: string;
358
+ /** Error code for programmatic handling */
359
+ code?: string;
360
+ /** Suggested fix */
361
+ suggestion?: string;
362
+ }
363
+ interface RuleBuilderSnapshot {
364
+ /** Timestamp of this snapshot */
365
+ timestamp: number;
366
+ /** Description of the change */
367
+ description: string;
368
+ /** Complete state at this point */
369
+ state: {
370
+ nodes: Record<string, RuleNode>;
371
+ rootNodes: string[];
372
+ selectedNodeId?: string;
373
+ };
374
+ }
375
+ /**
376
+ * Rule template for common scenarios
377
+ */
378
+ interface RuleTemplate {
379
+ /** Template ID */
380
+ id: string;
381
+ /** Template name */
382
+ name: string;
383
+ /** Template description */
384
+ description: string;
385
+ /** Template category */
386
+ category: string;
387
+ /** Template tags for search */
388
+ tags: string[];
389
+ /** Rule nodes that make up this template */
390
+ nodes: RuleNode[];
391
+ /** Root node IDs */
392
+ rootNodes: string[];
393
+ /** Required field schemas for this template */
394
+ requiredFields?: string[];
395
+ /** Example usage */
396
+ example?: string;
397
+ /** Template preview image/icon */
398
+ icon?: string;
399
+ /** Template metadata */
400
+ metadata?: TemplateMetadata;
401
+ }
402
+ /**
403
+ * Template metadata for tracking and management
404
+ */
405
+ interface TemplateMetadata {
406
+ /** Creation date */
407
+ createdAt?: Date;
408
+ /** Last update date */
409
+ updatedAt?: Date;
410
+ /** Last used date */
411
+ lastUsed?: Date;
412
+ /** Import date (if imported) */
413
+ importedAt?: Date;
414
+ /** Template version */
415
+ version?: string;
416
+ /** Usage count */
417
+ usageCount?: number;
418
+ /** Template complexity */
419
+ complexity?: 'simple' | 'medium' | 'complex';
420
+ /** Original template ID (for imports/copies) */
421
+ originalId?: string;
422
+ /** Author information */
423
+ author?: {
424
+ name?: string;
425
+ email?: string;
426
+ organization?: string;
427
+ };
428
+ /** Template size metrics */
429
+ metrics?: {
430
+ nodeCount?: number;
431
+ maxDepth?: number;
432
+ fieldCount?: number;
433
+ };
434
+ }
435
+ /**
436
+ * Export options for rules
437
+ */
438
+ interface ExportOptions {
439
+ /** Export format */
440
+ format: 'json' | 'dsl' | 'typescript' | 'form-config';
441
+ /** Include metadata in export */
442
+ includeMetadata?: boolean;
443
+ /** Pretty print JSON/DSL */
444
+ prettyPrint?: boolean;
445
+ /** Include comments in DSL */
446
+ includeComments?: boolean;
447
+ /** Metadata position in DSL */
448
+ metadataPosition?: 'before' | 'after' | 'inline';
449
+ /** TypeScript interface name (for TS export) */
450
+ interfaceName?: string;
451
+ /** Additional export configuration */
452
+ config?: Record<string, unknown>;
453
+ }
454
+ /**
455
+ * Import options for rules
456
+ */
457
+ interface ImportOptions {
458
+ /** Source format */
459
+ format: 'json' | 'dsl' | 'form-config';
460
+ /** Whether to merge with existing rules */
461
+ merge?: boolean;
462
+ /** Whether to preserve existing metadata */
463
+ preserveMetadata?: boolean;
464
+ /** Field schema mapping for validation */
465
+ fieldSchemas?: Record<string, unknown>;
466
+ }
467
+ /**
468
+ * Rule builder configuration
469
+ */
470
+ interface RuleBuilderConfig {
471
+ /** Available field schemas */
472
+ fieldSchemas: Record<string, unknown>;
473
+ /** Context variables */
474
+ contextVariables?: unknown[];
475
+ /** Custom functions */
476
+ customFunctions?: unknown[];
477
+ /** Available rule templates */
478
+ templates?: RuleTemplate[];
479
+ /** UI configuration */
480
+ ui?: {
481
+ /** Theme */
482
+ theme?: 'light' | 'dark' | 'auto';
483
+ /** Show advanced features */
484
+ showAdvanced?: boolean;
485
+ /** Enable drag and drop */
486
+ enableDragDrop?: boolean;
487
+ /** Show DSL preview */
488
+ showDSLPreview?: boolean;
489
+ /** Show validation errors inline */
490
+ showInlineErrors?: boolean;
491
+ /** Auto-save interval (ms) */
492
+ autoSaveInterval?: number;
493
+ };
494
+ /** Validation configuration */
495
+ validation?: {
496
+ /** Enable real-time validation */
497
+ realTime?: boolean;
498
+ /** Validation strictness */
499
+ strictness?: 'strict' | 'normal' | 'loose';
500
+ /** Custom validation rules */
501
+ customRules?: unknown[];
502
+ };
503
+ /** Export/import configuration */
504
+ exportImport?: {
505
+ /** Default export format */
506
+ defaultExportFormat?: 'json' | 'dsl' | 'typescript';
507
+ /** Supported formats */
508
+ supportedFormats?: string[];
509
+ /** Include metadata by default */
510
+ includeMetadataByDefault?: boolean;
511
+ };
512
+ }
513
+ /**
514
+ * Configuration for optional field handling
515
+ */
516
+ interface OptionalFieldConfig {
517
+ type: 'optionalField';
518
+ /** Type of optional field validation */
519
+ validationType: 'ifDefined' | 'ifNotNull' | 'ifExists' | 'withDefault';
520
+ /** Target field name */
521
+ fieldName: string;
522
+ /** Default value when field is undefined/null */
523
+ defaultValue?: unknown;
524
+ /** Reference to condition rule node ID */
525
+ conditionNodeId?: string;
526
+ /** Optional metadata for validation */
527
+ metadata?: SpecificationMetadata;
528
+ }
529
+ /**
530
+ * Configuration for expression specifications (aligned with @praxisui/specification)
531
+ */
532
+ interface ExpressionConfig {
533
+ type: 'expression';
534
+ /** DSL expression string */
535
+ expression: string;
536
+ /** Function registry for validation */
537
+ functionRegistry?: FunctionRegistry<unknown>;
538
+ /** Context provider for variable resolution */
539
+ contextProvider?: ContextProvider;
540
+ /** Known field names for validation */
541
+ knownFields?: string[];
542
+ /** Enable performance warnings */
543
+ enablePerformanceWarnings?: boolean;
544
+ /** Maximum expression complexity */
545
+ maxComplexity?: number;
546
+ /** Metadata aligned with @praxisui/specification */
547
+ metadata?: SpecificationMetadata;
548
+ }
549
+ /**
550
+ * Configuration for contextual template specifications (aligned with @praxisui/specification)
551
+ */
552
+ interface ContextualTemplateConfig {
553
+ type: 'contextualTemplate';
554
+ /** Template string with context tokens */
555
+ template: string;
556
+ /** Available context variables */
557
+ contextVariables?: Record<string, unknown>;
558
+ /** Context provider instance */
559
+ contextProvider?: ContextProvider;
560
+ /** Enable strict validation of context tokens */
561
+ strictContextValidation?: boolean;
562
+ /** Metadata aligned with @praxisui/specification */
563
+ metadata?: SpecificationMetadata;
564
+ }
565
+
566
+ declare class PraxisVisualBuilder {
567
+ config: RuleBuilderConfig | null;
568
+ initialRules: any;
569
+ rulesChanged: EventEmitter<any>;
570
+ exportRequested: EventEmitter<ExportOptions>;
571
+ importRequested: EventEmitter<ImportOptions>;
572
+ onRulesChanged(rules: any): void;
573
+ onExportRequested(options: ExportOptions): void;
574
+ onImportRequested(options: ImportOptions): void;
575
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisVisualBuilder, never>;
576
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisVisualBuilder, "praxis-visual-builder", never, { "config": { "alias": "config"; "required": false; }; "initialRules": { "alias": "initialRules"; "required": false; }; }, { "rulesChanged": "rulesChanged"; "exportRequested": "exportRequested"; "importRequested": "importRequested"; }, never, never, true, never>;
577
+ }
578
+
579
+ /**
580
+ * Field schema model for dynamic field configuration in the Visual Builder
581
+ */
582
+ interface FieldSchema {
583
+ /** Unique field identifier */
584
+ name: string;
585
+ /** Human-readable field label */
586
+ label: string;
587
+ /** Field data type */
588
+ type: FieldType;
589
+ /** Optional description or help text */
590
+ description?: string;
591
+ /** Whether this field is required */
592
+ required?: boolean;
593
+ /** Allowed values for enum/select fields */
594
+ allowedValues?: FieldOption[];
595
+ /** Format constraints for the field */
596
+ format?: FieldFormat;
597
+ /** UI configuration for field display */
598
+ uiConfig?: FieldUIConfig;
599
+ /** Nested fields for object types */
600
+ properties?: Record<string, FieldSchema>;
601
+ /** Item schema for array types */
602
+ items?: FieldSchema;
603
+ }
604
+ interface FieldOption {
605
+ /** Option value */
606
+ value: any;
607
+ /** Option display label */
608
+ label: string;
609
+ /** Optional description */
610
+ description?: string;
611
+ /** Whether this option is disabled */
612
+ disabled?: boolean;
613
+ }
614
+ interface FieldFormat {
615
+ /** Minimum value (for numbers) or length (for strings/arrays) */
616
+ minimum?: number;
617
+ /** Maximum value (for numbers) or length (for strings/arrays) */
618
+ maximum?: number;
619
+ /** Regular expression pattern for string validation */
620
+ pattern?: string;
621
+ /** Date format for date fields */
622
+ dateFormat?: string;
623
+ /** Number format options */
624
+ numberFormat?: {
625
+ decimals?: number;
626
+ currency?: string;
627
+ percentage?: boolean;
628
+ };
629
+ }
630
+ interface FieldUIConfig {
631
+ /** Icon to display with the field */
632
+ icon?: string;
633
+ /** Color theme for the field */
634
+ color?: string;
635
+ /** Field category for grouping */
636
+ category?: string;
637
+ /** Field priority for sorting */
638
+ priority?: number;
639
+ /** Whether to show this field in simple mode */
640
+ showInSimpleMode?: boolean;
641
+ /** Custom CSS classes */
642
+ cssClass?: string;
643
+ }
644
+ declare enum FieldType {
645
+ STRING = "string",
646
+ NUMBER = "number",
647
+ INTEGER = "integer",
648
+ BOOLEAN = "boolean",
649
+ DATE = "date",
650
+ DATETIME = "datetime",
651
+ TIME = "time",
652
+ EMAIL = "email",
653
+ URL = "url",
654
+ PHONE = "phone",
655
+ ARRAY = "array",
656
+ OBJECT = "object",
657
+ ENUM = "enum",
658
+ UUID = "uuid",
659
+ JSON = "json"
660
+ }
661
+ /**
662
+ * Available comparison operators for each field type
663
+ */
664
+ declare const FIELD_TYPE_OPERATORS: Record<FieldType, string[]>;
665
+ /**
666
+ * Operator display labels for UI
667
+ */
668
+ declare const OPERATOR_LABELS: Record<string, string>;
669
+ /**
670
+ * Context for field schema interpretation
671
+ */
672
+ interface FieldSchemaContext {
673
+ /** Available context variables (e.g., ${user.role}, ${now}) */
674
+ contextVariables?: ContextVariable[];
675
+ /** Available custom functions */
676
+ customFunctions?: CustomFunction[];
677
+ /** Global configuration */
678
+ config?: {
679
+ /** Whether to show advanced features */
680
+ showAdvanced?: boolean;
681
+ /** Default locale for formatting */
682
+ locale?: string;
683
+ /** Theme configuration */
684
+ theme?: 'light' | 'dark' | 'auto';
685
+ };
686
+ }
687
+ interface ContextVariable {
688
+ /** Variable name (without ${} wrapper) */
689
+ name: string;
690
+ /** Display label */
691
+ label: string;
692
+ /** Variable type */
693
+ type: FieldType;
694
+ /** Example value for preview */
695
+ example?: any;
696
+ /** Description */
697
+ description?: string;
698
+ }
699
+ interface CustomFunction {
700
+ /** Function name */
701
+ name: string;
702
+ /** Display label */
703
+ label: string;
704
+ /** Function description */
705
+ description?: string;
706
+ /** Expected parameter types */
707
+ parameters: {
708
+ name: string;
709
+ type: FieldType;
710
+ required?: boolean;
711
+ description?: string;
712
+ }[];
713
+ /** Return type */
714
+ returnType: FieldType;
715
+ /** Example usage */
716
+ example?: string;
717
+ }
718
+
719
+ /**
720
+ * Array Field Schema Support for Collection Validators
721
+ * Phase 2 Implementation
722
+ */
723
+
724
+ /**
725
+ * Extended field schema for array types
726
+ */
727
+ interface ArrayFieldSchema extends FieldSchema {
728
+ type: FieldType.ARRAY;
729
+ /** Schema for individual items in the array */
730
+ itemSchema?: FieldSchema;
731
+ /** Minimum number of items */
732
+ minItems?: number;
733
+ /** Maximum number of items */
734
+ maxItems?: number;
735
+ /** Whether items must be unique */
736
+ uniqueItems?: boolean;
737
+ /** Fields to check for uniqueness */
738
+ uniqueBy?: string[];
739
+ /** Default value for new items */
740
+ defaultItem?: any;
741
+ /** Whether to allow adding items */
742
+ allowAdd?: boolean;
743
+ /** Whether to allow removing items */
744
+ allowRemove?: boolean;
745
+ /** Whether to allow reordering items */
746
+ allowReorder?: boolean;
747
+ /** Custom validation rules for the array */
748
+ arrayValidation?: {
749
+ forEach?: {
750
+ rules: any[];
751
+ stopOnFirstError?: boolean;
752
+ };
753
+ uniqueBy?: {
754
+ fields: string[];
755
+ caseSensitive?: boolean;
756
+ ignoreEmpty?: boolean;
757
+ };
758
+ length?: {
759
+ min?: number;
760
+ max?: number;
761
+ errorMessage?: string;
762
+ };
763
+ };
764
+ /** UI configuration specific to arrays */
765
+ arrayUiConfig?: {
766
+ /** How to display the array */
767
+ displayMode?: 'table' | 'cards' | 'list' | 'accordion';
768
+ /** Whether to show item count */
769
+ showCount?: boolean;
770
+ /** Custom add button text */
771
+ addButtonText?: string;
772
+ /** Custom remove button text */
773
+ removeButtonText?: string;
774
+ /** Whether to confirm before removing */
775
+ confirmRemove?: boolean;
776
+ /** Message to show when array is empty */
777
+ emptyMessage?: string;
778
+ /** Whether to collapse items by default */
779
+ collapsedByDefault?: boolean;
780
+ /** Maximum items to show before pagination */
781
+ pageSize?: number;
782
+ };
783
+ }
784
+ /**
785
+ * Utility to check if a field schema is an array
786
+ */
787
+ declare function isArrayFieldSchema(schema: FieldSchema): schema is ArrayFieldSchema;
788
+ /**
789
+ * Utility to get nested field paths from an array schema
790
+ */
791
+ declare function getArrayItemFieldPaths(schema: ArrayFieldSchema, prefix?: string): string[];
792
+ /**
793
+ * Array validation context for runtime validation
794
+ */
795
+ interface ArrayValidationContext {
796
+ /** The array being validated */
797
+ array: any[];
798
+ /** Current item being validated (for forEach) */
799
+ currentItem?: any;
800
+ /** Current item index (for forEach) */
801
+ currentIndex?: number;
802
+ /** Parent context */
803
+ parentContext?: any;
804
+ /** Field schema */
805
+ schema: ArrayFieldSchema;
806
+ /** Accumulated errors */
807
+ errors: ArrayValidationError[];
808
+ }
809
+ /**
810
+ * Array validation error
811
+ */
812
+ interface ArrayValidationError {
813
+ /** Error type */
814
+ type: 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength' | 'other';
815
+ /** Error message */
816
+ message: string;
817
+ /** Item index (if applicable) */
818
+ itemIndex?: number;
819
+ /** Field path within item (if applicable) */
820
+ fieldPath?: string;
821
+ /** Duplicate indices (for uniqueBy) */
822
+ duplicateIndices?: number[];
823
+ /** Expected value */
824
+ expected?: any;
825
+ /** Actual value */
826
+ actual?: any;
827
+ }
828
+ /**
829
+ * Array field analyzer for detecting array fields in schemas
830
+ */
831
+ declare class ArrayFieldAnalyzer {
832
+ /**
833
+ * Analyze a schema tree and find all array fields
834
+ */
835
+ static findArrayFields(schemas: Record<string, FieldSchema>): Record<string, ArrayFieldSchema>;
836
+ /**
837
+ * Get validation rules for an array field
838
+ */
839
+ static getValidationRules(schema: ArrayFieldSchema): ArrayCollectionValidationRule[];
840
+ }
841
+ /**
842
+ * Array collection validation rule
843
+ */
844
+ interface ArrayCollectionValidationRule {
845
+ type: 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength';
846
+ value?: any;
847
+ fields?: string[];
848
+ rules?: any[];
849
+ message: string;
850
+ }
851
+
852
+ declare class FieldSchemaService {
853
+ private readonly _fieldSchemas;
854
+ private readonly _context;
855
+ readonly fieldSchemas$: Observable<Record<string, FieldSchema>>;
856
+ readonly context$: Observable<FieldSchemaContext>;
857
+ constructor();
858
+ /**
859
+ * Set field schemas for the visual builder
860
+ */
861
+ setFieldSchemas(schemas: Record<string, FieldSchema>): void;
862
+ /**
863
+ * Add a single field schema
864
+ */
865
+ addFieldSchema(name: string, schema: FieldSchema): void;
866
+ /**
867
+ * Remove a field schema
868
+ */
869
+ removeFieldSchema(name: string): void;
870
+ /**
871
+ * Get field schema by name
872
+ */
873
+ getFieldSchema(name: string): FieldSchema | undefined;
874
+ /**
875
+ * Get all field schemas
876
+ */
877
+ getAllFieldSchemas(): Record<string, FieldSchema>;
878
+ /**
879
+ * Get field schemas as array with enhanced info
880
+ */
881
+ getFieldSchemasArray(): Observable<EnhancedFieldSchema[]>;
882
+ /**
883
+ * Set context for field schemas
884
+ */
885
+ setContext(context: FieldSchemaContext): void;
886
+ /**
887
+ * Get available operators for a field type
888
+ */
889
+ getAvailableOperators(fieldType: FieldType): string[];
890
+ /**
891
+ * Get operator labels for a field type
892
+ */
893
+ getOperatorLabels(fieldType: FieldType): Record<string, string>;
894
+ /**
895
+ * Validate field value against schema
896
+ */
897
+ validateFieldValue(fieldName: string, value: any): ValidationResult;
898
+ /**
899
+ * Get field suggestions based on partial input
900
+ */
901
+ getFieldSuggestions(partial: string, category?: string): FieldSchema[];
902
+ /**
903
+ * Create field schema from JSON Schema
904
+ */
905
+ createFromJsonSchema(jsonSchema: any): Record<string, FieldSchema>;
906
+ /**
907
+ * Create field schema from form metadata
908
+ */
909
+ createFromFormMetadata(formFields: any[]): Record<string, FieldSchema>;
910
+ /**
911
+ * Get context variables
912
+ */
913
+ getContextVariables(): Observable<ContextVariable[]>;
914
+ /**
915
+ * Get custom functions
916
+ */
917
+ getCustomFunctions(): Observable<CustomFunction[]>;
918
+ /**
919
+ * Group field schemas by category
920
+ */
921
+ getFieldSchemasByCategory(): Observable<Record<string, FieldSchema[]>>;
922
+ private isValidType;
923
+ private validateFormat;
924
+ private convertJsonSchemaProperty;
925
+ private mapJsonSchemaType;
926
+ private mapFormFieldType;
927
+ private extractFormatFromField;
928
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldSchemaService, never>;
929
+ static ɵprov: i0.ɵɵInjectableDeclaration<FieldSchemaService>;
930
+ }
931
+ interface EnhancedFieldSchema extends FieldSchema {
932
+ operators: string[];
933
+ operatorLabels: Record<string, string>;
934
+ }
935
+ interface ValidationResult {
936
+ valid: boolean;
937
+ errors: string[];
938
+ }
939
+
940
+ interface DslContextVariable {
941
+ /** Variable name */
942
+ name: string;
943
+ /** Variable type */
944
+ type: 'string' | 'number' | 'boolean' | 'date' | 'object' | 'array';
945
+ /** Variable scope */
946
+ scope: 'user' | 'session' | 'env' | 'global';
947
+ /** Description */
948
+ description?: string;
949
+ /** Example value */
950
+ example?: string;
951
+ }
952
+
953
+ /**
954
+ * Registry service for managing RuleNode instances and their relationships.
955
+ * Solves the core problem of resolving string IDs to actual RuleNode objects.
956
+ */
957
+ declare class RuleNodeRegistryService {
958
+ private nodes;
959
+ private nodesSubject;
960
+ /**
961
+ * Observable stream of all registered nodes
962
+ */
963
+ nodes$: Observable<Map<string, RuleNode>>;
964
+ /**
965
+ * Register a node in the registry
966
+ */
967
+ register(node: RuleNode): void;
968
+ /**
969
+ * Register multiple nodes at once
970
+ */
971
+ registerAll(nodes: RuleNode[]): void;
972
+ /**
973
+ * Unregister a node from the registry
974
+ */
975
+ unregister(nodeId: string): boolean;
976
+ /**
977
+ * Resolve a node by its ID
978
+ */
979
+ resolve(nodeId: string): RuleNode | null;
980
+ /**
981
+ * Retrieve a node synchronously by its ID.
982
+ *
983
+ * Provided for backwards compatibility with code that expected a
984
+ * synchronous `getNode` API. Internally this simply delegates to
985
+ * {@link resolve}.
986
+ */
987
+ getNode(nodeId: string): RuleNode | null;
988
+ /**
989
+ * Resolve multiple nodes by their IDs
990
+ */
991
+ resolveMultiple(nodeIds: string[]): RuleNode[];
992
+ /**
993
+ * Resolve children nodes for a given node
994
+ */
995
+ resolveChildren(node: RuleNode): RuleNode[];
996
+ /**
997
+ * Get all nodes that have the specified parent ID
998
+ */
999
+ getChildrenOf(parentId: string): RuleNode[];
1000
+ /**
1001
+ * Get the parent node of a given node
1002
+ */
1003
+ getParent(node: RuleNode): RuleNode | null;
1004
+ /**
1005
+ * Get all root nodes (nodes without parents)
1006
+ */
1007
+ getRootNodes(): RuleNode[];
1008
+ /**
1009
+ * Check if a node exists in the registry
1010
+ */
1011
+ exists(nodeId: string): boolean;
1012
+ /**
1013
+ * Get all registered node IDs
1014
+ */
1015
+ getAllIds(): string[];
1016
+ /**
1017
+ * Get all registered nodes
1018
+ */
1019
+ getAllNodes(): RuleNode[];
1020
+ /**
1021
+ * Clear all nodes from the registry
1022
+ */
1023
+ clear(): void;
1024
+ /**
1025
+ * Get the size of the registry
1026
+ */
1027
+ size(): number;
1028
+ /**
1029
+ * Remove orphaned nodes (nodes without parents and not referenced by others)
1030
+ */
1031
+ cleanupOrphanedNodes(): string[];
1032
+ /**
1033
+ * Detect circular references in the registry
1034
+ */
1035
+ detectCircularReferences(): CircularReference[];
1036
+ /**
1037
+ * Get memory usage statistics
1038
+ */
1039
+ getMemoryStats(): MemoryStats;
1040
+ /**
1041
+ * Validate registry integrity
1042
+ */
1043
+ validateIntegrity(): RegistryIntegrityResult;
1044
+ /**
1045
+ * Perform automatic cleanup operations
1046
+ */
1047
+ performCleanup(): CleanupResult;
1048
+ /**
1049
+ * Build a tree structure starting from root nodes
1050
+ */
1051
+ buildTree(): RuleNodeTree[];
1052
+ /**
1053
+ * Build tree structure for a specific node
1054
+ */
1055
+ buildNodeTree(node: RuleNode): RuleNodeTree;
1056
+ /**
1057
+ * Find nodes by a predicate function
1058
+ */
1059
+ findNodes(predicate: (node: RuleNode) => boolean): RuleNode[];
1060
+ /**
1061
+ * Find nodes by type
1062
+ */
1063
+ findNodesByType(type: string): RuleNode[];
1064
+ /**
1065
+ * Validate the graph structure integrity (legacy method for backward compatibility)
1066
+ */
1067
+ validateGraphIntegrity(): RegistryValidationResult;
1068
+ /**
1069
+ * Check if a node has circular references
1070
+ */
1071
+ private hasCircularReference;
1072
+ /**
1073
+ * Get observable for a specific node
1074
+ */
1075
+ getNode$(nodeId: string): Observable<RuleNode | null>;
1076
+ /**
1077
+ * Get observable for children of a node
1078
+ */
1079
+ getChildren$(nodeId: string): Observable<RuleNode[]>;
1080
+ private notifyChange;
1081
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleNodeRegistryService, never>;
1082
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleNodeRegistryService>;
1083
+ }
1084
+ /**
1085
+ * Tree structure for representing node hierarchies
1086
+ */
1087
+ interface RuleNodeTree {
1088
+ node: RuleNode;
1089
+ children: RuleNodeTree[];
1090
+ }
1091
+ /**
1092
+ * Result of registry integrity validation
1093
+ */
1094
+ interface RegistryValidationResult {
1095
+ isValid: boolean;
1096
+ errors: string[];
1097
+ warnings: string[];
1098
+ }
1099
+ /**
1100
+ * Circular reference information
1101
+ */
1102
+ interface CircularReference {
1103
+ cycle: string[];
1104
+ affectedNodes: string[];
1105
+ }
1106
+ /**
1107
+ * Memory usage statistics
1108
+ */
1109
+ interface MemoryStats {
1110
+ totalNodes: number;
1111
+ estimatedSizeBytes: number;
1112
+ breakdown: {
1113
+ config: number;
1114
+ children: number;
1115
+ metadata: number;
1116
+ other: number;
1117
+ };
1118
+ }
1119
+ /**
1120
+ * Registry integrity validation result
1121
+ */
1122
+ interface RegistryIntegrityResult {
1123
+ isValid: boolean;
1124
+ issues: string[];
1125
+ warnings: string[];
1126
+ circularReferences: CircularReference[];
1127
+ memoryStats: MemoryStats;
1128
+ }
1129
+ /**
1130
+ * Cleanup operation result
1131
+ */
1132
+ interface CleanupResult {
1133
+ orphanedNodesRemoved: string[];
1134
+ circularReferencesDetected: CircularReference[];
1135
+ memoryFreed: number;
1136
+ }
1137
+
1138
+ /**
1139
+ * Context interface for rule conversion operations
1140
+ * Eliminates circular dependencies between converters and factory
1141
+ */
1142
+ interface ConversionContext {
1143
+ /**
1144
+ * Convert a child node to a specification
1145
+ * This method is provided by the factory to avoid circular dependencies
1146
+ */
1147
+ convertChild<T extends object = any>(node: RuleNode): Specification<T>;
1148
+ /**
1149
+ * Convert multiple child nodes to specifications
1150
+ */
1151
+ convertChildren<T extends object = any>(nodes: RuleNode[]): Specification<T>[];
1152
+ /**
1153
+ * Check if a node type is supported
1154
+ */
1155
+ isSupported(nodeType: string): boolean;
1156
+ /**
1157
+ * Validate that a node can be converted
1158
+ */
1159
+ validateNode(node: RuleNode): {
1160
+ isValid: boolean;
1161
+ errors: string[];
1162
+ };
1163
+ }
1164
+
1165
+ /**
1166
+ * Interface for rule converters that transform RuleNodes to Specifications
1167
+ */
1168
+ interface RuleConverter {
1169
+ /**
1170
+ * Convert a RuleNode to a Specification
1171
+ * @param node The node to convert
1172
+ * @param context Context providing access to child conversion capabilities
1173
+ */
1174
+ convert<T extends object = any>(node: RuleNode, context?: ConversionContext): Specification<T>;
1175
+ /**
1176
+ * Check if this converter can handle the given node type
1177
+ */
1178
+ canConvert(nodeType: string): boolean;
1179
+ /**
1180
+ * Get the supported node types
1181
+ */
1182
+ getSupportedTypes(): string[];
1183
+ /**
1184
+ * Set the conversion context (called by factory during initialization)
1185
+ */
1186
+ setContext?(context: ConversionContext): void;
1187
+ }
1188
+ /**
1189
+ * Base abstract class for rule converters
1190
+ */
1191
+ declare abstract class BaseRuleConverter implements RuleConverter {
1192
+ protected abstract supportedTypes: string[];
1193
+ protected context?: ConversionContext;
1194
+ abstract convert<T extends object = any>(node: RuleNode, context?: ConversionContext): Specification<T>;
1195
+ /**
1196
+ * Set the conversion context
1197
+ */
1198
+ setContext(context: ConversionContext): void;
1199
+ canConvert(nodeType: string): boolean;
1200
+ getSupportedTypes(): string[];
1201
+ protected validateNode(node: RuleNode, expectedType?: string): void;
1202
+ }
1203
+
1204
+ /**
1205
+ * Converter for field condition rules to field specifications
1206
+ */
1207
+ declare class FieldConditionConverter extends BaseRuleConverter {
1208
+ protected supportedTypes: string[];
1209
+ convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
1210
+ private mapOperator;
1211
+ private convertValue;
1212
+ private inferAndConvertValue;
1213
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionConverter, never>;
1214
+ static ɵprov: i0.ɵɵInjectableDeclaration<FieldConditionConverter>;
1215
+ }
1216
+
1217
+ /**
1218
+ * Converter for boolean group rules (AND, OR, NOT, XOR, IMPLIES)
1219
+ */
1220
+ declare class BooleanGroupConverter extends BaseRuleConverter {
1221
+ private nodeRegistry;
1222
+ protected supportedTypes: string[];
1223
+ constructor(nodeRegistry: RuleNodeRegistryService);
1224
+ convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
1225
+ static ɵfac: i0.ɵɵFactoryDeclaration<BooleanGroupConverter, never>;
1226
+ static ɵprov: i0.ɵɵInjectableDeclaration<BooleanGroupConverter>;
1227
+ }
1228
+
1229
+ /**
1230
+ * Converter for cardinality rules (atLeast, exactly)
1231
+ */
1232
+ declare class CardinalityConverter extends BaseRuleConverter {
1233
+ private nodeRegistry;
1234
+ protected supportedTypes: string[];
1235
+ constructor(nodeRegistry: RuleNodeRegistryService);
1236
+ convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
1237
+ static ɵfac: i0.ɵɵFactoryDeclaration<CardinalityConverter, never>;
1238
+ static ɵprov: i0.ɵɵInjectableDeclaration<CardinalityConverter>;
1239
+ }
1240
+
1241
+ /**
1242
+ * Factory service for converting RuleNodes to Specifications
1243
+ * Uses Strategy pattern to delegate to appropriate converters
1244
+ */
1245
+ declare class ConverterFactoryService {
1246
+ private fieldConditionConverter;
1247
+ private booleanGroupConverter;
1248
+ private cardinalityConverter;
1249
+ private converters;
1250
+ private context;
1251
+ constructor(fieldConditionConverter: FieldConditionConverter, booleanGroupConverter: BooleanGroupConverter, cardinalityConverter: CardinalityConverter);
1252
+ /**
1253
+ * Convert a RuleNode to a Specification
1254
+ */
1255
+ convert<T extends object = any>(node: RuleNode): Specification<T>;
1256
+ /**
1257
+ * Get converter for a specific node type
1258
+ */
1259
+ getConverter(nodeType: string): RuleConverter | undefined;
1260
+ /**
1261
+ * Register a new converter
1262
+ */
1263
+ registerConverter(name: string, converter: RuleConverter): void;
1264
+ /**
1265
+ * Unregister a converter
1266
+ */
1267
+ unregisterConverter(name: string): boolean;
1268
+ /**
1269
+ * Get all supported node types
1270
+ */
1271
+ getSupportedTypes(): string[];
1272
+ /**
1273
+ * Check if a node type is supported
1274
+ */
1275
+ isSupported(nodeType: string): boolean;
1276
+ private initializeContext;
1277
+ /**
1278
+ * Internal convert method that bypasses context to avoid recursion
1279
+ */
1280
+ private convertInternal;
1281
+ private initializeConverters;
1282
+ /**
1283
+ * Convert multiple nodes to specifications
1284
+ */
1285
+ convertMultiple<T extends object = any>(nodes: RuleNode[]): Specification<T>[];
1286
+ /**
1287
+ * Validate that a node can be converted
1288
+ */
1289
+ validateNode(node: RuleNode): {
1290
+ isValid: boolean;
1291
+ errors: string[];
1292
+ };
1293
+ /**
1294
+ * Get statistics about converter usage
1295
+ */
1296
+ getStatistics(): ConverterStatistics;
1297
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConverterFactoryService, never>;
1298
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConverterFactoryService>;
1299
+ }
1300
+ /**
1301
+ * Statistics about the converter factory
1302
+ */
1303
+ interface ConverterStatistics {
1304
+ converterCount: number;
1305
+ supportedTypeCount: number;
1306
+ supportedTypes: string[];
1307
+ converterNames: string[];
1308
+ }
1309
+
1310
+ /**
1311
+ * Configuration for parsing DSL expressions
1312
+ */
1313
+ interface DslParsingConfig$1 {
1314
+ /** Available function registry */
1315
+ functionRegistry?: FunctionRegistry<any>;
1316
+ /** Context provider for variable resolution */
1317
+ contextProvider?: ContextProvider;
1318
+ /** Known field names for validation */
1319
+ knownFields?: string[];
1320
+ /** Enable performance warnings */
1321
+ enablePerformanceWarnings?: boolean;
1322
+ /** Maximum expression complexity */
1323
+ maxComplexity?: number;
1324
+ }
1325
+ /**
1326
+ * Result of parsing a DSL expression
1327
+ */
1328
+ interface DslParsingResult$1<T extends object = any> {
1329
+ /** Whether parsing was successful */
1330
+ success: boolean;
1331
+ /** Parsed specification (if successful) */
1332
+ specification?: Specification<T>;
1333
+ /** Validation issues found */
1334
+ issues: ValidationIssue$1[];
1335
+ /** Performance metrics */
1336
+ metrics?: {
1337
+ parseTime: number;
1338
+ complexity: number;
1339
+ };
1340
+ }
1341
+ /**
1342
+ * Configuration for contextual specification support
1343
+ */
1344
+ interface SpecificationContextualConfig {
1345
+ /** Context variables available for token resolution */
1346
+ contextVariables?: DslContextVariable[];
1347
+ /** Context provider instance */
1348
+ contextProvider?: ContextProvider;
1349
+ /** Enable strict validation of context tokens */
1350
+ strictContextValidation?: boolean;
1351
+ }
1352
+ declare class SpecificationBridgeService {
1353
+ private nodeRegistry;
1354
+ private converterFactory;
1355
+ private dslExporter;
1356
+ private dslParser;
1357
+ private dslValidator;
1358
+ private contextProvider?;
1359
+ constructor(nodeRegistry: RuleNodeRegistryService, converterFactory: ConverterFactoryService);
1360
+ /**
1361
+ * Converts a RuleNode tree to a Specification instance
1362
+ */
1363
+ ruleNodeToSpecification<T extends object = any>(node: RuleNode): Specification<T>;
1364
+ /**
1365
+ * Converts a Specification instance to a RuleNode tree
1366
+ */
1367
+ specificationToRuleNode<T extends object = any>(spec: Specification<T>): RuleNode;
1368
+ /**
1369
+ * Exports a RuleNode tree to DSL format
1370
+ */
1371
+ exportToDsl<T extends object = any>(node: RuleNode, options?: Partial<ExportOptions$1>): string;
1372
+ /**
1373
+ * Exports a RuleNode tree to DSL format with metadata
1374
+ */
1375
+ exportToDslWithMetadata<T extends object = any>(node: RuleNode): string;
1376
+ /**
1377
+ * Validates that a RuleNode can be successfully round-tripped
1378
+ */
1379
+ validateRoundTrip<T extends object = any>(node: RuleNode): {
1380
+ success: boolean;
1381
+ errors: string[];
1382
+ warnings: string[];
1383
+ };
1384
+ /**
1385
+ * Performs deep validation between original and reconstructed nodes
1386
+ */
1387
+ private deepValidateRoundTrip;
1388
+ /**
1389
+ * Compares two configuration objects
1390
+ */
1391
+ private compareConfigs;
1392
+ /**
1393
+ * Validates DSL round-trip conversion
1394
+ */
1395
+ private validateDslRoundTrip;
1396
+ /**
1397
+ * Parses a DSL expression string into a Specification
1398
+ */
1399
+ parseDslExpression<T extends object = any>(expression: string, config?: DslParsingConfig$1): DslParsingResult$1<T>;
1400
+ /**
1401
+ * Creates a ContextualSpecification with token resolution
1402
+ */
1403
+ createContextualSpecification<T extends object = any>(template: string, config?: SpecificationContextualConfig): ContextualSpecification<T>;
1404
+ /**
1405
+ * Resolves context tokens in a template using provided variables
1406
+ */
1407
+ resolveContextTokens(template: string, contextVariables: DslContextVariable[]): string;
1408
+ /**
1409
+ * Extracts all context tokens from a template
1410
+ */
1411
+ extractContextTokens(template: string): string[];
1412
+ /**
1413
+ * Validates that all context tokens in a template have corresponding variables
1414
+ */
1415
+ validateContextTokens(template: string, contextVariables: DslContextVariable[]): ValidationIssue$1[];
1416
+ /**
1417
+ * Converts a DSL expression to a ContextualSpecification
1418
+ */
1419
+ dslToContextualSpecification<T extends object = any>(dslExpression: string, config?: SpecificationContextualConfig): ContextualSpecification<T>;
1420
+ /**
1421
+ * Converts a ContextualSpecification back to DSL template
1422
+ */
1423
+ contextualSpecificationToDsl<T extends object = any>(spec: ContextualSpecification<T>): string;
1424
+ /**
1425
+ * Performs round-trip validation for expression specifications
1426
+ */
1427
+ validateExpressionRoundTrip<T extends object = any>(originalExpression: string, config?: DslParsingConfig$1): {
1428
+ success: boolean;
1429
+ errors: string[];
1430
+ warnings: string[];
1431
+ reconstructedExpression?: string;
1432
+ };
1433
+ /**
1434
+ * Updates the context provider for contextual specifications
1435
+ */
1436
+ updateContextProvider(contextProvider: ContextProvider): void;
1437
+ /**
1438
+ * Gets the current context provider
1439
+ */
1440
+ getContextProvider(): ContextProvider | undefined;
1441
+ /**
1442
+ * Gets expected DSL keywords for a given node type
1443
+ */
1444
+ private getExpectedDslKeywords;
1445
+ private createFieldSpecification;
1446
+ private createBooleanGroupSpecification;
1447
+ private createFunctionSpecification;
1448
+ private createFieldToFieldSpecification;
1449
+ private createCardinalitySpecification;
1450
+ /**
1451
+ * Creates conditional validator specifications (Phase 1 implementation)
1452
+ */
1453
+ private createConditionalValidatorSpecification;
1454
+ /**
1455
+ * Creates collection validator specifications (Phase 2 implementation)
1456
+ */
1457
+ private createCollectionValidatorSpecification;
1458
+ /**
1459
+ * Creates expression specification from DSL (Phase 4 implementation)
1460
+ */
1461
+ private createExpressionSpecification;
1462
+ /**
1463
+ * Creates contextual specification (Phase 4 implementation)
1464
+ */
1465
+ private createContextualSpecificationFromNode;
1466
+ private convertToComparisonOperator;
1467
+ private convertValue;
1468
+ private jsonToRuleNode;
1469
+ private mapSpecificationTypeToNodeType;
1470
+ private mapComparisonOperator;
1471
+ private inferValueType;
1472
+ private generateNodeId;
1473
+ private generateNodeLabel;
1474
+ /**
1475
+ * Creates a context provider from context variables
1476
+ */
1477
+ private createContextProviderFromVariables;
1478
+ /**
1479
+ * Calculates complexity of a DSL expression
1480
+ */
1481
+ private calculateComplexity;
1482
+ /**
1483
+ * Finds the position of a token in a template
1484
+ */
1485
+ private findTokenPosition;
1486
+ /**
1487
+ * Suggests similar variable names using Levenshtein distance
1488
+ */
1489
+ private suggestSimilarVariable;
1490
+ /**
1491
+ * Calculates Levenshtein distance between two strings
1492
+ */
1493
+ private levenshteinDistance;
1494
+ /**
1495
+ * Parses a value expression. Phase 1 shim: accepts strings starting with '=' or { expr } objects.
1496
+ * Returns success when the shape is acceptable; full DSL parsing will be integrated in Phase 2.
1497
+ */
1498
+ parseDslExpressionValue(expression: string | {
1499
+ expr: string;
1500
+ } | null | undefined, _config?: DslParsingConfig$1): {
1501
+ success: boolean;
1502
+ issues: string[];
1503
+ };
1504
+ /**
1505
+ * Evaluates a value expression with a row context. Phase 1 shim: executes simple '=' expressions in a sandboxed Function.
1506
+ * In Phase 2, this will use the real DSL evaluator from @praxisui/specification.
1507
+ */
1508
+ evaluateValue(expression: string | {
1509
+ expr: string;
1510
+ }, ctx: {
1511
+ row: any;
1512
+ }): any;
1513
+ static ɵfac: i0.ɵɵFactoryDeclaration<SpecificationBridgeService, never>;
1514
+ static ɵprov: i0.ɵɵInjectableDeclaration<SpecificationBridgeService>;
1515
+ }
1516
+
1517
+ interface RoundTripValidationResult {
1518
+ success: boolean;
1519
+ errors: ValidationError$1[];
1520
+ warnings: ValidationError$1[];
1521
+ stages: {
1522
+ visualToSpecification: {
1523
+ success: boolean;
1524
+ error?: string;
1525
+ };
1526
+ specificationToDsl: {
1527
+ success: boolean;
1528
+ error?: string;
1529
+ dsl?: string;
1530
+ };
1531
+ dslToSpecification: {
1532
+ success: boolean;
1533
+ error?: string;
1534
+ };
1535
+ specificationToVisual: {
1536
+ success: boolean;
1537
+ error?: string;
1538
+ };
1539
+ };
1540
+ dataIntegrity: {
1541
+ nodeCountMatch: boolean;
1542
+ structureMatch: boolean;
1543
+ metadataPreserved: boolean;
1544
+ logicPreserved: boolean;
1545
+ };
1546
+ performance: {
1547
+ totalTime: number;
1548
+ stageTimings: Record<string, number>;
1549
+ };
1550
+ }
1551
+ interface RoundTripTestCase {
1552
+ id: string;
1553
+ name: string;
1554
+ description: string;
1555
+ visualRule: RuleNode;
1556
+ expectedDsl?: string;
1557
+ expectedValidation?: {
1558
+ shouldSucceed: boolean;
1559
+ expectedErrors?: string[];
1560
+ expectedWarnings?: string[];
1561
+ };
1562
+ }
1563
+ declare class RoundTripValidatorService {
1564
+ private specificationBridge;
1565
+ private dslParser;
1566
+ constructor(specificationBridge: SpecificationBridgeService);
1567
+ /**
1568
+ * Validates complete round-trip conversion: Visual → DSL → Visual
1569
+ */
1570
+ validateRoundTrip(visualRule: RuleNode): RoundTripValidationResult;
1571
+ /**
1572
+ * Validates data integrity between original and reconstructed visual rules
1573
+ */
1574
+ private validateDataIntegrity;
1575
+ /**
1576
+ * Validates that the logical structure is preserved
1577
+ */
1578
+ private validateStructureMatch;
1579
+ /**
1580
+ * Validates that metadata is preserved through the round-trip
1581
+ */
1582
+ private validateMetadataPreservation;
1583
+ /**
1584
+ * Validates that the logical meaning is preserved
1585
+ */
1586
+ private validateLogicPreservation;
1587
+ /**
1588
+ * Counts total number of nodes in a rule tree
1589
+ */
1590
+ private countNodes;
1591
+ /**
1592
+ * Runs a comprehensive test suite for round-trip validation
1593
+ */
1594
+ runTestSuite(testCases: RoundTripTestCase[]): {
1595
+ totalTests: number;
1596
+ passed: number;
1597
+ failed: number;
1598
+ results: Array<{
1599
+ testCase: RoundTripTestCase;
1600
+ result: RoundTripValidationResult;
1601
+ }>;
1602
+ };
1603
+ /**
1604
+ * Validates test expectations against results
1605
+ */
1606
+ private validateExpectations;
1607
+ /**
1608
+ * Creates default test cases for common rule patterns
1609
+ */
1610
+ createDefaultTestCases(): RoundTripTestCase[];
1611
+ private generateErrorId;
1612
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoundTripValidatorService, never>;
1613
+ static ɵprov: i0.ɵɵInjectableDeclaration<RoundTripValidatorService>;
1614
+ }
1615
+
1616
+ declare class RuleBuilderService {
1617
+ private specificationBridge;
1618
+ private roundTripValidator;
1619
+ private readonly _state;
1620
+ private readonly _validationErrors;
1621
+ private readonly _nodeSelected;
1622
+ private readonly _stateChanged;
1623
+ private config;
1624
+ private dslExporter;
1625
+ private dslValidator;
1626
+ private dslParser;
1627
+ readonly state$: Observable<RuleBuilderState>;
1628
+ readonly validationErrors$: Observable<ValidationError$1[]>;
1629
+ readonly nodeSelected$: Observable<string>;
1630
+ readonly stateChanged$: Observable<void>;
1631
+ constructor(specificationBridge: SpecificationBridgeService, roundTripValidator: RoundTripValidatorService);
1632
+ /**
1633
+ * Initialize the rule builder with configuration
1634
+ */
1635
+ initialize(config: RuleBuilderConfig): void;
1636
+ /**
1637
+ * Get current state
1638
+ */
1639
+ getCurrentState(): RuleBuilderState;
1640
+ /**
1641
+ * Add a new rule node
1642
+ */
1643
+ addNode(node: Partial<RuleNode>, parentId?: string): string;
1644
+ /**
1645
+ * Update an existing rule node
1646
+ */
1647
+ updateNode(nodeId: string, updates: Partial<RuleNode>): void;
1648
+ /**
1649
+ * Remove a rule node
1650
+ */
1651
+ removeNode(nodeId: string): void;
1652
+ /**
1653
+ * Select a rule node
1654
+ */
1655
+ selectNode(nodeId?: string): void;
1656
+ /**
1657
+ * Move a node to a new parent
1658
+ */
1659
+ moveNode(nodeId: string, newParentId?: string, index?: number): void;
1660
+ /**
1661
+ * Convert current rules to Specification
1662
+ */
1663
+ toSpecification(): Specification<any> | null;
1664
+ /**
1665
+ * Export current rules
1666
+ */
1667
+ export(options: ExportOptions): string;
1668
+ /**
1669
+ * Import rules from external source.
1670
+ *
1671
+ * Empty strings or structures with no data are ignored to preserve the
1672
+ * current state. When parsing JSON, the specification type must be
1673
+ * present otherwise an error is thrown, ensuring business rules are
1674
+ * explicit and valid.
1675
+ *
1676
+ * @throws Error when the specification type is missing or the format is
1677
+ * unsupported.
1678
+ */
1679
+ import(content: string, options: ImportOptions): void;
1680
+ /**
1681
+ * Undo last action
1682
+ */
1683
+ undo(): void;
1684
+ /**
1685
+ * Redo last undone action
1686
+ */
1687
+ redo(): void;
1688
+ /**
1689
+ * Clear all rules
1690
+ */
1691
+ clear(): void;
1692
+ /**
1693
+ * Validate current rules
1694
+ */
1695
+ validateRules(): void;
1696
+ /**
1697
+ * Validates round-trip conversion for all root nodes
1698
+ */
1699
+ private validateRoundTrip;
1700
+ /**
1701
+ * Runs comprehensive round-trip validation for current state
1702
+ */
1703
+ runRoundTripValidation(): {
1704
+ success: boolean;
1705
+ results: Array<{
1706
+ nodeId: string;
1707
+ result: any;
1708
+ }>;
1709
+ summary: {
1710
+ totalNodes: number;
1711
+ successfulNodes: number;
1712
+ failedNodes: number;
1713
+ totalErrors: number;
1714
+ totalWarnings: number;
1715
+ };
1716
+ };
1717
+ private getInitialState;
1718
+ private updateState;
1719
+ private saveSnapshot;
1720
+ private generateNodeLabel;
1721
+ private buildRuleNodeTree;
1722
+ private flattenRuleNodeTree;
1723
+ private validateNode;
1724
+ private validateStructure;
1725
+ private exportToTypeScript;
1726
+ private exportToFormConfig;
1727
+ private normalizeSpecJson;
1728
+ private isBuilderState;
1729
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleBuilderService, never>;
1730
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleBuilderService>;
1731
+ }
1732
+
1733
+ interface ExportFormat {
1734
+ id: string;
1735
+ name: string;
1736
+ description: string;
1737
+ fileExtension: string;
1738
+ mimeType: string;
1739
+ supportsMetadata: boolean;
1740
+ supportsComments: boolean;
1741
+ }
1742
+ interface ExportResult {
1743
+ success: boolean;
1744
+ content: string;
1745
+ format: ExportFormat;
1746
+ filename: string;
1747
+ size: number;
1748
+ metadata?: {
1749
+ rulesCount: number;
1750
+ complexity: 'low' | 'medium' | 'high';
1751
+ exportedAt: string;
1752
+ version: string;
1753
+ };
1754
+ errors?: string[];
1755
+ warnings?: string[];
1756
+ }
1757
+ interface IntegrationEndpoint {
1758
+ id: string;
1759
+ name: string;
1760
+ description: string;
1761
+ url?: string;
1762
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH';
1763
+ headers?: Record<string, string>;
1764
+ authentication?: {
1765
+ type: 'none' | 'basic' | 'bearer' | 'apikey';
1766
+ credentials?: any;
1767
+ };
1768
+ supportedFormats: string[];
1769
+ responseFormat?: 'json' | 'xml' | 'text';
1770
+ }
1771
+ interface IntegrationResult {
1772
+ success: boolean;
1773
+ endpoint: IntegrationEndpoint;
1774
+ response?: any;
1775
+ statusCode?: number;
1776
+ error?: string;
1777
+ timestamp: string;
1778
+ }
1779
+ interface ExternalSystemConfig {
1780
+ id: string;
1781
+ name: string;
1782
+ type: 'rest-api' | 'webhook' | 'file-system' | 'database' | 'cloud-storage';
1783
+ config: any;
1784
+ endpoints: IntegrationEndpoint[];
1785
+ enabled: boolean;
1786
+ }
1787
+ declare class ExportIntegrationService {
1788
+ private ruleBuilderService;
1789
+ private specificationBridge;
1790
+ private readonly SUPPORTED_FORMATS;
1791
+ private externalSystems;
1792
+ constructor(ruleBuilderService: RuleBuilderService, specificationBridge: SpecificationBridgeService);
1793
+ /**
1794
+ * Gets all supported export formats
1795
+ */
1796
+ getSupportedFormats(): ExportFormat[];
1797
+ /**
1798
+ * Gets a specific export format by ID
1799
+ */
1800
+ getFormat(formatId: string): ExportFormat | null;
1801
+ /**
1802
+ * Exports current rules in the specified format
1803
+ */
1804
+ exportRules(options: {
1805
+ format: string;
1806
+ includeMetadata?: boolean;
1807
+ prettyPrint?: boolean;
1808
+ includeComments?: boolean;
1809
+ customFilename?: string;
1810
+ downloadFile?: boolean;
1811
+ }): Observable<ExportResult>;
1812
+ /**
1813
+ * Exports rules to multiple formats simultaneously
1814
+ */
1815
+ exportToMultipleFormats(formats: string[], options?: any): Observable<ExportResult[]>;
1816
+ /**
1817
+ * Integrates with external system
1818
+ */
1819
+ integrateWithSystem(systemId: string, endpointId: string, exportFormat: string, options?: any): Observable<IntegrationResult>;
1820
+ /**
1821
+ * Registers a new external system configuration
1822
+ */
1823
+ registerExternalSystem(config: ExternalSystemConfig): void;
1824
+ /**
1825
+ * Gets all registered external systems
1826
+ */
1827
+ getExternalSystems(): ExternalSystemConfig[];
1828
+ /**
1829
+ * Tests connectivity to an external system
1830
+ */
1831
+ testSystemConnectivity(systemId: string): Observable<{
1832
+ success: boolean;
1833
+ message: string;
1834
+ }>;
1835
+ /**
1836
+ * Creates a shareable link for rules
1837
+ */
1838
+ createShareableLink(options: {
1839
+ format: string;
1840
+ expiration?: Date;
1841
+ accessLevel?: 'public' | 'protected' | 'private';
1842
+ password?: string;
1843
+ }): Observable<{
1844
+ url: string;
1845
+ token: string;
1846
+ expiresAt?: Date;
1847
+ }>;
1848
+ /**
1849
+ * Imports rules from external source
1850
+ */
1851
+ importFromExternal(source: {
1852
+ type: 'url' | 'file' | 'system';
1853
+ location: string;
1854
+ format: string;
1855
+ authentication?: any;
1856
+ }): Observable<{
1857
+ success: boolean;
1858
+ imported: any;
1859
+ errors?: string[];
1860
+ }>;
1861
+ /**
1862
+ * Private implementation methods
1863
+ */
1864
+ private performExport;
1865
+ private generateContent;
1866
+ private generateJson;
1867
+ private generateJsonSchema;
1868
+ private generateDsl;
1869
+ private generateYaml;
1870
+ private generateXml;
1871
+ private generateTypeScript;
1872
+ private generateOpenApi;
1873
+ private generateCsv;
1874
+ private performIntegration;
1875
+ private sendToEndpoint;
1876
+ private performConnectivityTest;
1877
+ private generateShareableLink;
1878
+ private performExternalImport;
1879
+ private buildCompleteRuleNode;
1880
+ private flattenCompleteRuleNode;
1881
+ private generateExportMetadata;
1882
+ private generateFilename;
1883
+ private downloadFile;
1884
+ private generateToken;
1885
+ private generateSchemaProperties;
1886
+ private generateSchemaRequired;
1887
+ private convertNodeToYamlObject;
1888
+ private objectToYaml;
1889
+ private nodeToXml;
1890
+ private escapeXml;
1891
+ private generateOpenApiSchemas;
1892
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportIntegrationService, never>;
1893
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExportIntegrationService>;
1894
+ }
1895
+
1896
+ interface WebhookConfig {
1897
+ id: string;
1898
+ name: string;
1899
+ url: string;
1900
+ method: 'POST' | 'PUT' | 'PATCH';
1901
+ headers?: Record<string, string>;
1902
+ authentication?: {
1903
+ type: 'none' | 'basic' | 'bearer' | 'apikey';
1904
+ credentials: any;
1905
+ };
1906
+ format: string;
1907
+ events: WebhookEvent[];
1908
+ enabled: boolean;
1909
+ retryConfig?: {
1910
+ maxRetries: number;
1911
+ retryDelay: number;
1912
+ backoffMultiplier: number;
1913
+ };
1914
+ filtering?: {
1915
+ includeMetadata: boolean;
1916
+ minRuleCount?: number;
1917
+ maxRuleCount?: number;
1918
+ ruleTypes?: string[];
1919
+ };
1920
+ }
1921
+ interface WebhookEvent {
1922
+ type: 'rule-added' | 'rule-updated' | 'rule-deleted' | 'rules-imported' | 'rules-exported' | 'validation-changed';
1923
+ description: string;
1924
+ enabled: boolean;
1925
+ }
1926
+ interface WebhookDelivery {
1927
+ id: string;
1928
+ webhookId: string;
1929
+ event: string;
1930
+ url: string;
1931
+ payload: any;
1932
+ status: 'pending' | 'delivered' | 'failed' | 'retrying';
1933
+ attempts: number;
1934
+ lastAttempt?: Date;
1935
+ nextRetry?: Date;
1936
+ response?: {
1937
+ statusCode: number;
1938
+ headers: Record<string, string>;
1939
+ body: string;
1940
+ };
1941
+ error?: string;
1942
+ createdAt: Date;
1943
+ deliveredAt?: Date;
1944
+ }
1945
+ interface WebhookStats {
1946
+ totalDeliveries: number;
1947
+ successfulDeliveries: number;
1948
+ failedDeliveries: number;
1949
+ pendingDeliveries: number;
1950
+ successRate: number;
1951
+ lastDelivery?: Date;
1952
+ averageResponseTime?: number;
1953
+ }
1954
+ declare class WebhookIntegrationService {
1955
+ private ruleBuilderService;
1956
+ private exportService;
1957
+ private webhooks;
1958
+ private deliveries;
1959
+ private deliveryQueue;
1960
+ private statusUpdates;
1961
+ private readonly SUPPORTED_EVENTS;
1962
+ readonly webhookStats$: Observable<Record<string, WebhookStats>>;
1963
+ constructor(ruleBuilderService: RuleBuilderService, exportService: ExportIntegrationService);
1964
+ /**
1965
+ * Registers a new webhook configuration
1966
+ */
1967
+ registerWebhook(config: WebhookConfig): void;
1968
+ /**
1969
+ * Removes a webhook configuration
1970
+ */
1971
+ unregisterWebhook(webhookId: string): void;
1972
+ /**
1973
+ * Gets all registered webhooks
1974
+ */
1975
+ getWebhooks(): WebhookConfig[];
1976
+ /**
1977
+ * Gets a specific webhook by ID
1978
+ */
1979
+ getWebhook(webhookId: string): WebhookConfig | null;
1980
+ /**
1981
+ * Updates webhook configuration
1982
+ */
1983
+ updateWebhook(webhookId: string, updates: Partial<WebhookConfig>): void;
1984
+ /**
1985
+ * Enables or disables a webhook
1986
+ */
1987
+ toggleWebhook(webhookId: string, enabled: boolean): void;
1988
+ /**
1989
+ * Tests a webhook by sending a test payload
1990
+ */
1991
+ testWebhook(webhookId: string): Observable<WebhookDelivery>;
1992
+ /**
1993
+ * Gets delivery history for a webhook
1994
+ */
1995
+ getDeliveryHistory(webhookId: string, limit?: number): WebhookDelivery[];
1996
+ /**
1997
+ * Gets overall delivery statistics
1998
+ */
1999
+ getDeliveryStats(webhookId?: string): WebhookStats;
2000
+ /**
2001
+ * Retries failed deliveries
2002
+ */
2003
+ retryFailedDeliveries(webhookId?: string): void;
2004
+ /**
2005
+ * Clears delivery history
2006
+ */
2007
+ clearDeliveryHistory(webhookId?: string): void;
2008
+ /**
2009
+ * Gets supported webhook events
2010
+ */
2011
+ getSupportedEvents(): WebhookEvent[];
2012
+ /**
2013
+ * Manually triggers a webhook for testing
2014
+ */
2015
+ triggerWebhook(webhookId: string, eventType: string, payload: any): Observable<WebhookDelivery>;
2016
+ /**
2017
+ * Private implementation methods
2018
+ */
2019
+ private initializeWebhookProcessing;
2020
+ private subscribeToRuleChanges;
2021
+ private handleRuleChange;
2022
+ private handleValidationChange;
2023
+ private shouldTriggerWebhook;
2024
+ private generateEventPayload;
2025
+ private queueDelivery;
2026
+ private preparePayload;
2027
+ private deliverWebhook;
2028
+ private sendWebhookRequest;
2029
+ private updateDelivery;
2030
+ private processRetries;
2031
+ private updateStats;
2032
+ private generateDeliveryId;
2033
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebhookIntegrationService, never>;
2034
+ static ɵprov: i0.ɵɵInjectableDeclaration<WebhookIntegrationService>;
2035
+ }
2036
+
2037
+ /**
2038
+ * Template category for organization
2039
+ */
2040
+ interface TemplateCategory {
2041
+ id: string;
2042
+ name: string;
2043
+ description?: string;
2044
+ icon?: string;
2045
+ color?: string;
2046
+ templates: RuleTemplate[];
2047
+ }
2048
+ /**
2049
+ * Template search criteria
2050
+ */
2051
+ interface TemplateSearchCriteria {
2052
+ query?: string;
2053
+ category?: string;
2054
+ tags?: string[];
2055
+ nodeTypes?: string[];
2056
+ complexity?: 'simple' | 'medium' | 'complex';
2057
+ dateRange?: {
2058
+ from?: Date;
2059
+ to?: Date;
2060
+ };
2061
+ }
2062
+ /**
2063
+ * Template validation result
2064
+ */
2065
+ interface TemplateValidationResult {
2066
+ isValid: boolean;
2067
+ errors: string[];
2068
+ warnings: string[];
2069
+ missingFields?: string[];
2070
+ incompatibleFeatures?: string[];
2071
+ }
2072
+ /**
2073
+ * Template application result
2074
+ */
2075
+ interface TemplateApplicationResult {
2076
+ success: boolean;
2077
+ appliedNodes: RuleNode[];
2078
+ errors: string[];
2079
+ warnings: string[];
2080
+ modifiedNodeIds: string[];
2081
+ }
2082
+ /**
2083
+ * Template statistics
2084
+ */
2085
+ interface TemplateStats {
2086
+ totalTemplates: number;
2087
+ categoriesCount: number;
2088
+ mostUsedTemplate?: RuleTemplate;
2089
+ recentlyUsed: RuleTemplate[];
2090
+ popularTags: string[];
2091
+ }
2092
+ declare class RuleTemplateService {
2093
+ private bridgeService;
2094
+ private readonly STORAGE_KEY;
2095
+ private readonly VERSION_KEY;
2096
+ private readonly CURRENT_VERSION;
2097
+ private templatesSubject;
2098
+ private categoriesSubject;
2099
+ private recentlyUsedSubject;
2100
+ templates$: Observable<RuleTemplate[]>;
2101
+ categories$: Observable<TemplateCategory[]>;
2102
+ recentlyUsed$: Observable<RuleTemplate[]>;
2103
+ constructor(bridgeService: SpecificationBridgeService);
2104
+ /**
2105
+ * Get all templates
2106
+ */
2107
+ getTemplates(): Observable<RuleTemplate[]>;
2108
+ /**
2109
+ * Get templates by category
2110
+ */
2111
+ getTemplatesByCategory(categoryId: string): Observable<RuleTemplate[]>;
2112
+ /**
2113
+ * Search templates
2114
+ */
2115
+ searchTemplates(criteria: TemplateSearchCriteria): Observable<RuleTemplate[]>;
2116
+ /**
2117
+ * Get template by ID
2118
+ */
2119
+ getTemplate(id: string): Observable<RuleTemplate | null>;
2120
+ /**
2121
+ * Create new template
2122
+ */
2123
+ createTemplate(name: string, description: string, category: string, nodes: RuleNode[], rootNodes: string[], tags?: string[], requiredFields?: string[]): Observable<RuleTemplate>;
2124
+ /**
2125
+ * Update template
2126
+ */
2127
+ updateTemplate(id: string, updates: Partial<RuleTemplate>): Observable<RuleTemplate>;
2128
+ /**
2129
+ * Delete template
2130
+ */
2131
+ deleteTemplate(id: string): Observable<boolean>;
2132
+ /**
2133
+ * Duplicate template
2134
+ */
2135
+ duplicateTemplate(id: string, newName?: string): Observable<RuleTemplate>;
2136
+ /**
2137
+ * Apply template to current builder state
2138
+ */
2139
+ applyTemplate(templateId: string, targetBuilderState?: RuleBuilderState): Observable<TemplateApplicationResult>;
2140
+ /**
2141
+ * Validate template compatibility
2142
+ */
2143
+ validateTemplate(template: RuleTemplate, availableFields?: string[]): TemplateValidationResult;
2144
+ /**
2145
+ * Export template to JSON
2146
+ */
2147
+ exportTemplate(id: string, options?: ExportOptions): Observable<string>;
2148
+ /**
2149
+ * Import template from JSON
2150
+ */
2151
+ importTemplate(jsonData: string, options?: ImportOptions): Observable<RuleTemplate>;
2152
+ /**
2153
+ * Get template statistics
2154
+ */
2155
+ getTemplateStats(): Observable<TemplateStats>;
2156
+ /**
2157
+ * Get categories with template counts
2158
+ */
2159
+ getCategories(): Observable<TemplateCategory[]>;
2160
+ private loadTemplatesFromStorage;
2161
+ private saveTemplatesToStorage;
2162
+ private updateCategories;
2163
+ private initializeDefaultTemplates;
2164
+ private createDefaultTemplates;
2165
+ private generateTemplateId;
2166
+ private cloneTemplateNodes;
2167
+ private generateNodeId;
2168
+ private replaceTemplateVariables;
2169
+ private incrementTemplateUsage;
2170
+ private addToRecentlyUsed;
2171
+ private getTemplateComplexity;
2172
+ private calculateComplexity;
2173
+ private detectComplexFeatures;
2174
+ private getCategoryDisplayName;
2175
+ private getCategoryDescription;
2176
+ private getDefaultIconForCategory;
2177
+ private incrementVersion;
2178
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleTemplateService, never>;
2179
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleTemplateService>;
2180
+ }
2181
+
2182
+ /**
2183
+ * Validation issue severity levels
2184
+ */
2185
+ declare enum ValidationSeverity {
2186
+ ERROR = "error",
2187
+ WARNING = "warning",
2188
+ INFO = "info"
2189
+ }
2190
+ /**
2191
+ * Validation issue categories
2192
+ */
2193
+ declare enum ValidationCategory {
2194
+ STRUCTURE = "structure",
2195
+ DEPENDENCY = "dependency",
2196
+ BUSINESS_LOGIC = "business_logic",
2197
+ PERFORMANCE = "performance",
2198
+ SEMANTIC = "semantic"
2199
+ }
2200
+ /**
2201
+ * Validation issue details
2202
+ */
2203
+ interface ValidationIssue {
2204
+ /** Unique identifier for this issue */
2205
+ id: string;
2206
+ /** Issue severity level */
2207
+ severity: ValidationSeverity;
2208
+ /** Issue category */
2209
+ category: ValidationCategory;
2210
+ /** Human-readable message */
2211
+ message: string;
2212
+ /** Affected node ID */
2213
+ nodeId: string;
2214
+ /** Suggested fix (optional) */
2215
+ suggestion?: string;
2216
+ /** Additional context data */
2217
+ context?: Record<string, any>;
2218
+ }
2219
+ /**
2220
+ * Validation result for a rule tree
2221
+ */
2222
+ interface RuleValidationResult {
2223
+ /** Whether validation passed */
2224
+ isValid: boolean;
2225
+ /** Total number of issues found */
2226
+ issueCount: number;
2227
+ /** Issues found during validation */
2228
+ issues: ValidationIssue[];
2229
+ /** Performance metrics */
2230
+ metrics: {
2231
+ validationTime: number;
2232
+ nodeCount: number;
2233
+ maxDepth: number;
2234
+ complexity: number;
2235
+ };
2236
+ }
2237
+ /**
2238
+ * Validation configuration options
2239
+ */
2240
+ interface ValidationConfig {
2241
+ /** Enable strict validation mode */
2242
+ strict?: boolean;
2243
+ /** Maximum allowed tree depth */
2244
+ maxDepth?: number;
2245
+ /** Maximum allowed complexity score */
2246
+ maxComplexity?: number;
2247
+ /** Enable performance warnings */
2248
+ enablePerformanceWarnings?: boolean;
2249
+ /** Custom validation rules */
2250
+ customRules?: ValidationRule[];
2251
+ }
2252
+ /**
2253
+ * Custom validation rule interface
2254
+ */
2255
+ interface ValidationRule {
2256
+ /** Rule identifier */
2257
+ id: string;
2258
+ /** Rule description */
2259
+ description: string;
2260
+ /** Validation function */
2261
+ validate: (node: RuleNode, context: ValidationContext) => ValidationIssue[];
2262
+ }
2263
+ /**
2264
+ * Validation context passed to validators
2265
+ */
2266
+ interface ValidationContext {
2267
+ /** Registry service for node resolution */
2268
+ registry: RuleNodeRegistryService;
2269
+ /** Current validation config */
2270
+ config: ValidationConfig;
2271
+ /** Visited nodes (for cycle detection) */
2272
+ visitedNodes: Set<string>;
2273
+ /** Current depth level */
2274
+ currentDepth: number;
2275
+ /** All nodes in the tree */
2276
+ allNodes: Map<string, RuleNode>;
2277
+ }
2278
+ /**
2279
+ * Centralized service for validating rule business logic and integrity
2280
+ */
2281
+ declare class RuleValidationService {
2282
+ private nodeRegistry;
2283
+ private defaultConfig;
2284
+ constructor(nodeRegistry: RuleNodeRegistryService);
2285
+ /**
2286
+ * Validate a complete rule tree
2287
+ */
2288
+ validateRuleTree(rootNode: RuleNode, config?: Partial<ValidationConfig>): RuleValidationResult;
2289
+ /**
2290
+ * Validate a single node
2291
+ */
2292
+ validateNode(node: RuleNode, context: ValidationContext): ValidationIssue[];
2293
+ private validateStructure;
2294
+ private validateDependencies;
2295
+ private validateBusinessLogic;
2296
+ private validatePerformance;
2297
+ private validateNodeByType;
2298
+ private validateFieldCondition;
2299
+ private validateBooleanGroup;
2300
+ private validateCardinality;
2301
+ private getRequiredChildrenCount;
2302
+ private collectAllNodes;
2303
+ private calculateMetrics;
2304
+ private getNodeComplexity;
2305
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleValidationService, never>;
2306
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleValidationService>;
2307
+ }
2308
+
2309
+ /**
2310
+ * Configuration for parsing DSL expressions
2311
+ */
2312
+ interface DslParsingConfig {
2313
+ /** Available function registry */
2314
+ functionRegistry?: FunctionRegistry<any>;
2315
+ /** Context provider for variable resolution */
2316
+ contextProvider?: ContextProvider;
2317
+ /** Known field names for validation */
2318
+ knownFields?: string[];
2319
+ /** Enable performance warnings */
2320
+ enablePerformanceWarnings?: boolean;
2321
+ /** Maximum expression complexity */
2322
+ maxComplexity?: number;
2323
+ }
2324
+ /**
2325
+ * Result of parsing a DSL expression
2326
+ */
2327
+ interface DslParsingResult<T extends object = any> {
2328
+ /** Whether parsing was successful */
2329
+ success: boolean;
2330
+ /** Parsed specification (if successful) */
2331
+ specification?: any;
2332
+ /** Validation issues found */
2333
+ issues: ValidationIssue$1[];
2334
+ /** Performance metrics */
2335
+ metrics?: {
2336
+ parseTime: number;
2337
+ complexity: number;
2338
+ };
2339
+ }
2340
+ /**
2341
+ * Dedicated service for DSL parsing and validation
2342
+ * Extracted from SpecificationBridgeService to follow SRP
2343
+ */
2344
+ declare class DslParsingService {
2345
+ constructor();
2346
+ /**
2347
+ * Parse a DSL expression into a specification
2348
+ */
2349
+ parseDsl<T extends object = any>(dslExpression: string, config?: DslParsingConfig): DslParsingResult<T>;
2350
+ /**
2351
+ * Validate DSL syntax without parsing
2352
+ */
2353
+ validateDsl(dslExpression: string, config?: DslParsingConfig): ValidationIssue$1[];
2354
+ /**
2355
+ * Get suggestions for DSL completion
2356
+ */
2357
+ getDslSuggestions(partialExpression: string, cursorPosition: number, config?: DslParsingConfig): string[];
2358
+ /**
2359
+ * Format DSL expression for readability
2360
+ */
2361
+ formatDsl(dslExpression: string): string;
2362
+ /**
2363
+ * Check if DSL expression is syntactically valid
2364
+ */
2365
+ isValidDsl(dslExpression: string, config?: DslParsingConfig): boolean;
2366
+ private calculateComplexity;
2367
+ private getCurrentToken;
2368
+ static ɵfac: i0.ɵɵFactoryDeclaration<DslParsingService, never>;
2369
+ static ɵprov: i0.ɵɵInjectableDeclaration<DslParsingService>;
2370
+ }
2371
+
2372
+ /**
2373
+ * Context variable definition used by the context management service
2374
+ * Renamed to avoid conflicts with other ContextVariable interfaces
2375
+ */
2376
+ interface ContextEntry {
2377
+ /** Full path identifier for the variable */
2378
+ path: string;
2379
+ /** Actual value of the variable */
2380
+ value: unknown;
2381
+ /** Optional type hint for validation */
2382
+ type?: string;
2383
+ }
2384
+ /**
2385
+ * Configuration for contextual specification support
2386
+ */
2387
+ interface ContextualConfig {
2388
+ /** Context variables available for token resolution */
2389
+ contextVariables?: ContextEntry[];
2390
+ /** Context provider instance */
2391
+ contextProvider?: ContextProvider;
2392
+ /** Enable strict validation of context tokens */
2393
+ strictContextValidation?: boolean;
2394
+ }
2395
+ /**
2396
+ * Context variable value with metadata
2397
+ */
2398
+ interface ContextValue {
2399
+ /** The actual value */
2400
+ value: any;
2401
+ /** Variable type */
2402
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
2403
+ /** Whether the value is computed */
2404
+ computed?: boolean;
2405
+ /** Last updated timestamp */
2406
+ lastUpdated?: Date;
2407
+ }
2408
+ /**
2409
+ * Context scope for variable resolution
2410
+ */
2411
+ interface ContextScope {
2412
+ /** Scope identifier */
2413
+ id: string;
2414
+ /** Scope name */
2415
+ name: string;
2416
+ /** Parent scope (for hierarchical contexts) */
2417
+ parentId?: string;
2418
+ /** Variables in this scope */
2419
+ variables: Map<string, ContextValue>;
2420
+ }
2421
+ /**
2422
+ * Dedicated service for context management and variable resolution
2423
+ * Extracted from SpecificationBridgeService to follow SRP
2424
+ */
2425
+ declare class ContextManagementService {
2426
+ private scopes;
2427
+ private globalScope;
2428
+ constructor();
2429
+ /**
2430
+ * Create a context provider from context variables
2431
+ */
2432
+ createContextProvider(contextVariables: ContextEntry[]): ContextProvider;
2433
+ /**
2434
+ * Create a new context scope
2435
+ */
2436
+ createScope(id: string, name: string, parentId?: string): ContextScope;
2437
+ /**
2438
+ * Set a variable in a specific scope
2439
+ */
2440
+ setVariable(scopeId: string, name: string, value: any, type?: ContextValue['type']): void;
2441
+ /**
2442
+ * Get a variable value from a scope (with inheritance)
2443
+ */
2444
+ getVariable(scopeId: string, name: string): ContextValue | undefined;
2445
+ /**
2446
+ * Get all variables in a scope (including inherited)
2447
+ */
2448
+ getAllVariables(scopeId: string): Map<string, ContextValue>;
2449
+ /**
2450
+ * Validate context variables
2451
+ */
2452
+ validateContext(contextVariables: ContextEntry[]): {
2453
+ isValid: boolean;
2454
+ issues: string[];
2455
+ };
2456
+ /**
2457
+ * Create a scoped context provider
2458
+ */
2459
+ createScopedProvider(scopeId: string): ContextProvider;
2460
+ /**
2461
+ * Merge multiple context providers
2462
+ */
2463
+ mergeProviders(...providers: ContextProvider[]): ContextProvider;
2464
+ /**
2465
+ * Get context statistics
2466
+ */
2467
+ getContextStatistics(scopeId?: string): {
2468
+ scopeCount: number;
2469
+ variableCount: number;
2470
+ totalSize: number;
2471
+ scopes: {
2472
+ id: string;
2473
+ name: string;
2474
+ variableCount: number;
2475
+ }[];
2476
+ };
2477
+ private hasContextValue;
2478
+ private getContextValue;
2479
+ private collectVariablesRecursive;
2480
+ private isValidPath;
2481
+ private inferType;
2482
+ private estimateSize;
2483
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextManagementService, never>;
2484
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContextManagementService>;
2485
+ }
2486
+
2487
+ /**
2488
+ * Simplified service for core rule conversion operations
2489
+ * Replaces the God Service anti-pattern from SpecificationBridgeService
2490
+ * Focuses only on conversion between RuleNodes and Specifications
2491
+ */
2492
+ declare class RuleConversionService {
2493
+ private converterFactory;
2494
+ private dslParsingService;
2495
+ private contextManagementService;
2496
+ private dslExporter;
2497
+ constructor(converterFactory: ConverterFactoryService, dslParsingService: DslParsingService, contextManagementService: ContextManagementService);
2498
+ /**
2499
+ * Convert a RuleNode tree to a Specification instance
2500
+ * Core conversion functionality with clean error handling
2501
+ */
2502
+ convertRuleToSpecification<T extends object = any>(node: RuleNode): Specification<T>;
2503
+ /**
2504
+ * Convert a Specification back to a RuleNode tree
2505
+ * Simplified reverse conversion
2506
+ */
2507
+ convertSpecificationToRule<T extends object = any>(spec: Specification<T>): RuleNode;
2508
+ /**
2509
+ * Export a RuleNode tree to DSL format
2510
+ */
2511
+ exportRuleToDsl<T extends object = any>(node: RuleNode, options?: Partial<ExportOptions$1>): string;
2512
+ /**
2513
+ * Import a RuleNode tree from DSL format
2514
+ */
2515
+ importRuleFromDsl<T extends object = any>(dslExpression: string, config?: DslParsingConfig): DslParsingResult<T>;
2516
+ /**
2517
+ * Create a contextual specification from a RuleNode
2518
+ */
2519
+ createContextualSpecification<T extends object = any>(node: RuleNode, contextConfig: ContextualConfig): Specification<T>;
2520
+ /**
2521
+ * Validate that a rule can be converted
2522
+ */
2523
+ validateConversion(node: RuleNode): ConversionValidationResult;
2524
+ /**
2525
+ * Get conversion statistics
2526
+ */
2527
+ getConversionStatistics(): ConversionStatistics;
2528
+ private jsonToRuleNode;
2529
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleConversionService, never>;
2530
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleConversionService>;
2531
+ }
2532
+ /**
2533
+ * Result of conversion validation
2534
+ */
2535
+ interface ConversionValidationResult {
2536
+ isValid: boolean;
2537
+ errors: string[];
2538
+ warnings: string[];
2539
+ }
2540
+ /**
2541
+ * Statistics about conversion capabilities
2542
+ */
2543
+ interface ConversionStatistics {
2544
+ supportedNodeTypes: number;
2545
+ registeredConverters: number;
2546
+ availableNodeTypes: string[];
2547
+ converterNames: string[];
2548
+ }
2549
+
2550
+ /**
2551
+ * Typed error system for Visual Builder operations
2552
+ * Provides structured error handling with codes, categories, and context
2553
+ */
2554
+ /**
2555
+ * Error categories for classification
2556
+ */
2557
+ declare enum ErrorCategory {
2558
+ VALIDATION = "validation",
2559
+ CONVERSION = "conversion",
2560
+ REGISTRY = "registry",
2561
+ DSL = "dsl",
2562
+ CONTEXT = "context",
2563
+ CONFIGURATION = "configuration",
2564
+ NETWORK = "network",
2565
+ INTERNAL = "internal"
2566
+ }
2567
+ /**
2568
+ * Error severity levels
2569
+ */
2570
+ declare enum ErrorSeverity {
2571
+ LOW = "low",
2572
+ MEDIUM = "medium",
2573
+ HIGH = "high",
2574
+ CRITICAL = "critical"
2575
+ }
2576
+ /**
2577
+ * Base error class for all Visual Builder errors
2578
+ */
2579
+ declare abstract class VisualBuilderError extends Error {
2580
+ readonly cause?: Error | undefined;
2581
+ abstract readonly code: string;
2582
+ abstract readonly category: ErrorCategory;
2583
+ abstract readonly severity: ErrorSeverity;
2584
+ readonly timestamp: Date;
2585
+ readonly context: Record<string, any>;
2586
+ constructor(message: string, context?: Record<string, any>, cause?: Error | undefined);
2587
+ /**
2588
+ * Get structured error information
2589
+ */
2590
+ toJSON(): ErrorInfo;
2591
+ }
2592
+ /**
2593
+ * Validation-related errors
2594
+ */
2595
+ declare class ValidationError extends VisualBuilderError {
2596
+ readonly nodeId?: string | undefined;
2597
+ readonly validationRules?: string[] | undefined;
2598
+ readonly code = "VALIDATION_ERROR";
2599
+ readonly category = ErrorCategory.VALIDATION;
2600
+ readonly severity = ErrorSeverity.HIGH;
2601
+ constructor(message: string, nodeId?: string | undefined, validationRules?: string[] | undefined, context?: Record<string, any>);
2602
+ }
2603
+ /**
2604
+ * Conversion-related errors
2605
+ */
2606
+ declare class ConversionError extends VisualBuilderError {
2607
+ readonly nodeId?: string | undefined;
2608
+ readonly code: string;
2609
+ readonly category = ErrorCategory.CONVERSION;
2610
+ readonly severity = ErrorSeverity.HIGH;
2611
+ constructor(code: string, message: string, nodeId?: string | undefined, context?: Record<string, any>, cause?: Error);
2612
+ }
2613
+ /**
2614
+ * Registry-related errors
2615
+ */
2616
+ declare class RegistryError extends VisualBuilderError {
2617
+ readonly nodeId?: string | undefined;
2618
+ readonly code: string;
2619
+ readonly category = ErrorCategory.REGISTRY;
2620
+ readonly severity = ErrorSeverity.MEDIUM;
2621
+ constructor(operation: string, message: string, nodeId?: string | undefined, context?: Record<string, any>);
2622
+ }
2623
+ /**
2624
+ * DSL parsing and processing errors
2625
+ */
2626
+ declare class DslError extends VisualBuilderError {
2627
+ readonly expression?: string | undefined;
2628
+ readonly position?: {
2629
+ start: number;
2630
+ end: number;
2631
+ } | undefined;
2632
+ readonly code: string;
2633
+ readonly category = ErrorCategory.DSL;
2634
+ readonly severity = ErrorSeverity.HIGH;
2635
+ constructor(type: 'PARSING' | 'VALIDATION' | 'EXPORT' | 'IMPORT', message: string, expression?: string | undefined, position?: {
2636
+ start: number;
2637
+ end: number;
2638
+ } | undefined, context?: Record<string, any>);
2639
+ }
2640
+ /**
2641
+ * Context management errors
2642
+ */
2643
+ declare class ContextError extends VisualBuilderError {
2644
+ readonly scopeId?: string | undefined;
2645
+ readonly variablePath?: string | undefined;
2646
+ readonly code: string;
2647
+ readonly category = ErrorCategory.CONTEXT;
2648
+ readonly severity = ErrorSeverity.MEDIUM;
2649
+ constructor(operation: string, message: string, scopeId?: string | undefined, variablePath?: string | undefined, context?: Record<string, any>);
2650
+ }
2651
+ /**
2652
+ * Configuration errors
2653
+ */
2654
+ declare class ConfigurationError extends VisualBuilderError {
2655
+ readonly configPath?: string | undefined;
2656
+ readonly expectedType?: string | undefined;
2657
+ readonly code = "CONFIGURATION_ERROR";
2658
+ readonly category = ErrorCategory.CONFIGURATION;
2659
+ readonly severity = ErrorSeverity.HIGH;
2660
+ constructor(message: string, configPath?: string | undefined, expectedType?: string | undefined, context?: Record<string, any>);
2661
+ }
2662
+ /**
2663
+ * Internal system errors
2664
+ */
2665
+ declare class InternalError extends VisualBuilderError {
2666
+ readonly code = "INTERNAL_ERROR";
2667
+ readonly category = ErrorCategory.INTERNAL;
2668
+ readonly severity = ErrorSeverity.CRITICAL;
2669
+ constructor(message: string, context?: Record<string, any>, cause?: Error);
2670
+ }
2671
+ /**
2672
+ * Structured error information
2673
+ */
2674
+ interface ErrorInfo {
2675
+ code: string;
2676
+ category: ErrorCategory;
2677
+ severity: ErrorSeverity;
2678
+ message: string;
2679
+ timestamp: string;
2680
+ context: Record<string, any>;
2681
+ stack?: string;
2682
+ cause?: {
2683
+ name: string;
2684
+ message: string;
2685
+ stack?: string;
2686
+ };
2687
+ }
2688
+ /**
2689
+ * Error handler for collecting and processing errors
2690
+ */
2691
+ declare class ErrorHandler {
2692
+ private errors;
2693
+ private maxErrors;
2694
+ /**
2695
+ * Handle an error
2696
+ */
2697
+ handle(error: Error | VisualBuilderError): void;
2698
+ /**
2699
+ * Get all errors
2700
+ */
2701
+ getErrors(): VisualBuilderError[];
2702
+ /**
2703
+ * Get errors by category
2704
+ */
2705
+ getErrorsByCategory(category: ErrorCategory): VisualBuilderError[];
2706
+ /**
2707
+ * Get errors by severity
2708
+ */
2709
+ getErrorsBySeverity(severity: ErrorSeverity): VisualBuilderError[];
2710
+ /**
2711
+ * Clear all errors
2712
+ */
2713
+ clear(): void;
2714
+ /**
2715
+ * Get error statistics
2716
+ */
2717
+ getStatistics(): ErrorStatistics;
2718
+ private logError;
2719
+ }
2720
+ /**
2721
+ * Error statistics interface
2722
+ */
2723
+ interface ErrorStatistics {
2724
+ total: number;
2725
+ byCategory: Record<ErrorCategory, number>;
2726
+ bySeverity: Record<ErrorSeverity, number>;
2727
+ recent: VisualBuilderError[];
2728
+ }
2729
+ /**
2730
+ * Global error handler instance
2731
+ */
2732
+ declare const globalErrorHandler: ErrorHandler;
2733
+ /**
2734
+ * Utility function to create typed errors
2735
+ */
2736
+ declare const createError: {
2737
+ validation: (message: string, nodeId?: string, rules?: string[]) => ValidationError;
2738
+ conversion: (code: string, message: string, nodeId?: string) => ConversionError;
2739
+ registry: (operation: string, message: string, nodeId?: string) => RegistryError;
2740
+ dsl: (type: "PARSING" | "VALIDATION" | "EXPORT" | "IMPORT", message: string, expression?: string) => DslError;
2741
+ context: (operation: string, message: string, scopeId?: string, variablePath?: string) => ContextError;
2742
+ configuration: (message: string, configPath?: string, expectedType?: string) => ConfigurationError;
2743
+ internal: (message: string, cause?: Error) => InternalError;
2744
+ };
2745
+
2746
+ declare class RuleEditorComponent implements OnInit, OnDestroy {
2747
+ private ruleBuilderService;
2748
+ private fieldSchemaService;
2749
+ private snackBar;
2750
+ private fb;
2751
+ private dialog;
2752
+ config: RuleBuilderConfig | null;
2753
+ initialRules: any;
2754
+ embedded: boolean;
2755
+ rulesChanged: EventEmitter<any>;
2756
+ exportRequested: EventEmitter<ExportOptions>;
2757
+ importRequested: EventEmitter<ImportOptions>;
2758
+ private destroy$;
2759
+ currentState: RuleBuilderState | null;
2760
+ validationErrors: ValidationError$1[];
2761
+ selectedNode: RuleNode | null;
2762
+ fieldSchemas: Record<string, FieldSchema>;
2763
+ fieldCategories: any[];
2764
+ activeTabIndex: number;
2765
+ showValidationErrors: boolean;
2766
+ get canUndo(): boolean;
2767
+ get canRedo(): boolean;
2768
+ constructor(ruleBuilderService: RuleBuilderService, fieldSchemaService: FieldSchemaService, snackBar: MatSnackBar, fb: FormBuilder, dialog: MatDialog);
2769
+ ngOnInit(): void;
2770
+ ngOnDestroy(): void;
2771
+ private setupSubscriptions;
2772
+ private initializeBuilder;
2773
+ private importInitialRules;
2774
+ private updateSelectedNode;
2775
+ trackByNodeId(index: number, nodeId: string): string;
2776
+ getNode(nodeId: string): RuleNode | null;
2777
+ getNodeLabel(nodeId: string): string;
2778
+ getNodeIcon(node: RuleNode | null): string;
2779
+ getFieldIcon(type: string): string;
2780
+ isNodeSelected(nodeId: string): boolean;
2781
+ hasChildren(nodeId: string): boolean;
2782
+ getChildren(nodeId: string): string[];
2783
+ getRuleCount(): number;
2784
+ getErrorIcon(severity: string): string;
2785
+ onModeChange(event: MatButtonToggleChange): void;
2786
+ selectNode(nodeId?: string): void;
2787
+ editNode(nodeId: string): void;
2788
+ removeNode(nodeId: string): void;
2789
+ onRuleDrop(event: CdkDragDrop<string[]>): void;
2790
+ onFieldDragStart(field: FieldSchema, event: DragEvent): void;
2791
+ showAddRuleDialog(): void;
2792
+ onNodeAdded(event: {
2793
+ type: RuleNodeType;
2794
+ parentId?: string;
2795
+ config?: RuleNodeConfig;
2796
+ }): void;
2797
+ onNodeUpdated(event: {
2798
+ nodeId: string;
2799
+ updates: Partial<RuleNode>;
2800
+ }): void;
2801
+ onMetadataUpdated(event: any): void;
2802
+ onDslChanged(dsl: string): void;
2803
+ onJsonChanged(json: any): void;
2804
+ undo(): void;
2805
+ redo(): void;
2806
+ clearRules(): void;
2807
+ openExportDialog(): void;
2808
+ importRules(): void;
2809
+ hideValidationErrors(): void;
2810
+ onLinterErrorSelected(error: any): void;
2811
+ onQuickFixApplied(event: any): void;
2812
+ onLinterRuleToggled(event: any): void;
2813
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleEditorComponent, never>;
2814
+ static ɵcmp: i0.ɵɵComponentDeclaration<RuleEditorComponent, "praxis-rule-editor", never, { "config": { "alias": "config"; "required": false; }; "initialRules": { "alias": "initialRules"; "required": false; }; "embedded": { "alias": "embedded"; "required": false; }; }, { "rulesChanged": "rulesChanged"; "exportRequested": "exportRequested"; "importRequested": "importRequested"; }, never, never, true, never>;
2815
+ }
2816
+
2817
+ declare class RuleCanvasComponent implements OnInit, OnDestroy {
2818
+ state: RuleBuilderState | null;
2819
+ fieldSchemas: Record<string, FieldSchema>;
2820
+ nodeSelected: EventEmitter<string>;
2821
+ nodeAdded: EventEmitter<{
2822
+ type: RuleNodeType;
2823
+ parentId?: string;
2824
+ config?: RuleNodeConfig;
2825
+ }>;
2826
+ nodeUpdated: EventEmitter<{
2827
+ nodeId: string;
2828
+ updates: Partial<RuleNode>;
2829
+ }>;
2830
+ nodeRemoved: EventEmitter<string>;
2831
+ private destroy$;
2832
+ isDragOver: boolean;
2833
+ showAddMenu: boolean;
2834
+ addMenuOptions: {
2835
+ type: RuleNodeType;
2836
+ icon: string;
2837
+ label: string;
2838
+ color: string;
2839
+ }[];
2840
+ get isEmpty(): boolean;
2841
+ constructor();
2842
+ ngOnInit(): void;
2843
+ ngOnDestroy(): void;
2844
+ trackByNodeId(index: number, nodeId: string): string;
2845
+ getNode(nodeId: string): RuleNode | null;
2846
+ isNodeSelected(nodeId: string): boolean;
2847
+ isLastRootNode(nodeId: string): boolean;
2848
+ getNodeValidationErrors(nodeId: string): any[];
2849
+ selectNode(nodeId: string): void;
2850
+ updateNode(event: {
2851
+ nodeId: string;
2852
+ updates: Partial<RuleNode>;
2853
+ }): void;
2854
+ deleteNode(nodeId: string): void;
2855
+ addChildNode(parentId: string, childType: RuleNodeType): void;
2856
+ moveChildNode(event: any): void;
2857
+ onDragOver(event: DragEvent): void;
2858
+ onDragEnter(event: DragEvent): void;
2859
+ onDragLeave(event: DragEvent): void;
2860
+ onDrop(event: DragEvent): void;
2861
+ private createFieldConditionFromDrop;
2862
+ toggleAddMenu(): void;
2863
+ addFirstRule(): void;
2864
+ addRule(type: RuleNodeType): void;
2865
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleCanvasComponent, never>;
2866
+ static ɵcmp: i0.ɵɵComponentDeclaration<RuleCanvasComponent, "praxis-rule-canvas", never, { "state": { "alias": "state"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "nodeSelected": "nodeSelected"; "nodeAdded": "nodeAdded"; "nodeUpdated": "nodeUpdated"; "nodeRemoved": "nodeRemoved"; }, never, never, true, never>;
2867
+ }
2868
+
2869
+ declare class RuleNodeComponent {
2870
+ private fb;
2871
+ node: RuleNode | null;
2872
+ fieldSchemas: Record<string, FieldSchema>;
2873
+ level: number;
2874
+ isSelected: boolean;
2875
+ validationErrors: ValidationError$1[];
2876
+ nodeClicked: EventEmitter<void>;
2877
+ nodeUpdated: EventEmitter<{
2878
+ nodeId: string;
2879
+ updates: Partial<RuleNode>;
2880
+ }>;
2881
+ nodeDeleted: EventEmitter<void>;
2882
+ childAdded: EventEmitter<RuleNodeType>;
2883
+ childMoved: EventEmitter<CdkDragDrop<string[], string[], any>>;
2884
+ get hasValidationErrors(): boolean;
2885
+ constructor(fb: FormBuilder);
2886
+ selectNode(): void;
2887
+ getNodeIcon(): string;
2888
+ getNodeLabel(): string;
2889
+ getNodeTypeClass(): string;
2890
+ getErrorIcon(severity: string): string;
2891
+ isFieldCondition(): boolean;
2892
+ isBooleanGroup(): boolean;
2893
+ isConditionalValidator(): boolean;
2894
+ isCollectionValidation(): boolean;
2895
+ getFieldConditionConfig(): FieldConditionConfig | null;
2896
+ getBooleanGroupConfig(): BooleanGroupConfig | null;
2897
+ getConditionalValidatorConfig(): ConditionalValidatorConfig | null;
2898
+ getCollectionValidationConfig(): CollectionValidatorConfig | null;
2899
+ getBooleanOperator(): string;
2900
+ hasChildren(): boolean;
2901
+ canHaveChildren(): boolean;
2902
+ getChildOptions(): {
2903
+ type: RuleNodeType;
2904
+ icon: string;
2905
+ label: string;
2906
+ }[];
2907
+ trackByChildId(index: number, childId: string): string;
2908
+ getChildNode(childId: string): RuleNode | null;
2909
+ isChildSelected(childId: string): boolean;
2910
+ getChildValidationErrors(childId: string): ValidationError$1[];
2911
+ isLastChild(childId: string): boolean;
2912
+ editNode(): void;
2913
+ duplicateNode(): void;
2914
+ deleteNode(): void;
2915
+ addChild(type: RuleNodeType): void;
2916
+ showAddChildMenu(): void;
2917
+ onBooleanOperatorChanged(event: MatSelectChange): void;
2918
+ onFieldConditionChanged(config: FieldConditionConfig): void;
2919
+ onConditionalValidatorChanged(config: ConditionalValidatorConfig): void;
2920
+ onCollectionValidationChanged(config: CollectionValidatorConfig): void;
2921
+ onChildClicked(childId: string): void;
2922
+ onChildUpdated(event: {
2923
+ nodeId: string;
2924
+ updates: Partial<RuleNode>;
2925
+ }): void;
2926
+ onChildDeleted(childId: string): void;
2927
+ onChildAdded(event: RuleNodeType): void;
2928
+ onChildMoved(event: CdkDragDrop<string[]>): void;
2929
+ onChildDrop(event: CdkDragDrop<string[]>): void;
2930
+ private formatNodeType;
2931
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleNodeComponent, never>;
2932
+ static ɵcmp: i0.ɵɵComponentDeclaration<RuleNodeComponent, "praxis-rule-node", never, { "node": { "alias": "node"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; "level": { "alias": "level"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "validationErrors": { "alias": "validationErrors"; "required": false; }; }, { "nodeClicked": "nodeClicked"; "nodeUpdated": "nodeUpdated"; "nodeDeleted": "nodeDeleted"; "childAdded": "childAdded"; "childMoved": "childMoved"; }, never, never, true, never>;
2933
+ }
2934
+
2935
+ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
2936
+ private fb;
2937
+ config: FieldConditionConfig | null;
2938
+ fieldSchemas: Record<string, FieldSchema>;
2939
+ configChanged: EventEmitter<FieldConditionConfig>;
2940
+ private destroy$;
2941
+ conditionForm: FormGroup;
2942
+ fieldCategories: {
2943
+ name: string;
2944
+ fields: FieldSchema[];
2945
+ }[];
2946
+ contextVariables: any[];
2947
+ customFunctions: any[];
2948
+ selectedField: FieldSchema | null;
2949
+ selectedOperator: string | null;
2950
+ valueType: string;
2951
+ availableOperators: string[];
2952
+ constructor(fb: FormBuilder);
2953
+ ngOnInit(): void;
2954
+ ngOnChanges(changes: SimpleChanges): void;
2955
+ ngOnDestroy(): void;
2956
+ private createForm;
2957
+ private setupFormSubscriptions;
2958
+ private setupFieldCategories;
2959
+ private loadInitialConfig;
2960
+ private emitConfigChange;
2961
+ private processValue;
2962
+ getFieldIcon(type: string): string;
2963
+ getOperatorLabel(operator: string): string;
2964
+ getValuePlaceholder(): string;
2965
+ getValueHint(): string;
2966
+ getBooleanLabel(): string;
2967
+ getCompatibleFields(): FieldSchema[];
2968
+ getPreviewText(): string;
2969
+ private formatValueForPreview;
2970
+ isStringField(): boolean;
2971
+ isNumberField(): boolean;
2972
+ isBooleanField(): boolean;
2973
+ isDateField(): boolean;
2974
+ isEnumField(): boolean;
2975
+ isArrayOperator(): boolean;
2976
+ needsValue(): boolean;
2977
+ onFieldChanged(event: string | MatSelectChange): void;
2978
+ onOperatorChanged(event: MatSelectChange): void;
2979
+ onValueTypeChanged(event: MatSelectChange): void;
2980
+ hasValidationErrors(): boolean;
2981
+ getValidationErrors(): string[];
2982
+ isValid(): boolean;
2983
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionEditorComponent, never>;
2984
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldConditionEditorComponent, "praxis-field-condition-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
2985
+ }
2986
+
2987
+ declare class ConditionalValidatorEditorComponent implements OnInit, OnChanges {
2988
+ private fb;
2989
+ config: ConditionalValidatorConfig | null;
2990
+ fieldSchemas: Record<string, FieldSchema>;
2991
+ configChanged: EventEmitter<ConditionalValidatorConfig>;
2992
+ private destroy$;
2993
+ validatorForm: FormGroup;
2994
+ fieldCategories: {
2995
+ name: string;
2996
+ fields: FieldSchema[];
2997
+ }[];
2998
+ advancedConditions: any[];
2999
+ validatorType: string;
3000
+ targetField: string;
3001
+ conditionMode: string;
3002
+ get showDisabledMessage(): boolean;
3003
+ constructor(fb: FormBuilder);
3004
+ ngOnInit(): void;
3005
+ ngOnChanges(changes: SimpleChanges): void;
3006
+ ngOnDestroy(): void;
3007
+ private createForm;
3008
+ private setupFormSubscriptions;
3009
+ private setupFieldCategories;
3010
+ private loadInitialConfig;
3011
+ private emitConfigChange;
3012
+ getFieldIcon(type: string): string;
3013
+ trackByIndex(index: number): number;
3014
+ getSimpleConditionConfig(): any;
3015
+ getPreviewText(): string;
3016
+ getLogicPreview(): string;
3017
+ onValidatorTypeChanged(event: MatSelectChange): void;
3018
+ onTargetFieldChanged(event: MatSelectChange): void;
3019
+ onConditionModeChanged(event: MatButtonToggleChange): void;
3020
+ onSimpleConditionChanged(condition: any): void;
3021
+ updateAdvancedCondition(index: number, condition: any): void;
3022
+ addCondition(): void;
3023
+ removeCondition(index: number): void;
3024
+ hasValidationErrors(): boolean;
3025
+ getValidationErrors(): string[];
3026
+ isValid(): boolean;
3027
+ private createEmptyCondition;
3028
+ private mapRuleTypeToValidatorType;
3029
+ private mapValidatorTypeToRuleType;
3030
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConditionalValidatorEditorComponent, never>;
3031
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConditionalValidatorEditorComponent, "praxis-conditional-validator-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
3032
+ }
3033
+
3034
+ declare class CollectionValidatorEditorComponent implements OnInit, OnChanges {
3035
+ private fb;
3036
+ config: CollectionValidatorConfig | null;
3037
+ fieldSchemas: Record<string, FieldSchema>;
3038
+ configChanged: EventEmitter<CollectionValidatorConfig>;
3039
+ private destroy$;
3040
+ collectionForm: FormGroup;
3041
+ collectionFieldCategories: {
3042
+ name: string;
3043
+ fields: FieldSchema[];
3044
+ }[];
3045
+ validatorType: string;
3046
+ targetCollection: string;
3047
+ get itemValidationRules(): FormArray;
3048
+ get uniqueByFields(): FormArray;
3049
+ get minItems(): number;
3050
+ get maxItems(): number;
3051
+ get debounceValidation(): boolean;
3052
+ constructor(fb: FormBuilder);
3053
+ ngOnInit(): void;
3054
+ ngOnChanges(changes: SimpleChanges): void;
3055
+ ngOnDestroy(): void;
3056
+ private createForm;
3057
+ private setupFormSubscriptions;
3058
+ private setupFieldCategories;
3059
+ private loadInitialConfig;
3060
+ private loadItemValidationRules;
3061
+ private loadUniqueByFields;
3062
+ private emitConfigChange;
3063
+ private getItemValidationRulesValue;
3064
+ private getUniqueByFieldsValue;
3065
+ getFieldIcon(type: string): string;
3066
+ getLengthErrorPlaceholder(): string;
3067
+ getPreviewText(): string;
3068
+ getForEachRulesPreview(): string;
3069
+ getUniqueFieldsPreview(): string;
3070
+ getLengthConstraintsPreview(): string;
3071
+ onValidatorTypeChanged(event: MatSelectChange): void;
3072
+ onTargetCollectionChanged(event: MatSelectChange): void;
3073
+ addItemValidationRule(): void;
3074
+ removeItemValidationRule(index: number): void;
3075
+ addUniqueField(): void;
3076
+ removeUniqueField(index: number): void;
3077
+ hasValidationErrors(): boolean;
3078
+ getValidationErrors(): string[];
3079
+ isValid(): boolean;
3080
+ private mapRuleTypeToValidatorType;
3081
+ private mapValidatorTypeToRuleType;
3082
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollectionValidatorEditorComponent, never>;
3083
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollectionValidatorEditorComponent, "praxis-collection-validator-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
3084
+ }
3085
+
3086
+ declare class MetadataEditorComponent implements OnInit, OnChanges {
3087
+ private fb;
3088
+ selectedNode: RuleNode | null;
3089
+ metadataUpdated: EventEmitter<SpecificationMetadata>;
3090
+ private destroy$;
3091
+ metadataForm: FormGroup;
3092
+ activeTabIndex: number;
3093
+ hasUnsavedChanges: boolean;
3094
+ availableTags: string[];
3095
+ filteredTags: Observable<string[]>;
3096
+ availableIcons: {
3097
+ value: string;
3098
+ label: string;
3099
+ }[];
3100
+ get customProperties(): FormArray;
3101
+ get documentationLinks(): FormArray;
3102
+ get enableConditionalMetadata(): boolean;
3103
+ constructor(fb: FormBuilder);
3104
+ ngOnInit(): void;
3105
+ ngOnChanges(changes: SimpleChanges): void;
3106
+ ngOnDestroy(): void;
3107
+ private createForm;
3108
+ private setupFormSubscriptions;
3109
+ private setupTagAutocomplete;
3110
+ private filterTags;
3111
+ private loadMetadata;
3112
+ private resetForm;
3113
+ private loadCustomProperties;
3114
+ private loadDocumentationLinks;
3115
+ private emitMetadataUpdate;
3116
+ private cleanUiConfig;
3117
+ private getCustomPropertiesValue;
3118
+ private getDocumentationLinksValue;
3119
+ private inferType;
3120
+ private convertValueByType;
3121
+ getNodeIcon(): string;
3122
+ getNodeTitle(): string;
3123
+ getNodeSubtitle(): string;
3124
+ getNodeTypeIcon(type: string): string;
3125
+ getMetadataPreview(): string;
3126
+ addCustomProperty(): void;
3127
+ removeCustomProperty(index: number): void;
3128
+ addDocumentationLink(): void;
3129
+ removeDocumentationLink(index: number): void;
3130
+ static ɵfac: i0.ɵɵFactoryDeclaration<MetadataEditorComponent, never>;
3131
+ static ɵcmp: i0.ɵɵComponentDeclaration<MetadataEditorComponent, "praxis-metadata-editor", never, { "selectedNode": { "alias": "selectedNode"; "required": false; }; }, { "metadataUpdated": "metadataUpdated"; }, never, never, true, never>;
3132
+ }
3133
+
3134
+ declare class DslViewerComponent implements OnInit, OnChanges {
3135
+ private snackBar;
3136
+ dsl: string;
3137
+ editable: boolean;
3138
+ language: string;
3139
+ theme: string;
3140
+ dslChanged: EventEmitter<string>;
3141
+ validationChanged: EventEmitter<{
3142
+ valid: boolean;
3143
+ errors: any[];
3144
+ warnings: any[];
3145
+ }>;
3146
+ editorContainer: ElementRef;
3147
+ private destroy$;
3148
+ private monacoEditor;
3149
+ private originalDsl;
3150
+ isLoading: boolean;
3151
+ hasChanges: boolean;
3152
+ showErrors: boolean;
3153
+ syntaxErrors: any[];
3154
+ warnings: any[];
3155
+ cursorPosition: {
3156
+ line: number;
3157
+ column: number;
3158
+ } | null;
3159
+ showLineNumbers: boolean;
3160
+ wordWrap: boolean;
3161
+ showMinimap: boolean;
3162
+ constructor(snackBar: MatSnackBar);
3163
+ ngOnInit(): void;
3164
+ ngOnChanges(changes: SimpleChanges): void;
3165
+ ngOnDestroy(): void;
3166
+ private initializeMonacoEditor;
3167
+ private loadMonacoEditor;
3168
+ private createEditor;
3169
+ private createFallbackEditor;
3170
+ private setupEditorEvents;
3171
+ private updateEditorContent;
3172
+ private updateEditorOptions;
3173
+ private onContentChanged;
3174
+ private updateCursorPosition;
3175
+ private validateSyntaxDebounced;
3176
+ private debounce;
3177
+ getValidationStatusClass(): string;
3178
+ getValidationIcon(): string;
3179
+ getValidationText(): string;
3180
+ getEditorInfo(): string;
3181
+ formatCode(): void;
3182
+ validateSyntax(): void;
3183
+ applyChanges(): void;
3184
+ discardChanges(): void;
3185
+ copyToClipboard(): void;
3186
+ downloadDsl(): void;
3187
+ toggleLineNumbers(): void;
3188
+ toggleWordWrap(): void;
3189
+ toggleMinimap(): void;
3190
+ showErrorDetails(): void;
3191
+ hideErrorDetails(): void;
3192
+ goToError(error: any): void;
3193
+ private formatDslCode;
3194
+ private calculateIndentationDepth;
3195
+ private validateDslSyntax;
3196
+ static ɵfac: i0.ɵɵFactoryDeclaration<DslViewerComponent, never>;
3197
+ static ɵcmp: i0.ɵɵComponentDeclaration<DslViewerComponent, "praxis-dsl-viewer", never, { "dsl": { "alias": "dsl"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "language": { "alias": "language"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "dslChanged": "dslChanged"; "validationChanged": "validationChanged"; }, never, never, true, never>;
3198
+ }
3199
+
3200
+ declare class JsonViewerComponent implements OnInit, OnChanges {
3201
+ private snackBar;
3202
+ json: any;
3203
+ editable: boolean;
3204
+ jsonChanged: EventEmitter<any>;
3205
+ formattedJson: string;
3206
+ originalJson: string;
3207
+ hasChanges: boolean;
3208
+ validationError: string;
3209
+ showLineNumbers: boolean;
3210
+ wordWrap: boolean;
3211
+ constructor(snackBar: MatSnackBar);
3212
+ ngOnInit(): void;
3213
+ ngOnChanges(changes: SimpleChanges): void;
3214
+ private updateJsonContent;
3215
+ onJsonInput(event: any): void;
3216
+ getValidationStatusClass(): string;
3217
+ getValidationIcon(): string;
3218
+ getValidationText(): string;
3219
+ getEditorInfo(): string;
3220
+ getLineNumbers(): number[];
3221
+ formatJson(): void;
3222
+ validateJson(): void;
3223
+ applyChanges(): void;
3224
+ discardChanges(): void;
3225
+ copyToClipboard(): void;
3226
+ downloadJson(): void;
3227
+ toggleLineNumbers(): void;
3228
+ toggleWordWrap(): void;
3229
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonViewerComponent, never>;
3230
+ static ɵcmp: i0.ɵɵComponentDeclaration<JsonViewerComponent, "praxis-json-viewer", never, { "json": { "alias": "json"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, { "jsonChanged": "jsonChanged"; }, never, never, true, never>;
3231
+ }
3232
+
3233
+ declare class RoundTripTesterComponent implements OnInit {
3234
+ private roundTripValidator;
3235
+ private ruleBuilderService;
3236
+ private snackBar;
3237
+ private cdr;
3238
+ isRunning: boolean;
3239
+ showTestCases: boolean;
3240
+ lastTestResult: RoundTripValidationResult | null;
3241
+ testSuiteResults: any;
3242
+ defaultTestCases: RoundTripTestCase[];
3243
+ hasCurrentRule: boolean;
3244
+ constructor(roundTripValidator: RoundTripValidatorService, ruleBuilderService: RuleBuilderService, snackBar: MatSnackBar, cdr: ChangeDetectorRef);
3245
+ ngOnInit(): void;
3246
+ private loadDefaultTestCases;
3247
+ private checkCurrentRule;
3248
+ runCurrentRuleTest(): void;
3249
+ runTestSuite(): void;
3250
+ clearResults(): void;
3251
+ private buildCompleteRuleTree;
3252
+ getCurrentRuleType(): string;
3253
+ getCurrentRuleLabel(): string;
3254
+ getTestCaseColor(testCase: RoundTripTestCase): 'primary' | 'accent' | 'warn';
3255
+ getResultSummary(): string;
3256
+ getStatusClass(result: RoundTripValidationResult): string;
3257
+ getStatusIcon(result: RoundTripValidationResult): string;
3258
+ getStages(result: RoundTripValidationResult): any[];
3259
+ getIntegrityChecks(result: RoundTripValidationResult): any[];
3260
+ getSuccessRate(): number;
3261
+ getSuccessRateClass(): string;
3262
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoundTripTesterComponent, never>;
3263
+ static ɵcmp: i0.ɵɵComponentDeclaration<RoundTripTesterComponent, "praxis-round-trip-tester", never, {}, {}, never, never, true, never>;
3264
+ }
3265
+
3266
+ interface ExportDialogData {
3267
+ title?: string;
3268
+ allowMultipleFormats?: boolean;
3269
+ preselectedFormat?: string;
3270
+ showIntegrationTab?: boolean;
3271
+ showSharingTab?: boolean;
3272
+ }
3273
+ declare class ExportDialogComponent implements OnInit {
3274
+ dialogRef: MatDialogRef<ExportDialogComponent>;
3275
+ data: ExportDialogData;
3276
+ private fb;
3277
+ private exportService;
3278
+ private snackBar;
3279
+ private cdr;
3280
+ exportForm: FormGroup;
3281
+ integrationForm: FormGroup;
3282
+ sharingForm: FormGroup;
3283
+ activeTabIndex: number;
3284
+ isProcessing: boolean;
3285
+ enableBatchExport: boolean;
3286
+ isTestingConnectivity: boolean;
3287
+ supportedFormats: ExportFormat[];
3288
+ selectedFormat: ExportFormat | null;
3289
+ externalSystems: ExternalSystemConfig[];
3290
+ selectedSystem: ExternalSystemConfig | null;
3291
+ exportResults: ExportResult[];
3292
+ integrationResults: any[];
3293
+ shareResult: any;
3294
+ constructor(dialogRef: MatDialogRef<ExportDialogComponent>, data: ExportDialogData, fb: FormBuilder, exportService: ExportIntegrationService, snackBar: MatSnackBar, cdr: ChangeDetectorRef);
3295
+ ngOnInit(): void;
3296
+ private createExportForm;
3297
+ private createIntegrationForm;
3298
+ private createSharingForm;
3299
+ private loadSupportedFormats;
3300
+ private loadExternalSystems;
3301
+ selectFormat(formatId: string): void;
3302
+ isFormatSelected(formatId: string): boolean;
3303
+ onSystemChange(event: MatSelectChange): void;
3304
+ testConnectivity(): Promise<void>;
3305
+ onExport(): Promise<void>;
3306
+ onIntegrate(): Promise<void>;
3307
+ onCreateShare(): Promise<void>;
3308
+ canExport(): boolean;
3309
+ canIntegrate(): boolean;
3310
+ canShare(): boolean;
3311
+ downloadResult(result: ExportResult): void;
3312
+ previewResult(result: ExportResult): void;
3313
+ copyToClipboard(content: string): void;
3314
+ copyShareUrl(): void;
3315
+ formatFileSize(bytes: number): string;
3316
+ onCancel(): void;
3317
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportDialogComponent, never>;
3318
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExportDialogComponent, "praxis-export-dialog", never, {}, {}, never, never, true, never>;
3319
+ }
3320
+
3321
+ interface DslLintError {
3322
+ id: string;
3323
+ line: number;
3324
+ column: number;
3325
+ length: number;
3326
+ severity: 'error' | 'warning' | 'info' | 'hint';
3327
+ code: string;
3328
+ message: string;
3329
+ suggestion?: string;
3330
+ quickFix?: DslQuickFix;
3331
+ category: 'syntax' | 'semantic' | 'style' | 'performance' | 'best-practice';
3332
+ tags?: string[];
3333
+ }
3334
+ interface DslQuickFix {
3335
+ title: string;
3336
+ description: string;
3337
+ edits: DslEdit[];
3338
+ }
3339
+ interface DslEdit {
3340
+ range: {
3341
+ startLine: number;
3342
+ startColumn: number;
3343
+ endLine: number;
3344
+ endColumn: number;
3345
+ };
3346
+ newText: string;
3347
+ }
3348
+ interface DslLintStats {
3349
+ totalErrors: number;
3350
+ totalWarnings: number;
3351
+ totalInfos: number;
3352
+ totalHints: number;
3353
+ complexity: number;
3354
+ maintainabilityIndex: number;
3355
+ lastLintTime: Date;
3356
+ lintDuration: number;
3357
+ }
3358
+ interface DslLintRule {
3359
+ id: string;
3360
+ name: string;
3361
+ description: string;
3362
+ category: string;
3363
+ severity: 'error' | 'warning' | 'info' | 'hint';
3364
+ enabled: boolean;
3365
+ configurable: boolean;
3366
+ config?: any;
3367
+ }
3368
+ declare class DslLinterComponent implements OnInit, OnDestroy {
3369
+ private ruleBuilderService;
3370
+ private specificationBridge;
3371
+ private cdr;
3372
+ dsl: string;
3373
+ autoLint: boolean;
3374
+ lintDelay: number;
3375
+ errorSelected: EventEmitter<DslLintError>;
3376
+ quickFixApplied: EventEmitter<{
3377
+ error: DslLintError;
3378
+ fix: DslQuickFix;
3379
+ }>;
3380
+ ruleToggled: EventEmitter<{
3381
+ rule: DslLintRule;
3382
+ enabled: boolean;
3383
+ }>;
3384
+ private destroy$;
3385
+ private lintSubject;
3386
+ isLinting: boolean;
3387
+ activeTabIndex: number;
3388
+ allErrors: DslLintError[];
3389
+ filteredErrors: DslLintError[];
3390
+ selectedSeverities: string[];
3391
+ selectedCategories: string[];
3392
+ stats: DslLintStats;
3393
+ lintRules: DslLintRule[];
3394
+ constructor(ruleBuilderService: RuleBuilderService, specificationBridge: SpecificationBridgeService, cdr: ChangeDetectorRef);
3395
+ ngOnInit(): void;
3396
+ ngOnDestroy(): void;
3397
+ private setupSubscriptions;
3398
+ private initializeLinting;
3399
+ private triggerLinting;
3400
+ runLinting(): void;
3401
+ private performLinting;
3402
+ private analyzeDsl;
3403
+ private checkSyntaxRules;
3404
+ private checkSemanticRules;
3405
+ private checkStyleRules;
3406
+ private checkPerformanceRules;
3407
+ private checkBestPracticeRules;
3408
+ private isRuleEnabled;
3409
+ private getRuleConfig;
3410
+ private updateStats;
3411
+ private calculateComplexity;
3412
+ private calculateMaintainabilityIndex;
3413
+ toggleAutoLint(): void;
3414
+ onSeverityFilterChange(event: MatSelectChange): void;
3415
+ onCategoryFilterChange(event: MatSelectChange): void;
3416
+ private applyFilters;
3417
+ trackByErrorId(index: number, error: DslLintError): string;
3418
+ getSeverityIcon(severity: string): string;
3419
+ getComplexityClass(complexity: number): string;
3420
+ getMaintainabilityClass(maintainability: number): string;
3421
+ getIssueDistribution(): any[];
3422
+ getMostCommonIssues(): any[];
3423
+ getRuleCategories(): any[];
3424
+ navigateToError(error: DslLintError): void;
3425
+ applyQuickFix(error: DslLintError): void;
3426
+ ignoreError(error: DslLintError): void;
3427
+ toggleRule(rule: DslLintRule, change: MatSlideToggleChange): void;
3428
+ configureRule(rule: DslLintRule): void;
3429
+ openLinterSettings(): void;
3430
+ static ɵfac: i0.ɵɵFactoryDeclaration<DslLinterComponent, never>;
3431
+ static ɵcmp: i0.ɵɵComponentDeclaration<DslLinterComponent, "praxis-dsl-linter", never, { "dsl": { "alias": "dsl"; "required": false; }; "autoLint": { "alias": "autoLint"; "required": false; }; "lintDelay": { "alias": "lintDelay"; "required": false; }; }, { "errorSelected": "errorSelected"; "quickFixApplied": "quickFixApplied"; "ruleToggled": "ruleToggled"; }, never, never, true, never>;
3432
+ }
3433
+
3434
+ /**
3435
+ * Placeholder Visual Rule Builder Component
3436
+ *
3437
+ * This is a placeholder component for the template integration example.
3438
+ * In a real implementation, this would be the main visual rule builder interface.
3439
+ */
3440
+ declare class VisualRuleBuilderComponent {
3441
+ fieldSchemas: any[];
3442
+ builderState: RuleBuilderState | null;
3443
+ stateChanged: EventEmitter<RuleBuilderState>;
3444
+ selectionChanged: EventEmitter<any[]>;
3445
+ get nodeCount(): number;
3446
+ addSampleNode(): void;
3447
+ clearNodes(): void;
3448
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisualRuleBuilderComponent, never>;
3449
+ static ɵcmp: i0.ɵɵComponentDeclaration<VisualRuleBuilderComponent, "praxis-visual-rule-builder", never, { "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; "builderState": { "alias": "builderState"; "required": false; }; }, { "stateChanged": "stateChanged"; "selectionChanged": "selectionChanged"; }, never, never, true, never>;
3450
+ }
3451
+
3452
+ /**
3453
+ * Template display mode
3454
+ */
3455
+ type TemplateDisplayMode = 'grid' | 'list' | 'compact';
3456
+ /**
3457
+ * Template sort option
3458
+ */
3459
+ interface TemplateSortOption {
3460
+ field: keyof RuleTemplate | keyof TemplateMetadata;
3461
+ direction: 'asc' | 'desc';
3462
+ label: string;
3463
+ }
3464
+ declare class TemplateGalleryComponent implements OnInit, OnDestroy {
3465
+ private templateService;
3466
+ private fb;
3467
+ private dialog;
3468
+ private snackBar;
3469
+ availableFields: string[];
3470
+ templateApplied: EventEmitter<RuleTemplate>;
3471
+ templateCreated: EventEmitter<RuleTemplate>;
3472
+ templateDeleted: EventEmitter<string>;
3473
+ private destroy$;
3474
+ searchForm: FormGroup;
3475
+ displayMode: TemplateDisplayMode;
3476
+ showPreview: boolean;
3477
+ selectedTags: Set<string>;
3478
+ popularTags: string[];
3479
+ templates$: Observable<RuleTemplate[]>;
3480
+ categories$: Observable<TemplateCategory[]>;
3481
+ recentlyUsed$: Observable<RuleTemplate[]>;
3482
+ stats$: Observable<TemplateStats>;
3483
+ filteredTemplates$: Observable<RuleTemplate[]>;
3484
+ Array: ArrayConstructor;
3485
+ constructor(templateService: RuleTemplateService, fb: FormBuilder, dialog: MatDialog, snackBar: MatSnackBar);
3486
+ ngOnInit(): void;
3487
+ ngOnDestroy(): void;
3488
+ private createSearchForm;
3489
+ private createFilteredTemplatesStream;
3490
+ private setupFormSubscriptions;
3491
+ private loadPopularTags;
3492
+ private filterTemplates;
3493
+ private sortTemplates;
3494
+ trackByTemplateId(index: number, template: RuleTemplate): string;
3495
+ setDisplayMode(mode: TemplateDisplayMode): void;
3496
+ toggleTag(tag: string): void;
3497
+ hasActiveFilters(): boolean;
3498
+ clearFilter(field: string): void;
3499
+ clearAllFilters(): void;
3500
+ getCategoryName(categoryId: string): string;
3501
+ getRelativeDate(date?: Date | string): string;
3502
+ getNodeLabel(template: RuleTemplate, nodeId: string): string;
3503
+ showCreateTemplateDialog(selectedNodes?: RuleNode[]): void;
3504
+ importTemplate(): void;
3505
+ applyTemplate(template: RuleTemplate): void;
3506
+ previewTemplate(template: RuleTemplate): void;
3507
+ editTemplate(template: RuleTemplate): void;
3508
+ duplicateTemplate(template: RuleTemplate): void;
3509
+ exportTemplate(template: RuleTemplate): void;
3510
+ deleteTemplate(template: RuleTemplate): void;
3511
+ private downloadFile;
3512
+ static ɵfac: i0.ɵɵFactoryDeclaration<TemplateGalleryComponent, never>;
3513
+ static ɵcmp: i0.ɵɵComponentDeclaration<TemplateGalleryComponent, "praxis-template-gallery", never, { "availableFields": { "alias": "availableFields"; "required": false; }; }, { "templateApplied": "templateApplied"; "templateCreated": "templateCreated"; "templateDeleted": "templateDeleted"; }, never, never, true, never>;
3514
+ }
3515
+
3516
+ interface TemplateEditorDialogData {
3517
+ mode: 'create' | 'edit';
3518
+ template?: RuleTemplate;
3519
+ selectedNodes?: RuleNode[];
3520
+ availableCategories?: string[];
3521
+ }
3522
+ interface TemplateEditorResult {
3523
+ action: 'save' | 'cancel';
3524
+ template?: RuleTemplate;
3525
+ }
3526
+ declare class TemplateEditorDialogComponent implements OnInit {
3527
+ private dialogRef;
3528
+ data: TemplateEditorDialogData;
3529
+ private fb;
3530
+ private templateService;
3531
+ private bridgeService;
3532
+ private snackBar;
3533
+ basicInfoForm: FormGroup;
3534
+ rulesForm: FormGroup;
3535
+ advancedForm: FormGroup;
3536
+ tags: string[];
3537
+ requiredFields: string[];
3538
+ separatorKeysCodes: number[];
3539
+ availableCategories: {
3540
+ id: string;
3541
+ name: string;
3542
+ icon: string;
3543
+ }[];
3544
+ availableIcons: {
3545
+ value: string;
3546
+ label: string;
3547
+ }[];
3548
+ previewNodes: RuleNode[];
3549
+ detectedVariables: string[];
3550
+ get nodeCount(): number;
3551
+ constructor(dialogRef: MatDialogRef<TemplateEditorDialogComponent>, data: TemplateEditorDialogData, fb: FormBuilder, templateService: RuleTemplateService, bridgeService: SpecificationBridgeService, snackBar: MatSnackBar);
3552
+ ngOnInit(): void;
3553
+ private createBasicInfoForm;
3554
+ private createRulesForm;
3555
+ private createAdvancedForm;
3556
+ private loadTemplateData;
3557
+ private setupPreviewNodes;
3558
+ private detectTemplateVariables;
3559
+ addTag(event: MatChipInputEvent): void;
3560
+ removeTag(tag: string): void;
3561
+ addRequiredField(event: MatChipInputEvent): void;
3562
+ removeRequiredField(field: string): void;
3563
+ isRootNode(node: RuleNode): boolean;
3564
+ getNodeIcon(node: RuleNode): string;
3565
+ canSave(): boolean;
3566
+ canPreview(): boolean;
3567
+ saveTemplate(): void;
3568
+ previewTemplate(): void;
3569
+ deleteTemplate(): void;
3570
+ cancel(): void;
3571
+ private calculateComplexity;
3572
+ static ɵfac: i0.ɵɵFactoryDeclaration<TemplateEditorDialogComponent, never>;
3573
+ static ɵcmp: i0.ɵɵComponentDeclaration<TemplateEditorDialogComponent, "praxis-template-editor-dialog", never, {}, {}, never, never, true, never>;
3574
+ }
3575
+
3576
+ interface TemplatePreviewDialogData {
3577
+ template: RuleTemplate;
3578
+ }
3579
+ declare class TemplatePreviewDialogComponent {
3580
+ private dialogRef;
3581
+ data: TemplatePreviewDialogData;
3582
+ constructor(dialogRef: MatDialogRef<TemplatePreviewDialogComponent>, data: TemplatePreviewDialogData);
3583
+ getRootNode(nodeId: string): RuleNode | undefined;
3584
+ getNodeHierarchy(rootNodeId: string): {
3585
+ node: RuleNode;
3586
+ level: number;
3587
+ }[];
3588
+ getNodeIcon(node?: RuleNode): string;
3589
+ getNodeDescription(node?: RuleNode): string;
3590
+ formatConfig(config: any): string;
3591
+ formatDate(date?: Date | string): string;
3592
+ applyTemplate(): void;
3593
+ exportTemplate(): void;
3594
+ cancel(): void;
3595
+ static ɵfac: i0.ɵɵFactoryDeclaration<TemplatePreviewDialogComponent, never>;
3596
+ static ɵcmp: i0.ɵɵComponentDeclaration<TemplatePreviewDialogComponent, "praxis-template-preview-dialog", never, {}, {}, never, never, true, never>;
3597
+ }
3598
+
3599
+ export { ArrayFieldAnalyzer, CollectionValidatorEditorComponent, ConditionalValidatorEditorComponent, ConditionalValidatorType, ConfigurationError, ContextError, ContextManagementService, ConversionError, ConverterFactoryService, DslError, DslLinterComponent, DslParsingService, DslViewerComponent, ErrorCategory, ErrorHandler, ErrorSeverity, ExportDialogComponent, ExportIntegrationService, FIELD_TYPE_OPERATORS, FieldConditionEditorComponent, FieldSchemaService, FieldType, InternalError, JsonViewerComponent, MetadataEditorComponent, OPERATOR_LABELS, PraxisVisualBuilder, RegistryError, RoundTripTesterComponent, RoundTripValidatorService, RuleBuilderService, RuleCanvasComponent, RuleConversionService, RuleEditorComponent, RuleNodeComponent, RuleNodeRegistryService, RuleNodeType, RuleTemplateService, RuleValidationService, SpecificationBridgeService, TemplateEditorDialogComponent, TemplateGalleryComponent, TemplatePreviewDialogComponent, ValidationError as VBValidationError, ValidationCategory, ValidationSeverity, VisualBuilderError, VisualRuleBuilderComponent, WebhookIntegrationService, createError, getArrayItemFieldPaths, globalErrorHandler, isArrayFieldSchema };
3600
+ export type { ArrayCollectionValidationRule, ArrayFieldSchema, ArrayValidationContext, ArrayValidationError, BooleanGroupConfig, CardinalityConfig, CircularReference, CleanupResult, CollectionValidationConfig, CollectionValidatorConfig, ConditionalValidatorConfig, ConditionalValidatorPreview, ContextEntry, ContextScope, ContextValue, ContextVariable, ContextualConfig$1 as ContextualConfig, ContextualTemplateConfig, ConversionStatistics, ConversionValidationResult, ConverterStatistics, CustomConfig, CustomFunction, DslEdit, DslLintError, DslLintRule, DslLintStats, DslParsingConfig, DslParsingResult, DslQuickFix, EnhancedFieldSchema, ErrorInfo, ErrorStatistics, ExportDialogData, ExportFormat, ExportOptions, ExportResult, ExpressionConfig, ExternalSystemConfig, FieldConditionConfig, FieldFormat, FieldOption, FieldSchema, FieldSchemaContext, FieldToFieldConfig, FieldUIConfig, FunctionCallConfig, FunctionParameter, ImportOptions, IntegrationEndpoint, IntegrationResult, MemoryStats, OptionalFieldConfig, RegistryIntegrityResult, RegistryValidationResult, RoundTripTestCase, RoundTripValidationResult, RuleBuilderConfig, RuleBuilderSnapshot, RuleBuilderState, RuleNode, RuleNodeConfig, RuleNodeTree, RuleNodeTypeString, RuleTemplate, RuleValidationResult, SpecificationContextualConfig, TemplateApplicationResult, TemplateCategory, TemplateDisplayMode, TemplateEditorDialogData, TemplateEditorResult, TemplateMetadata, TemplatePreviewDialogData, TemplateSearchCriteria, TemplateSortOption, TemplateStats, TemplateValidationResult, ValidComparisonOperator, ValidationConfig, ValidationContext, ValidationError$1 as ValidationError, ValidationIssue, ValidationResult, ValidationRule, ValueType, WebhookConfig, WebhookDelivery, WebhookEvent, WebhookStats };