@timeax/digital-service-engine 0.0.1 → 0.0.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.
- package/dist/core/index.cjs +1097 -193
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +189 -51
- package/dist/core/index.d.ts +189 -51
- package/dist/core/index.js +1095 -193
- package/dist/core/index.js.map +1 -1
- package/dist/react/index.cjs +8313 -2542
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +401 -141
- package/dist/react/index.d.ts +401 -141
- package/dist/react/index.js +8471 -2709
- package/dist/react/index.js.map +1 -1
- package/dist/schema/index.d.cts +122 -54
- package/dist/schema/index.d.ts +122 -54
- package/dist/workspace/index.cjs +448 -239
- package/dist/workspace/index.cjs.map +1 -1
- package/dist/workspace/index.d.cts +54 -50
- package/dist/workspace/index.d.ts +54 -50
- package/dist/workspace/index.js +448 -239
- package/dist/workspace/index.js.map +1 -1
- package/package.json +15 -6
- package/schema/editor-snapshot.schema.json +121 -209
- package/schema/service-props.schema.json +121 -209
package/dist/schema/index.d.cts
CHANGED
|
@@ -32,12 +32,13 @@ interface BaseFieldUI {
|
|
|
32
32
|
name?: string;
|
|
33
33
|
label: string;
|
|
34
34
|
required?: boolean;
|
|
35
|
-
/** Host-defined prop names → typed UI nodes */
|
|
36
|
-
ui?: Record<string, Ui>;
|
|
37
35
|
/** Host-defined prop names → runtime default values (untyped base) */
|
|
38
36
|
defaults?: Record<string, unknown>;
|
|
39
37
|
}
|
|
40
|
-
type Ui = UiString | UiNumber | UiBoolean | UiAnyOf | UiArray | UiObject
|
|
38
|
+
type Ui = (UiString | UiNumber | UiBoolean | UiAnyOf | UiArray | UiObject) & {
|
|
39
|
+
description: string;
|
|
40
|
+
label: string;
|
|
41
|
+
};
|
|
41
42
|
/** string */
|
|
42
43
|
interface UiString {
|
|
43
44
|
type: "string";
|
|
@@ -72,8 +73,17 @@ interface UiAnyOf {
|
|
|
72
73
|
/** arrays: homogeneous (item) or tuple (items) */
|
|
73
74
|
interface UiArray {
|
|
74
75
|
type: "array";
|
|
76
|
+
label: string;
|
|
77
|
+
description: string;
|
|
75
78
|
item?: Ui;
|
|
76
79
|
items?: Ui[];
|
|
80
|
+
editable?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Optional: allowed shapes for new items.
|
|
83
|
+
* Key = label shown in UI picker
|
|
84
|
+
* Value = schema for the new element
|
|
85
|
+
*/
|
|
86
|
+
shape?: Record<string, Ui>;
|
|
77
87
|
minItems?: number;
|
|
78
88
|
maxItems?: number;
|
|
79
89
|
uniqueItems?: boolean;
|
|
@@ -81,7 +91,16 @@ interface UiArray {
|
|
|
81
91
|
/** objects: nested props */
|
|
82
92
|
interface UiObject {
|
|
83
93
|
type: "object";
|
|
94
|
+
label: string;
|
|
95
|
+
description: string;
|
|
96
|
+
editable?: boolean;
|
|
84
97
|
fields: Record<string, Ui>;
|
|
98
|
+
/**
|
|
99
|
+
* Optional: allowed shapes for dynamically added keys.
|
|
100
|
+
* Key = human-readable name shown in UI picker
|
|
101
|
+
* Value = schema applied to the value of the new key
|
|
102
|
+
*/
|
|
103
|
+
shape?: Record<string, Ui>;
|
|
85
104
|
required?: string[];
|
|
86
105
|
order?: string[];
|
|
87
106
|
}
|
|
@@ -190,6 +209,8 @@ type ServiceProps = {
|
|
|
190
209
|
excludes_for_buttons?: Record<string, string[]>;
|
|
191
210
|
schema_version?: string;
|
|
192
211
|
fallbacks?: ServiceFallback;
|
|
212
|
+
name?: string;
|
|
213
|
+
notices?: ServicePropsNotice[];
|
|
193
214
|
};
|
|
194
215
|
type ServiceIdRef = number | string;
|
|
195
216
|
type NodeIdRef = string;
|
|
@@ -199,6 +220,34 @@ type ServiceFallback = {
|
|
|
199
220
|
/** Primary→fallback list used when no node-scoped entry is present */
|
|
200
221
|
global?: Record<ServiceIdRef, ServiceIdRef[]>;
|
|
201
222
|
};
|
|
223
|
+
type NoticeType = "public" | "private";
|
|
224
|
+
type NoticeSeverity = "info" | "warning" | "error";
|
|
225
|
+
/**
|
|
226
|
+
* “label” is lightweight + UI-friendly (best, sale, hot, etc).
|
|
227
|
+
* Others remain semantic / governance oriented.
|
|
228
|
+
*/
|
|
229
|
+
type NoticeKind = "label" | "warning" | "deprecation" | "compat" | "migration" | "policy";
|
|
230
|
+
type NoticeTarget = {
|
|
231
|
+
scope: "global";
|
|
232
|
+
} | {
|
|
233
|
+
scope: "node";
|
|
234
|
+
node_kind: "tag" | "field" | "option";
|
|
235
|
+
node_id: string;
|
|
236
|
+
};
|
|
237
|
+
interface ServicePropsNotice {
|
|
238
|
+
id: string;
|
|
239
|
+
type: NoticeType;
|
|
240
|
+
kind: NoticeKind;
|
|
241
|
+
severity: NoticeSeverity;
|
|
242
|
+
target: NoticeTarget;
|
|
243
|
+
title: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
reason?: string;
|
|
246
|
+
marked_at?: string;
|
|
247
|
+
icon?: string;
|
|
248
|
+
color?: string;
|
|
249
|
+
meta?: Record<string, unknown>;
|
|
250
|
+
}
|
|
202
251
|
|
|
203
252
|
type NodeKind = "tag" | "field" | "comment" | "option";
|
|
204
253
|
type EdgeKind = "child" | "bind" | "include" | "exclude" | "error" | "anchor";
|
|
@@ -438,6 +487,22 @@ type DgpServiceCapability = {
|
|
|
438
487
|
};
|
|
439
488
|
type DgpServiceMap = Record<string, DgpServiceCapability> & Record<number, DgpServiceCapability>;
|
|
440
489
|
|
|
490
|
+
type NodeRef = {
|
|
491
|
+
kind: "tag";
|
|
492
|
+
id: string;
|
|
493
|
+
node: Tag;
|
|
494
|
+
} | {
|
|
495
|
+
kind: "field";
|
|
496
|
+
id: string;
|
|
497
|
+
node: Field;
|
|
498
|
+
} | {
|
|
499
|
+
kind: "option";
|
|
500
|
+
id: string;
|
|
501
|
+
node: FieldOption;
|
|
502
|
+
fieldId: string;
|
|
503
|
+
};
|
|
504
|
+
type NodeMap = Map<string, NodeRef>;
|
|
505
|
+
|
|
441
506
|
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" | "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";
|
|
442
507
|
type ValidationError = {
|
|
443
508
|
code: ValidationCode;
|
|
@@ -486,6 +551,7 @@ type DynamicRule = {
|
|
|
486
551
|
};
|
|
487
552
|
type ValidatorOptions = {
|
|
488
553
|
serviceMap?: DgpServiceMap;
|
|
554
|
+
nodeMap?: NodeMap;
|
|
489
555
|
allowUnsafe?: boolean;
|
|
490
556
|
selectedOptionKeys?: string[];
|
|
491
557
|
globalUtilityGuard?: boolean;
|
|
@@ -512,56 +578,6 @@ type FallbackSettings = {
|
|
|
512
578
|
mode?: "strict" | "dev";
|
|
513
579
|
};
|
|
514
580
|
|
|
515
|
-
type Env = "client" | "workspace";
|
|
516
|
-
type SelectionOptions = {
|
|
517
|
-
env?: Env;
|
|
518
|
-
rootTagId?: string;
|
|
519
|
-
/** Resolve service capability from an id (used for `services` array) */
|
|
520
|
-
resolveService?: (id: any) => DgpServiceCapability | undefined;
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
type EditorEvents = {
|
|
524
|
-
"editor:command": {
|
|
525
|
-
name: string;
|
|
526
|
-
payload?: any;
|
|
527
|
-
};
|
|
528
|
-
"editor:change": {
|
|
529
|
-
props: ServiceProps;
|
|
530
|
-
reason: string;
|
|
531
|
-
command?: string;
|
|
532
|
-
};
|
|
533
|
-
"editor:undo": {
|
|
534
|
-
stackSize: number;
|
|
535
|
-
index: number;
|
|
536
|
-
};
|
|
537
|
-
"editor:redo": {
|
|
538
|
-
stackSize: number;
|
|
539
|
-
index: number;
|
|
540
|
-
};
|
|
541
|
-
"editor:error": {
|
|
542
|
-
message: string;
|
|
543
|
-
code?: string;
|
|
544
|
-
meta?: any;
|
|
545
|
-
};
|
|
546
|
-
};
|
|
547
|
-
type Command = {
|
|
548
|
-
name: string;
|
|
549
|
-
do(): void;
|
|
550
|
-
undo(): void;
|
|
551
|
-
};
|
|
552
|
-
type EditorOptions = {
|
|
553
|
-
historyLimit?: number;
|
|
554
|
-
validateAfterEach?: boolean;
|
|
555
|
-
/** Sync existence check; return true if the service exists. */
|
|
556
|
-
serviceExists?: (id: number) => boolean;
|
|
557
|
-
/** Optional local index; used if serviceExists is not provided. */
|
|
558
|
-
serviceMap?: Record<number, unknown>;
|
|
559
|
-
/** Raw policies JSON; will be compiled on demand by filterServicesForVisibleGroup. */
|
|
560
|
-
policiesRaw?: unknown;
|
|
561
|
-
selectionProps?: SelectionOptions;
|
|
562
|
-
};
|
|
563
|
-
type ConnectKind = "bind" | "include" | "exclude";
|
|
564
|
-
|
|
565
581
|
interface ButtonValue {
|
|
566
582
|
id: string;
|
|
567
583
|
value: string | number;
|
|
@@ -641,6 +657,8 @@ type OrderSnapshot = {
|
|
|
641
657
|
rule?: QuantityRule;
|
|
642
658
|
defaultedFromHost?: boolean;
|
|
643
659
|
};
|
|
660
|
+
min: number;
|
|
661
|
+
max: number;
|
|
644
662
|
services: Array<string | number>;
|
|
645
663
|
serviceMap: Record<string, Array<string | number>>;
|
|
646
664
|
fallbacks?: {
|
|
@@ -665,7 +683,57 @@ type OrderSnapshot = {
|
|
|
665
683
|
};
|
|
666
684
|
};
|
|
667
685
|
|
|
686
|
+
type Env = "client" | "workspace";
|
|
687
|
+
type SelectionOptions = {
|
|
688
|
+
env?: Env;
|
|
689
|
+
rootTagId?: string;
|
|
690
|
+
/** Resolve service capability from an id (used for `services` array) */
|
|
691
|
+
resolveService?: (id: any) => DgpServiceCapability | undefined;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
type EditorEvents = {
|
|
695
|
+
"editor:command": {
|
|
696
|
+
name: string;
|
|
697
|
+
payload?: any;
|
|
698
|
+
};
|
|
699
|
+
"editor:change": {
|
|
700
|
+
props: ServiceProps;
|
|
701
|
+
reason: string;
|
|
702
|
+
command?: string;
|
|
703
|
+
};
|
|
704
|
+
"editor:undo": {
|
|
705
|
+
stackSize: number;
|
|
706
|
+
index: number;
|
|
707
|
+
};
|
|
708
|
+
"editor:redo": {
|
|
709
|
+
stackSize: number;
|
|
710
|
+
index: number;
|
|
711
|
+
};
|
|
712
|
+
"editor:error": {
|
|
713
|
+
message: string;
|
|
714
|
+
code?: string;
|
|
715
|
+
meta?: any;
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
type Command = {
|
|
719
|
+
name: string;
|
|
720
|
+
do(): void;
|
|
721
|
+
undo(): void;
|
|
722
|
+
};
|
|
723
|
+
type EditorOptions = {
|
|
724
|
+
historyLimit?: number;
|
|
725
|
+
validateAfterEach?: boolean;
|
|
726
|
+
/** Sync existence check; return true if the service exists. */
|
|
727
|
+
serviceExists?: (id: number) => boolean;
|
|
728
|
+
/** Optional local index; used if serviceExists is not provided. */
|
|
729
|
+
serviceMap?: Record<number, unknown>;
|
|
730
|
+
/** Raw policies JSON; will be compiled on demand by filterServicesForVisibleGroup. */
|
|
731
|
+
policiesRaw?: unknown;
|
|
732
|
+
selectionProps?: SelectionOptions;
|
|
733
|
+
};
|
|
734
|
+
type ConnectKind = "bind" | "include" | "exclude";
|
|
735
|
+
|
|
668
736
|
/** Exported alias so the schema generator can target an array */
|
|
669
737
|
type AdminPolicies = DynamicRule[];
|
|
670
738
|
|
|
671
|
-
export type { AdminPolicies, BaseFieldUI, ButtonValue, CanvasEvents, CanvasOptions, CanvasState, Command, CommentAnchor, CommentId, CommentMessage, CommentNode, CommentThread, ConnectKind, ConstraintKey, DgpServiceCapability, DgpServiceMap, DraftWire, DynamicRule, EdgeKind, EdgeRoute, EdgeView, EditorEvents, EditorOptions, EditorSnapshot, FallbackDiagnostics, FallbackSettings, Field, FieldOption, FieldType, FieldWithTypedDefaults, FlagKey, FlowNode, GraphEdge, GraphNode, GraphSnapshot, IdType, LayoutState, NodeIdRef, NodeKind, NodePos, NodePositions, NodeView, OrderSnapshot, PricingRole, QuantityMark, QuantityRule, RatePolicy, Scalar, ServiceEstimates, ServiceFallback, ServiceFallbacks, ServiceFlag, ServiceFlags, ServiceIdRef, ServiceProps, ServiceWhereClause, ServiceWhereOp, SnapshotContext, SpeedEstimate, Tag, ThreadId, TimeRangeEstimate, Ui, UiAnyOf, UiArray, UiBoolean, UiNumber, UiObject, UiString, UiValue, UtilityLineItem, UtilityMark, UtilityMode, ValidationCode, ValidationError, ValidatorOptions, Viewport, WithQuantityDefault };
|
|
739
|
+
export type { AdminPolicies, BaseFieldUI, ButtonValue, CanvasEvents, CanvasOptions, CanvasState, Command, CommentAnchor, CommentId, CommentMessage, CommentNode, CommentThread, ConnectKind, ConstraintKey, DgpServiceCapability, DgpServiceMap, DraftWire, DynamicRule, EdgeKind, EdgeRoute, EdgeView, EditorEvents, EditorOptions, EditorSnapshot, FallbackDiagnostics, FallbackSettings, Field, FieldOption, FieldType, FieldWithTypedDefaults, FlagKey, FlowNode, GraphEdge, GraphNode, GraphSnapshot, IdType, LayoutState, NodeIdRef, NodeKind, NodePos, NodePositions, NodeView, NoticeKind, NoticeSeverity, NoticeTarget, NoticeType, OrderSnapshot, PricingRole, QuantityMark, QuantityRule, RatePolicy, Scalar, ServiceEstimates, ServiceFallback, ServiceFallbacks, ServiceFlag, ServiceFlags, ServiceIdRef, ServiceProps, ServicePropsNotice, ServiceWhereClause, ServiceWhereOp, SnapshotContext, SpeedEstimate, Tag, ThreadId, TimeRangeEstimate, Ui, UiAnyOf, UiArray, UiBoolean, UiNumber, UiObject, UiString, UiValue, UtilityLineItem, UtilityMark, UtilityMode, ValidationCode, ValidationError, ValidatorOptions, Viewport, WithQuantityDefault };
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -32,12 +32,13 @@ interface BaseFieldUI {
|
|
|
32
32
|
name?: string;
|
|
33
33
|
label: string;
|
|
34
34
|
required?: boolean;
|
|
35
|
-
/** Host-defined prop names → typed UI nodes */
|
|
36
|
-
ui?: Record<string, Ui>;
|
|
37
35
|
/** Host-defined prop names → runtime default values (untyped base) */
|
|
38
36
|
defaults?: Record<string, unknown>;
|
|
39
37
|
}
|
|
40
|
-
type Ui = UiString | UiNumber | UiBoolean | UiAnyOf | UiArray | UiObject
|
|
38
|
+
type Ui = (UiString | UiNumber | UiBoolean | UiAnyOf | UiArray | UiObject) & {
|
|
39
|
+
description: string;
|
|
40
|
+
label: string;
|
|
41
|
+
};
|
|
41
42
|
/** string */
|
|
42
43
|
interface UiString {
|
|
43
44
|
type: "string";
|
|
@@ -72,8 +73,17 @@ interface UiAnyOf {
|
|
|
72
73
|
/** arrays: homogeneous (item) or tuple (items) */
|
|
73
74
|
interface UiArray {
|
|
74
75
|
type: "array";
|
|
76
|
+
label: string;
|
|
77
|
+
description: string;
|
|
75
78
|
item?: Ui;
|
|
76
79
|
items?: Ui[];
|
|
80
|
+
editable?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Optional: allowed shapes for new items.
|
|
83
|
+
* Key = label shown in UI picker
|
|
84
|
+
* Value = schema for the new element
|
|
85
|
+
*/
|
|
86
|
+
shape?: Record<string, Ui>;
|
|
77
87
|
minItems?: number;
|
|
78
88
|
maxItems?: number;
|
|
79
89
|
uniqueItems?: boolean;
|
|
@@ -81,7 +91,16 @@ interface UiArray {
|
|
|
81
91
|
/** objects: nested props */
|
|
82
92
|
interface UiObject {
|
|
83
93
|
type: "object";
|
|
94
|
+
label: string;
|
|
95
|
+
description: string;
|
|
96
|
+
editable?: boolean;
|
|
84
97
|
fields: Record<string, Ui>;
|
|
98
|
+
/**
|
|
99
|
+
* Optional: allowed shapes for dynamically added keys.
|
|
100
|
+
* Key = human-readable name shown in UI picker
|
|
101
|
+
* Value = schema applied to the value of the new key
|
|
102
|
+
*/
|
|
103
|
+
shape?: Record<string, Ui>;
|
|
85
104
|
required?: string[];
|
|
86
105
|
order?: string[];
|
|
87
106
|
}
|
|
@@ -190,6 +209,8 @@ type ServiceProps = {
|
|
|
190
209
|
excludes_for_buttons?: Record<string, string[]>;
|
|
191
210
|
schema_version?: string;
|
|
192
211
|
fallbacks?: ServiceFallback;
|
|
212
|
+
name?: string;
|
|
213
|
+
notices?: ServicePropsNotice[];
|
|
193
214
|
};
|
|
194
215
|
type ServiceIdRef = number | string;
|
|
195
216
|
type NodeIdRef = string;
|
|
@@ -199,6 +220,34 @@ type ServiceFallback = {
|
|
|
199
220
|
/** Primary→fallback list used when no node-scoped entry is present */
|
|
200
221
|
global?: Record<ServiceIdRef, ServiceIdRef[]>;
|
|
201
222
|
};
|
|
223
|
+
type NoticeType = "public" | "private";
|
|
224
|
+
type NoticeSeverity = "info" | "warning" | "error";
|
|
225
|
+
/**
|
|
226
|
+
* “label” is lightweight + UI-friendly (best, sale, hot, etc).
|
|
227
|
+
* Others remain semantic / governance oriented.
|
|
228
|
+
*/
|
|
229
|
+
type NoticeKind = "label" | "warning" | "deprecation" | "compat" | "migration" | "policy";
|
|
230
|
+
type NoticeTarget = {
|
|
231
|
+
scope: "global";
|
|
232
|
+
} | {
|
|
233
|
+
scope: "node";
|
|
234
|
+
node_kind: "tag" | "field" | "option";
|
|
235
|
+
node_id: string;
|
|
236
|
+
};
|
|
237
|
+
interface ServicePropsNotice {
|
|
238
|
+
id: string;
|
|
239
|
+
type: NoticeType;
|
|
240
|
+
kind: NoticeKind;
|
|
241
|
+
severity: NoticeSeverity;
|
|
242
|
+
target: NoticeTarget;
|
|
243
|
+
title: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
reason?: string;
|
|
246
|
+
marked_at?: string;
|
|
247
|
+
icon?: string;
|
|
248
|
+
color?: string;
|
|
249
|
+
meta?: Record<string, unknown>;
|
|
250
|
+
}
|
|
202
251
|
|
|
203
252
|
type NodeKind = "tag" | "field" | "comment" | "option";
|
|
204
253
|
type EdgeKind = "child" | "bind" | "include" | "exclude" | "error" | "anchor";
|
|
@@ -438,6 +487,22 @@ type DgpServiceCapability = {
|
|
|
438
487
|
};
|
|
439
488
|
type DgpServiceMap = Record<string, DgpServiceCapability> & Record<number, DgpServiceCapability>;
|
|
440
489
|
|
|
490
|
+
type NodeRef = {
|
|
491
|
+
kind: "tag";
|
|
492
|
+
id: string;
|
|
493
|
+
node: Tag;
|
|
494
|
+
} | {
|
|
495
|
+
kind: "field";
|
|
496
|
+
id: string;
|
|
497
|
+
node: Field;
|
|
498
|
+
} | {
|
|
499
|
+
kind: "option";
|
|
500
|
+
id: string;
|
|
501
|
+
node: FieldOption;
|
|
502
|
+
fieldId: string;
|
|
503
|
+
};
|
|
504
|
+
type NodeMap = Map<string, NodeRef>;
|
|
505
|
+
|
|
441
506
|
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" | "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";
|
|
442
507
|
type ValidationError = {
|
|
443
508
|
code: ValidationCode;
|
|
@@ -486,6 +551,7 @@ type DynamicRule = {
|
|
|
486
551
|
};
|
|
487
552
|
type ValidatorOptions = {
|
|
488
553
|
serviceMap?: DgpServiceMap;
|
|
554
|
+
nodeMap?: NodeMap;
|
|
489
555
|
allowUnsafe?: boolean;
|
|
490
556
|
selectedOptionKeys?: string[];
|
|
491
557
|
globalUtilityGuard?: boolean;
|
|
@@ -512,56 +578,6 @@ type FallbackSettings = {
|
|
|
512
578
|
mode?: "strict" | "dev";
|
|
513
579
|
};
|
|
514
580
|
|
|
515
|
-
type Env = "client" | "workspace";
|
|
516
|
-
type SelectionOptions = {
|
|
517
|
-
env?: Env;
|
|
518
|
-
rootTagId?: string;
|
|
519
|
-
/** Resolve service capability from an id (used for `services` array) */
|
|
520
|
-
resolveService?: (id: any) => DgpServiceCapability | undefined;
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
type EditorEvents = {
|
|
524
|
-
"editor:command": {
|
|
525
|
-
name: string;
|
|
526
|
-
payload?: any;
|
|
527
|
-
};
|
|
528
|
-
"editor:change": {
|
|
529
|
-
props: ServiceProps;
|
|
530
|
-
reason: string;
|
|
531
|
-
command?: string;
|
|
532
|
-
};
|
|
533
|
-
"editor:undo": {
|
|
534
|
-
stackSize: number;
|
|
535
|
-
index: number;
|
|
536
|
-
};
|
|
537
|
-
"editor:redo": {
|
|
538
|
-
stackSize: number;
|
|
539
|
-
index: number;
|
|
540
|
-
};
|
|
541
|
-
"editor:error": {
|
|
542
|
-
message: string;
|
|
543
|
-
code?: string;
|
|
544
|
-
meta?: any;
|
|
545
|
-
};
|
|
546
|
-
};
|
|
547
|
-
type Command = {
|
|
548
|
-
name: string;
|
|
549
|
-
do(): void;
|
|
550
|
-
undo(): void;
|
|
551
|
-
};
|
|
552
|
-
type EditorOptions = {
|
|
553
|
-
historyLimit?: number;
|
|
554
|
-
validateAfterEach?: boolean;
|
|
555
|
-
/** Sync existence check; return true if the service exists. */
|
|
556
|
-
serviceExists?: (id: number) => boolean;
|
|
557
|
-
/** Optional local index; used if serviceExists is not provided. */
|
|
558
|
-
serviceMap?: Record<number, unknown>;
|
|
559
|
-
/** Raw policies JSON; will be compiled on demand by filterServicesForVisibleGroup. */
|
|
560
|
-
policiesRaw?: unknown;
|
|
561
|
-
selectionProps?: SelectionOptions;
|
|
562
|
-
};
|
|
563
|
-
type ConnectKind = "bind" | "include" | "exclude";
|
|
564
|
-
|
|
565
581
|
interface ButtonValue {
|
|
566
582
|
id: string;
|
|
567
583
|
value: string | number;
|
|
@@ -641,6 +657,8 @@ type OrderSnapshot = {
|
|
|
641
657
|
rule?: QuantityRule;
|
|
642
658
|
defaultedFromHost?: boolean;
|
|
643
659
|
};
|
|
660
|
+
min: number;
|
|
661
|
+
max: number;
|
|
644
662
|
services: Array<string | number>;
|
|
645
663
|
serviceMap: Record<string, Array<string | number>>;
|
|
646
664
|
fallbacks?: {
|
|
@@ -665,7 +683,57 @@ type OrderSnapshot = {
|
|
|
665
683
|
};
|
|
666
684
|
};
|
|
667
685
|
|
|
686
|
+
type Env = "client" | "workspace";
|
|
687
|
+
type SelectionOptions = {
|
|
688
|
+
env?: Env;
|
|
689
|
+
rootTagId?: string;
|
|
690
|
+
/** Resolve service capability from an id (used for `services` array) */
|
|
691
|
+
resolveService?: (id: any) => DgpServiceCapability | undefined;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
type EditorEvents = {
|
|
695
|
+
"editor:command": {
|
|
696
|
+
name: string;
|
|
697
|
+
payload?: any;
|
|
698
|
+
};
|
|
699
|
+
"editor:change": {
|
|
700
|
+
props: ServiceProps;
|
|
701
|
+
reason: string;
|
|
702
|
+
command?: string;
|
|
703
|
+
};
|
|
704
|
+
"editor:undo": {
|
|
705
|
+
stackSize: number;
|
|
706
|
+
index: number;
|
|
707
|
+
};
|
|
708
|
+
"editor:redo": {
|
|
709
|
+
stackSize: number;
|
|
710
|
+
index: number;
|
|
711
|
+
};
|
|
712
|
+
"editor:error": {
|
|
713
|
+
message: string;
|
|
714
|
+
code?: string;
|
|
715
|
+
meta?: any;
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
type Command = {
|
|
719
|
+
name: string;
|
|
720
|
+
do(): void;
|
|
721
|
+
undo(): void;
|
|
722
|
+
};
|
|
723
|
+
type EditorOptions = {
|
|
724
|
+
historyLimit?: number;
|
|
725
|
+
validateAfterEach?: boolean;
|
|
726
|
+
/** Sync existence check; return true if the service exists. */
|
|
727
|
+
serviceExists?: (id: number) => boolean;
|
|
728
|
+
/** Optional local index; used if serviceExists is not provided. */
|
|
729
|
+
serviceMap?: Record<number, unknown>;
|
|
730
|
+
/** Raw policies JSON; will be compiled on demand by filterServicesForVisibleGroup. */
|
|
731
|
+
policiesRaw?: unknown;
|
|
732
|
+
selectionProps?: SelectionOptions;
|
|
733
|
+
};
|
|
734
|
+
type ConnectKind = "bind" | "include" | "exclude";
|
|
735
|
+
|
|
668
736
|
/** Exported alias so the schema generator can target an array */
|
|
669
737
|
type AdminPolicies = DynamicRule[];
|
|
670
738
|
|
|
671
|
-
export type { AdminPolicies, BaseFieldUI, ButtonValue, CanvasEvents, CanvasOptions, CanvasState, Command, CommentAnchor, CommentId, CommentMessage, CommentNode, CommentThread, ConnectKind, ConstraintKey, DgpServiceCapability, DgpServiceMap, DraftWire, DynamicRule, EdgeKind, EdgeRoute, EdgeView, EditorEvents, EditorOptions, EditorSnapshot, FallbackDiagnostics, FallbackSettings, Field, FieldOption, FieldType, FieldWithTypedDefaults, FlagKey, FlowNode, GraphEdge, GraphNode, GraphSnapshot, IdType, LayoutState, NodeIdRef, NodeKind, NodePos, NodePositions, NodeView, OrderSnapshot, PricingRole, QuantityMark, QuantityRule, RatePolicy, Scalar, ServiceEstimates, ServiceFallback, ServiceFallbacks, ServiceFlag, ServiceFlags, ServiceIdRef, ServiceProps, ServiceWhereClause, ServiceWhereOp, SnapshotContext, SpeedEstimate, Tag, ThreadId, TimeRangeEstimate, Ui, UiAnyOf, UiArray, UiBoolean, UiNumber, UiObject, UiString, UiValue, UtilityLineItem, UtilityMark, UtilityMode, ValidationCode, ValidationError, ValidatorOptions, Viewport, WithQuantityDefault };
|
|
739
|
+
export type { AdminPolicies, BaseFieldUI, ButtonValue, CanvasEvents, CanvasOptions, CanvasState, Command, CommentAnchor, CommentId, CommentMessage, CommentNode, CommentThread, ConnectKind, ConstraintKey, DgpServiceCapability, DgpServiceMap, DraftWire, DynamicRule, EdgeKind, EdgeRoute, EdgeView, EditorEvents, EditorOptions, EditorSnapshot, FallbackDiagnostics, FallbackSettings, Field, FieldOption, FieldType, FieldWithTypedDefaults, FlagKey, FlowNode, GraphEdge, GraphNode, GraphSnapshot, IdType, LayoutState, NodeIdRef, NodeKind, NodePos, NodePositions, NodeView, NoticeKind, NoticeSeverity, NoticeTarget, NoticeType, OrderSnapshot, PricingRole, QuantityMark, QuantityRule, RatePolicy, Scalar, ServiceEstimates, ServiceFallback, ServiceFallbacks, ServiceFlag, ServiceFlags, ServiceIdRef, ServiceProps, ServicePropsNotice, ServiceWhereClause, ServiceWhereOp, SnapshotContext, SpeedEstimate, Tag, ThreadId, TimeRangeEstimate, Ui, UiAnyOf, UiArray, UiBoolean, UiNumber, UiObject, UiString, UiValue, UtilityLineItem, UtilityMark, UtilityMode, ValidationCode, ValidationError, ValidatorOptions, Viewport, WithQuantityDefault };
|