@timeax/digital-service-engine 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -224,6 +224,11 @@ type ValidatorOptions = {
224
224
  selectedOptionKeys?: string[];
225
225
  globalUtilityGuard?: boolean;
226
226
  policies?: DynamicRule[];
227
+ /**
228
+ * Global/base rate policy used by validation and service filtering.
229
+ * This is intentionally separate from fallbackSettings.ratePolicy.
230
+ */
231
+ ratePolicy?: RatePolicy;
227
232
  fallbackSettings?: FallbackSettings;
228
233
  };
229
234
  type RatePolicy = {
@@ -268,6 +273,7 @@ type FallbackEditorServiceRecord = {
268
273
  };
269
274
  type FallbackEditorServiceMap = DgpServiceMap;
270
275
  type FallbackRegistrationScope = "global" | "node";
276
+ type FallbackEligibleSource = "all_services" | "registered";
271
277
  type FallbackScopeRef = {
272
278
  scope: "global";
273
279
  primary: ServiceIdRef;
@@ -389,6 +395,16 @@ interface FallbackEditor {
389
395
  replace(context: FallbackScopeRef, candidates: ServiceIdRef[], options?: FallbackMutationOptions): FallbackEditorState;
390
396
  /** Clears one exact scope value */
391
397
  clear(context: FallbackScopeRef): FallbackEditorState;
398
+ /**
399
+ * Returns candidates eligible for the given scope.
400
+ * Defaults to discovery from the loaded services pool.
401
+ */
402
+ eligible(context: FallbackScopeRef, options?: {
403
+ exclude?: ServiceIdRef[];
404
+ unique?: boolean;
405
+ limit?: number;
406
+ source?: FallbackEligibleSource;
407
+ }): ServiceIdRef[];
392
408
  }
393
409
  declare function createFallbackEditor(options?: FallbackEditorOptions): FallbackEditor;
394
410
 
@@ -965,4 +981,4 @@ type EditorSnapshot = {
965
981
  /** Exported alias so the schema generator can target an array */
966
982
  type AdminPolicies = DynamicRule[];
967
983
 
968
- 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 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 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 };
984
+ 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 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 };
@@ -224,6 +224,11 @@ type ValidatorOptions = {
224
224
  selectedOptionKeys?: string[];
225
225
  globalUtilityGuard?: boolean;
226
226
  policies?: DynamicRule[];
227
+ /**
228
+ * Global/base rate policy used by validation and service filtering.
229
+ * This is intentionally separate from fallbackSettings.ratePolicy.
230
+ */
231
+ ratePolicy?: RatePolicy;
227
232
  fallbackSettings?: FallbackSettings;
228
233
  };
229
234
  type RatePolicy = {
@@ -268,6 +273,7 @@ type FallbackEditorServiceRecord = {
268
273
  };
269
274
  type FallbackEditorServiceMap = DgpServiceMap;
270
275
  type FallbackRegistrationScope = "global" | "node";
276
+ type FallbackEligibleSource = "all_services" | "registered";
271
277
  type FallbackScopeRef = {
272
278
  scope: "global";
273
279
  primary: ServiceIdRef;
@@ -389,6 +395,16 @@ interface FallbackEditor {
389
395
  replace(context: FallbackScopeRef, candidates: ServiceIdRef[], options?: FallbackMutationOptions): FallbackEditorState;
390
396
  /** Clears one exact scope value */
391
397
  clear(context: FallbackScopeRef): FallbackEditorState;
398
+ /**
399
+ * Returns candidates eligible for the given scope.
400
+ * Defaults to discovery from the loaded services pool.
401
+ */
402
+ eligible(context: FallbackScopeRef, options?: {
403
+ exclude?: ServiceIdRef[];
404
+ unique?: boolean;
405
+ limit?: number;
406
+ source?: FallbackEligibleSource;
407
+ }): ServiceIdRef[];
392
408
  }
393
409
  declare function createFallbackEditor(options?: FallbackEditorOptions): FallbackEditor;
394
410
 
@@ -965,4 +981,4 @@ type EditorSnapshot = {
965
981
  /** Exported alias so the schema generator can target an array */
966
982
  type AdminPolicies = DynamicRule[];
967
983
 
968
- 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 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 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 };
984
+ 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 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 };