@timeax/digital-service-engine 0.3.4 → 0.3.6

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.
@@ -177,7 +177,7 @@ type NodeRef = {
177
177
  };
178
178
  type NodeMap = Map<string, NodeRef>;
179
179
 
180
- type ValidationCode = "root_missing" | "cycle_in_tags" | "bad_bind_reference" | "duplicate_id" | "duplicate_tag_label" | "duplicate_field_name" | "label_missing" | "duplicate_visible_label" | "bad_option_key" | "option_include_exclude_conflict" | "service_field_missing_service_id" | "user_input_field_has_service_option" | "rate_mismatch_across_base" | "rate_coherence_violation" | "utility_without_base" | "unsupported_constraint" | "constraint_contradiction" | "custom_component_missing" | "policy_violation" | "field_unbound" | "constraint_overridden" | "unsupported_constraint_option" | "custom_component_unresolvable" | "quantity_multiple_markers" | "utility_with_service_id" | "utility_missing_rate" | "utility_invalid_mode" | "fallback_bad_node" | "fallback_unknown_service" | "fallback_cycle" | "fallback_no_primary" | "fallback_rate_violation" | "fallback_constraint_mismatch" | "fallback_no_tag_context" | "field_validation_invalid_rule" | "field_validation_invalid_op" | "field_validation_eval_missing_code" | "field_validation_between_missing_bounds" | "field_validation_match_missing_pattern" | "multiple_order_kinds_selected";
180
+ type ValidationCode = "root_missing" | "cycle_in_tags" | "bad_bind_reference" | "duplicate_id" | "duplicate_tag_label" | "duplicate_field_name" | "label_missing" | "duplicate_visible_label" | "bad_option_key" | "bad_option_effect_key" | "bad_option_effect_target" | "bad_option_effect_option" | "option_include_exclude_conflict" | "visibility_dependency_cycle" | "service_field_missing_service_id" | "user_input_field_has_service_option" | "rate_mismatch_across_base" | "rate_coherence_violation" | "utility_without_base" | "unsupported_constraint" | "constraint_contradiction" | "custom_component_missing" | "policy_violation" | "field_unbound" | "constraint_overridden" | "unsupported_constraint_option" | "custom_component_unresolvable" | "quantity_multiple_markers" | "utility_with_service_id" | "utility_missing_rate" | "utility_invalid_mode" | "fallback_bad_node" | "fallback_unknown_service" | "fallback_cycle" | "fallback_no_primary" | "fallback_rate_violation" | "fallback_constraint_mismatch" | "fallback_no_tag_context" | "field_validation_invalid_rule" | "field_validation_invalid_op" | "field_validation_eval_missing_code" | "field_validation_between_missing_bounds" | "field_validation_match_missing_pattern" | "multiple_order_kinds_selected";
181
181
  type ValidationError = {
182
182
  code: ValidationCode;
183
183
  message: string;
@@ -580,6 +580,22 @@ type FieldOption = {
580
580
  service_id?: ServiceIdRef;
581
581
  pricing_role?: PricingRole;
582
582
  meta?: Record<string, unknown> & UtilityMark & WithQuantityDefault;
583
+ children?: FieldOption[];
584
+ };
585
+ type OptionEffectForButton = {
586
+ /**
587
+ * If true, selecting this button/option may force the target field visible.
588
+ * If false/missing, the option filter only applies when the target field is already visible.
589
+ */
590
+ forceVisible?: boolean;
591
+ /**
592
+ * If present, only these option ids remain visible.
593
+ */
594
+ include?: string[];
595
+ /**
596
+ * Removed after include is applied.
597
+ */
598
+ exclude?: string[];
583
599
  };
584
600
  type Field = BaseFieldUI & {
585
601
  id: string;
@@ -638,6 +654,7 @@ type ServiceProps = {
638
654
  fields: Field[];
639
655
  includes_for_buttons?: Record<string, string[]>;
640
656
  excludes_for_buttons?: Record<string, string[]>;
657
+ option_effects_for_buttons?: Record<string, Record<string, OptionEffectForButton>>;
641
658
  schema_version?: string;
642
659
  fallbacks?: ServiceFallback;
643
660
  name?: string;
@@ -988,4 +1005,4 @@ type EditorSnapshot = {
988
1005
  /** Exported alias so the schema generator can target an array */
989
1006
  type AdminPolicies = DynamicRule[];
990
1007
 
991
- export { type AdminPolicies, type BaseFieldUI, type ButtonValue, type CanvasEvents, type CanvasOptions, type CanvasState, type CatalogGroupNode, type CatalogId, type CatalogNode, type CatalogNodeBase, type CatalogNodeKind, type CatalogServiceId, type CatalogSmartGroupNode, type CatalogSmartRule, type CatalogViewMode, type Command, type CommentAnchor, type CommentId, type CommentMessage, type CommentNode, type CommentThread, type ConnectKind, type ConstraintKey, type DgpServiceCapability, type DgpServiceMap, type DraftWire, type DynamicRule, type EdgeKind, type EdgeRoute, type EdgeView, type EditorEvents, type EditorOptions, type EditorSnapshot, type FallbackCandidateCheck, type FallbackCheckReason, type FallbackCheckResult, type FallbackDiagnostics, type FallbackEditor, type FallbackEditorOptions, type FallbackEditorServiceMap, type FallbackEditorServiceRecord, type FallbackEditorState, type FallbackEligibleSource, type FallbackMutationOptions, type FallbackRegistration, type FallbackRegistrationScope, type FallbackScopeRef, type FallbackSettings, type Field, type FieldOption, type FieldType, type FieldValidationOp, type FieldValidationRule, type FieldValidationValueBy, type FieldWithTypedDefaults, type FlagKey, type FlowNode, type GraphEdge, type GraphNode, type GraphSnapshot, type IdType, type LayoutState, type NodeIdRef, type NodeKind, type NodePos, type NodePositions, type NodeView, type NoticeKind, type NoticeSeverity, type NoticeTarget, type NoticeType, type OrderKindSource, type OrderSnapshot, type PricingRole, type QuantityMark, type QuantityRule, type RatePolicy, type Scalar, type ServiceCatalogState, type ServiceEstimates, type ServiceFallback, type ServiceFallbacks, type ServiceFlag, type ServiceFlags, type ServiceIdRef, type ServiceProps, type ServicePropsNotice, type ServiceWhereClause, type ServiceWhereOp, type SnapshotContext, type SpeedEstimate, type Tag, type ThreadId, type TimeRangeEstimate, type Ui, type UiAnyOf, type UiArray, type UiBoolean, type UiNumber, type UiObject, type UiString, type UiValue, type UtilityLineItem, type UtilityMark, type UtilityMode, type ValidationCode, type ValidationError, type ValidatorOptions, type Viewport, type WithQuantityDefault, createFallbackEditor };
1008
+ export { type AdminPolicies, type BaseFieldUI, type ButtonValue, type CanvasEvents, type CanvasOptions, type CanvasState, type CatalogGroupNode, type CatalogId, type CatalogNode, type CatalogNodeBase, type CatalogNodeKind, type CatalogServiceId, type CatalogSmartGroupNode, type CatalogSmartRule, type CatalogViewMode, type Command, type CommentAnchor, type CommentId, type CommentMessage, type CommentNode, type CommentThread, type ConnectKind, type ConstraintKey, type DgpServiceCapability, type DgpServiceMap, type DraftWire, type DynamicRule, type EdgeKind, type EdgeRoute, type EdgeView, type EditorEvents, type EditorOptions, type EditorSnapshot, type FallbackCandidateCheck, type FallbackCheckReason, type FallbackCheckResult, type FallbackDiagnostics, type FallbackEditor, type FallbackEditorOptions, type FallbackEditorServiceMap, type FallbackEditorServiceRecord, type FallbackEditorState, type FallbackEligibleSource, type FallbackMutationOptions, type FallbackRegistration, type FallbackRegistrationScope, type FallbackScopeRef, type FallbackSettings, type Field, type FieldOption, type FieldType, type FieldValidationOp, type FieldValidationRule, type FieldValidationValueBy, type FieldWithTypedDefaults, type FlagKey, type FlowNode, type GraphEdge, type GraphNode, type GraphSnapshot, type IdType, type LayoutState, type NodeIdRef, type NodeKind, type NodePos, type NodePositions, type NodeView, type NoticeKind, type NoticeSeverity, type NoticeTarget, type NoticeType, type OptionEffectForButton, type OrderKindSource, type OrderSnapshot, type PricingRole, type QuantityMark, type QuantityRule, type RatePolicy, type Scalar, type ServiceCatalogState, type ServiceEstimates, type ServiceFallback, type ServiceFallbacks, type ServiceFlag, type ServiceFlags, type ServiceIdRef, type ServiceProps, type ServicePropsNotice, type ServiceWhereClause, type ServiceWhereOp, type SnapshotContext, type SpeedEstimate, type Tag, type ThreadId, type TimeRangeEstimate, type Ui, type UiAnyOf, type UiArray, type UiBoolean, type UiNumber, type UiObject, type UiString, type UiValue, type UtilityLineItem, type UtilityMark, type UtilityMode, type ValidationCode, type ValidationError, type ValidatorOptions, type Viewport, type WithQuantityDefault, createFallbackEditor };
@@ -177,7 +177,7 @@ type NodeRef = {
177
177
  };
178
178
  type NodeMap = Map<string, NodeRef>;
179
179
 
180
- type ValidationCode = "root_missing" | "cycle_in_tags" | "bad_bind_reference" | "duplicate_id" | "duplicate_tag_label" | "duplicate_field_name" | "label_missing" | "duplicate_visible_label" | "bad_option_key" | "option_include_exclude_conflict" | "service_field_missing_service_id" | "user_input_field_has_service_option" | "rate_mismatch_across_base" | "rate_coherence_violation" | "utility_without_base" | "unsupported_constraint" | "constraint_contradiction" | "custom_component_missing" | "policy_violation" | "field_unbound" | "constraint_overridden" | "unsupported_constraint_option" | "custom_component_unresolvable" | "quantity_multiple_markers" | "utility_with_service_id" | "utility_missing_rate" | "utility_invalid_mode" | "fallback_bad_node" | "fallback_unknown_service" | "fallback_cycle" | "fallback_no_primary" | "fallback_rate_violation" | "fallback_constraint_mismatch" | "fallback_no_tag_context" | "field_validation_invalid_rule" | "field_validation_invalid_op" | "field_validation_eval_missing_code" | "field_validation_between_missing_bounds" | "field_validation_match_missing_pattern" | "multiple_order_kinds_selected";
180
+ type ValidationCode = "root_missing" | "cycle_in_tags" | "bad_bind_reference" | "duplicate_id" | "duplicate_tag_label" | "duplicate_field_name" | "label_missing" | "duplicate_visible_label" | "bad_option_key" | "bad_option_effect_key" | "bad_option_effect_target" | "bad_option_effect_option" | "option_include_exclude_conflict" | "visibility_dependency_cycle" | "service_field_missing_service_id" | "user_input_field_has_service_option" | "rate_mismatch_across_base" | "rate_coherence_violation" | "utility_without_base" | "unsupported_constraint" | "constraint_contradiction" | "custom_component_missing" | "policy_violation" | "field_unbound" | "constraint_overridden" | "unsupported_constraint_option" | "custom_component_unresolvable" | "quantity_multiple_markers" | "utility_with_service_id" | "utility_missing_rate" | "utility_invalid_mode" | "fallback_bad_node" | "fallback_unknown_service" | "fallback_cycle" | "fallback_no_primary" | "fallback_rate_violation" | "fallback_constraint_mismatch" | "fallback_no_tag_context" | "field_validation_invalid_rule" | "field_validation_invalid_op" | "field_validation_eval_missing_code" | "field_validation_between_missing_bounds" | "field_validation_match_missing_pattern" | "multiple_order_kinds_selected";
181
181
  type ValidationError = {
182
182
  code: ValidationCode;
183
183
  message: string;
@@ -580,6 +580,22 @@ type FieldOption = {
580
580
  service_id?: ServiceIdRef;
581
581
  pricing_role?: PricingRole;
582
582
  meta?: Record<string, unknown> & UtilityMark & WithQuantityDefault;
583
+ children?: FieldOption[];
584
+ };
585
+ type OptionEffectForButton = {
586
+ /**
587
+ * If true, selecting this button/option may force the target field visible.
588
+ * If false/missing, the option filter only applies when the target field is already visible.
589
+ */
590
+ forceVisible?: boolean;
591
+ /**
592
+ * If present, only these option ids remain visible.
593
+ */
594
+ include?: string[];
595
+ /**
596
+ * Removed after include is applied.
597
+ */
598
+ exclude?: string[];
583
599
  };
584
600
  type Field = BaseFieldUI & {
585
601
  id: string;
@@ -638,6 +654,7 @@ type ServiceProps = {
638
654
  fields: Field[];
639
655
  includes_for_buttons?: Record<string, string[]>;
640
656
  excludes_for_buttons?: Record<string, string[]>;
657
+ option_effects_for_buttons?: Record<string, Record<string, OptionEffectForButton>>;
641
658
  schema_version?: string;
642
659
  fallbacks?: ServiceFallback;
643
660
  name?: string;
@@ -988,4 +1005,4 @@ type EditorSnapshot = {
988
1005
  /** Exported alias so the schema generator can target an array */
989
1006
  type AdminPolicies = DynamicRule[];
990
1007
 
991
- export { type AdminPolicies, type BaseFieldUI, type ButtonValue, type CanvasEvents, type CanvasOptions, type CanvasState, type CatalogGroupNode, type CatalogId, type CatalogNode, type CatalogNodeBase, type CatalogNodeKind, type CatalogServiceId, type CatalogSmartGroupNode, type CatalogSmartRule, type CatalogViewMode, type Command, type CommentAnchor, type CommentId, type CommentMessage, type CommentNode, type CommentThread, type ConnectKind, type ConstraintKey, type DgpServiceCapability, type DgpServiceMap, type DraftWire, type DynamicRule, type EdgeKind, type EdgeRoute, type EdgeView, type EditorEvents, type EditorOptions, type EditorSnapshot, type FallbackCandidateCheck, type FallbackCheckReason, type FallbackCheckResult, type FallbackDiagnostics, type FallbackEditor, type FallbackEditorOptions, type FallbackEditorServiceMap, type FallbackEditorServiceRecord, type FallbackEditorState, type FallbackEligibleSource, type FallbackMutationOptions, type FallbackRegistration, type FallbackRegistrationScope, type FallbackScopeRef, type FallbackSettings, type Field, type FieldOption, type FieldType, type FieldValidationOp, type FieldValidationRule, type FieldValidationValueBy, type FieldWithTypedDefaults, type FlagKey, type FlowNode, type GraphEdge, type GraphNode, type GraphSnapshot, type IdType, type LayoutState, type NodeIdRef, type NodeKind, type NodePos, type NodePositions, type NodeView, type NoticeKind, type NoticeSeverity, type NoticeTarget, type NoticeType, type OrderKindSource, type OrderSnapshot, type PricingRole, type QuantityMark, type QuantityRule, type RatePolicy, type Scalar, type ServiceCatalogState, type ServiceEstimates, type ServiceFallback, type ServiceFallbacks, type ServiceFlag, type ServiceFlags, type ServiceIdRef, type ServiceProps, type ServicePropsNotice, type ServiceWhereClause, type ServiceWhereOp, type SnapshotContext, type SpeedEstimate, type Tag, type ThreadId, type TimeRangeEstimate, type Ui, type UiAnyOf, type UiArray, type UiBoolean, type UiNumber, type UiObject, type UiString, type UiValue, type UtilityLineItem, type UtilityMark, type UtilityMode, type ValidationCode, type ValidationError, type ValidatorOptions, type Viewport, type WithQuantityDefault, createFallbackEditor };
1008
+ export { type AdminPolicies, type BaseFieldUI, type ButtonValue, type CanvasEvents, type CanvasOptions, type CanvasState, type CatalogGroupNode, type CatalogId, type CatalogNode, type CatalogNodeBase, type CatalogNodeKind, type CatalogServiceId, type CatalogSmartGroupNode, type CatalogSmartRule, type CatalogViewMode, type Command, type CommentAnchor, type CommentId, type CommentMessage, type CommentNode, type CommentThread, type ConnectKind, type ConstraintKey, type DgpServiceCapability, type DgpServiceMap, type DraftWire, type DynamicRule, type EdgeKind, type EdgeRoute, type EdgeView, type EditorEvents, type EditorOptions, type EditorSnapshot, type FallbackCandidateCheck, type FallbackCheckReason, type FallbackCheckResult, type FallbackDiagnostics, type FallbackEditor, type FallbackEditorOptions, type FallbackEditorServiceMap, type FallbackEditorServiceRecord, type FallbackEditorState, type FallbackEligibleSource, type FallbackMutationOptions, type FallbackRegistration, type FallbackRegistrationScope, type FallbackScopeRef, type FallbackSettings, type Field, type FieldOption, type FieldType, type FieldValidationOp, type FieldValidationRule, type FieldValidationValueBy, type FieldWithTypedDefaults, type FlagKey, type FlowNode, type GraphEdge, type GraphNode, type GraphSnapshot, type IdType, type LayoutState, type NodeIdRef, type NodeKind, type NodePos, type NodePositions, type NodeView, type NoticeKind, type NoticeSeverity, type NoticeTarget, type NoticeType, type OptionEffectForButton, type OrderKindSource, type OrderSnapshot, type PricingRole, type QuantityMark, type QuantityRule, type RatePolicy, type Scalar, type ServiceCatalogState, type ServiceEstimates, type ServiceFallback, type ServiceFallbacks, type ServiceFlag, type ServiceFlags, type ServiceIdRef, type ServiceProps, type ServicePropsNotice, type ServiceWhereClause, type ServiceWhereOp, type SnapshotContext, type SpeedEstimate, type Tag, type ThreadId, type TimeRangeEstimate, type Ui, type UiAnyOf, type UiArray, type UiBoolean, type UiNumber, type UiObject, type UiString, type UiValue, type UtilityLineItem, type UtilityMark, type UtilityMode, type ValidationCode, type ValidationError, type ValidatorOptions, type Viewport, type WithQuantityDefault, createFallbackEditor };