@dx-do/client 7.0.1 → 7.2.0
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/index.cjs.js +3035 -2083
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2922 -2082
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts +8 -0
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts +16 -0
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/index.d.ts +4 -0
- package/dist/src/lib/model/datastore/index.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/metrics-metadata/register.d.ts +23 -0
- package/dist/src/lib/model/datastore/metrics-metadata/register.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/nassql/operations.d.ts +1 -1
- package/dist/src/lib/model/datastore/nassql/query.d.ts +1 -1
- package/dist/src/lib/model/datastore/tas/filters.d.ts +1 -1
- package/dist/src/lib/model/datastore/tas/query.d.ts +1 -1
- package/dist/src/lib/model/inventory/inventorize.d.ts +113 -107
- package/dist/src/lib/model/inventory/inventorize.d.ts.map +1 -1
- package/dist/src/lib/model/inventory/topology-rules/draft.d.ts +65 -0
- package/dist/src/lib/model/inventory/topology-rules/draft.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/evaluator.d.ts +29 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/evaluator.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/java-regex.d.ts +43 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/java-regex.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/parser.d.ts +58 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/parser.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/template.d.ts +50 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/template.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/tokenizer.d.ts +15 -0
- package/dist/src/lib/model/inventory/topology-rules/jexl/tokenizer.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/mm-translate.d.ts +36 -0
- package/dist/src/lib/model/inventory/topology-rules/mm-translate.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/projection.d.ts +59 -0
- package/dist/src/lib/model/inventory/topology-rules/projection.d.ts.map +1 -0
- package/dist/src/lib/model/inventory/topology-rules/rule.d.ts +62 -0
- package/dist/src/lib/model/inventory/topology-rules/rule.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +7 -3
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -1
- package/dist/src/lib/services/inventory.service.d.ts +39 -11
- package/dist/src/lib/services/inventory.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursive-descent parser for the documented JEXL subset. Grammar
|
|
3
|
+
* (lowest → highest precedence):
|
|
4
|
+
*
|
|
5
|
+
* expr := ternary
|
|
6
|
+
* ternary := or ( '?' expr ':' expr | '?:' expr )?
|
|
7
|
+
* or := and ( ('||'|'or') and )*
|
|
8
|
+
* and := eq ( ('&&'|'and') eq )*
|
|
9
|
+
* eq := unary( ('=='|'eq'|'!='|'ne') unary )*
|
|
10
|
+
* unary := ('!'|'not') unary | postfix
|
|
11
|
+
* postfix := primary ( '.' ident '(' args? ')' | '.' ident | '[' expr ']' )*
|
|
12
|
+
* primary := STRING | NUMBER | true | false | null | ident
|
|
13
|
+
* | 'fn:' ident '(' args ')' | '(' expr ')'
|
|
14
|
+
*/
|
|
15
|
+
export type JexlNode = {
|
|
16
|
+
kind: 'lit';
|
|
17
|
+
value: string | number | boolean | null;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'var';
|
|
20
|
+
name: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'prop';
|
|
23
|
+
obj: JexlNode;
|
|
24
|
+
name: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'index';
|
|
27
|
+
obj: JexlNode;
|
|
28
|
+
index: JexlNode;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'call';
|
|
31
|
+
obj: JexlNode;
|
|
32
|
+
method: string;
|
|
33
|
+
args: JexlNode[];
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'fn';
|
|
36
|
+
name: string;
|
|
37
|
+
args: JexlNode[];
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'unary';
|
|
40
|
+
op: 'not';
|
|
41
|
+
arg: JexlNode;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'binary';
|
|
44
|
+
op: 'eq' | 'ne' | 'and' | 'or';
|
|
45
|
+
left: JexlNode;
|
|
46
|
+
right: JexlNode;
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'ternary';
|
|
49
|
+
cond: JexlNode;
|
|
50
|
+
then: JexlNode;
|
|
51
|
+
else: JexlNode;
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'elvis';
|
|
54
|
+
value: JexlNode;
|
|
55
|
+
fallback: JexlNode;
|
|
56
|
+
};
|
|
57
|
+
export declare function parseExpression(src: string): JexlNode;
|
|
58
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/model/inventory/topology-rules/jexl/parser.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CAAE,GACxD;IAAE,IAAI,E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4
|
+
* text outside placeholders is literal; expressions are evaluated against
|
|
5
|
+
* the matched metric; an unresolvable expression (error OR null result)
|
|
6
|
+
* makes the whole template unresolvable — the caller skips that attribute.
|
|
7
|
+
*/
|
|
8
|
+
export type EvalOutcome = {
|
|
9
|
+
ok: true;
|
|
10
|
+
value: string;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
reason: string;
|
|
14
|
+
};
|
|
15
|
+
interface Segment {
|
|
16
|
+
literal: boolean;
|
|
17
|
+
text: string;
|
|
18
|
+
}
|
|
19
|
+
/** Splits "a${x}b${y}" into literal/expression segments. */
|
|
20
|
+
export declare function splitTemplate(template: string): Segment[] | {
|
|
21
|
+
error: string;
|
|
22
|
+
};
|
|
23
|
+
/** True when the string contains at least one ${...} placeholder. */
|
|
24
|
+
export declare function isTemplate(value: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Evaluates a template against a metric context. Literal-only templates
|
|
27
|
+
* return verbatim. Mixed templates concatenate evaluated segments. A null
|
|
28
|
+
* segment result (e.g. a missing attribute used bare) or any evaluation /
|
|
29
|
+
* syntax error makes the outcome a skip with the reason preserved.
|
|
30
|
+
*/
|
|
31
|
+
export declare function evaluateTemplate(template: string, ctx: MetricEvalContext): EvalOutcome;
|
|
32
|
+
/** Per-attribute evaluation trace surfaced in the simulation UI. */
|
|
33
|
+
export interface AttributeTrace {
|
|
34
|
+
keyTemplate: string;
|
|
35
|
+
valueTemplate: string;
|
|
36
|
+
key?: string;
|
|
37
|
+
value?: string;
|
|
38
|
+
skipped?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Projects a rule's customAttributes map against one matched metric,
|
|
42
|
+
* with the documented per-attribute skip-on-error semantics (a failed key
|
|
43
|
+
* OR value skips that one entry; the rest proceed).
|
|
44
|
+
*/
|
|
45
|
+
export declare function projectCustomAttributes(customAttributes: Record<string, string>, ctx: MetricEvalContext): {
|
|
46
|
+
attributes: Record<string, string>;
|
|
47
|
+
traces: AttributeTrace[];
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/model/inventory/topology-rules/jexl/template.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GACnB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,UAAU,OAAO;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAgB7E;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGjD;AAUD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,GAAG,WAAW,CAsBtF;AAED,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACxC,GAAG,EAAE,iBAAiB,GACrB;IAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,cAAc,EAAE,CAAA;CAAE,CAkBlE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokenizer for the documented JEXL expression subset used inside
|
|
3
|
+
* `${ ... }` placeholders. Hand-rolled: regex-based lexing cannot handle
|
|
4
|
+
* quoted strings containing pipes/parens or the fn: namespace cleanly.
|
|
5
|
+
*/
|
|
6
|
+
export type TokenType = 'string' | 'number' | 'ident' | 'fn' | 'lparen' | 'rparen' | 'lbracket' | 'rbracket' | 'dot' | 'comma' | 'question' | 'colon' | 'elvis' | 'eq' | 'ne' | 'and' | 'or' | 'not';
|
|
7
|
+
export interface Token {
|
|
8
|
+
type: TokenType;
|
|
9
|
+
value: string;
|
|
10
|
+
pos: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class JexlSyntaxError extends Error {
|
|
13
|
+
}
|
|
14
|
+
export declare function tokenize(src: string): Token[];
|
|
15
|
+
//# sourceMappingURL=tokenizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/model/inventory/topology-rules/jexl/tokenizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,IAAI,GACJ,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,UAAU,GACV,KAAK,GACL,OAAO,GACP,UAAU,GACV,OAAO,GACP,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,CAAC;AAEV,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAK7C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,CAsI7C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InventorizeRule } from './rule';
|
|
2
|
+
/**
|
|
3
|
+
* Translates a rule into a Metrics-Metadata catalog query that OVER-matches
|
|
4
|
+
* the rule (narrowing-only pushdown): only the sourceName is pushed down;
|
|
5
|
+
* parent-folder, attributeName, and the 8 filters are applied locally by
|
|
6
|
+
* {@link projectRule} over the returned superset. Local filtering is the
|
|
7
|
+
* correctness boundary; MM is for scale beyond the preview's 100-metric cap.
|
|
8
|
+
*
|
|
9
|
+
* Structurally typed (not imported from the datastore models) so the
|
|
10
|
+
* topology-rules folder stays a self-contained closure for the web-react
|
|
11
|
+
* contracts copy.
|
|
12
|
+
*
|
|
13
|
+
* EMPIRICAL (THE_LABORATORY 2026-08-03): the SPEC specifier silently
|
|
14
|
+
* matches NOTHING when any of its three arms is omitted — always emit all
|
|
15
|
+
* three. MM REGEX is strict Java full-match with pipes escaped.
|
|
16
|
+
*/
|
|
17
|
+
export interface MmRuleQuery {
|
|
18
|
+
specifier: {
|
|
19
|
+
op: 'SPEC';
|
|
20
|
+
sourceNameSpecifier: {
|
|
21
|
+
op: 'REGEX';
|
|
22
|
+
pattern: string;
|
|
23
|
+
};
|
|
24
|
+
folderNameSpecifier: {
|
|
25
|
+
op: 'ALL';
|
|
26
|
+
};
|
|
27
|
+
attributeNameSpecifier: {
|
|
28
|
+
op: 'ALL';
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
clamp: number;
|
|
32
|
+
}
|
|
33
|
+
/** Topology Creator's own per-rule processing cap. */
|
|
34
|
+
export declare const TC_METRIC_CAP = 10000;
|
|
35
|
+
export declare function translateRuleToMmQuery(rule: Pick<InventorizeRule, 'sourceName'>, clamp?: number): MmRuleQuery;
|
|
36
|
+
//# sourceMappingURL=mm-translate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mm-translate.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/model/inventory/topology-rules/mm-translate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGzC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,mBAAmB,EAAE;YAAE,EAAE,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QACtD,mBAAmB,EAAE;YAAE,EAAE,EAAE,KAAK,CAAA;SAAE,CAAC;QACnC,sBAAsB,EAAE;YAAE,EAAE,EAAE,KAAK,CAAA;SAAE,CAAC;KACvC,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,EACzC,KAAK,GAAE,MAAsB,GAC5B,WAAW,CAab"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { InventorizeRule } from './rule';
|
|
2
|
+
import { AttributeTrace } from './jexl/template';
|
|
3
|
+
import { MetricEvalContext } from './jexl/evaluator';
|
|
4
|
+
/**
|
|
5
|
+
* Local emulation of the Topology Creator's rule pipeline:
|
|
6
|
+
* match stages → external-ID formation → vertex-name derivation →
|
|
7
|
+
* customAttributes interpolation → grouping metrics per vertex.
|
|
8
|
+
*
|
|
9
|
+
* Calibrated behaviors are noted inline; anything unverified degrades to a
|
|
10
|
+
* warning rather than a silently-different answer.
|
|
11
|
+
*/
|
|
12
|
+
/** A metric that contributed to a vertex — enough to identify it to a human. */
|
|
13
|
+
export interface ContributingMetric {
|
|
14
|
+
id: string;
|
|
15
|
+
sourceName: string;
|
|
16
|
+
attributeName: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ExpectedVertex {
|
|
19
|
+
externalId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
layer: string;
|
|
23
|
+
customAttributes: Record<string, string>;
|
|
24
|
+
/** key → distinct conflicting values seen across contributing metrics */
|
|
25
|
+
attributeConflicts: Record<string, string[]>;
|
|
26
|
+
/** metrics that matched into this vertex (id + source/attribute names) */
|
|
27
|
+
metrics: ContributingMetric[];
|
|
28
|
+
/** per contributing metric id → attribute evaluation traces */
|
|
29
|
+
traces: Record<string, AttributeTrace[]>;
|
|
30
|
+
}
|
|
31
|
+
export interface RejectedMetric {
|
|
32
|
+
id: string;
|
|
33
|
+
stage: 'sourceName' | 'attributeParentFolder' | 'attributeName' | 'attribute_filters' | 'metric_filters';
|
|
34
|
+
detail: string;
|
|
35
|
+
}
|
|
36
|
+
export interface RuleProjection {
|
|
37
|
+
vertices: ExpectedVertex[];
|
|
38
|
+
matchedCount: number;
|
|
39
|
+
rejected: RejectedMetric[];
|
|
40
|
+
warnings: string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Splits an APM attribute path at the FIRST colon: "Folder|Sub:Metric Name"
|
|
44
|
+
* → folderPath "Folder|Sub", metricName "Metric Name". (Folder segments
|
|
45
|
+
* escape their colons — e.g. "http_//host" — precisely because the first
|
|
46
|
+
* colon is the metric separator; verified against the doc's nest_levels=2
|
|
47
|
+
* worked example where "doi-normalized-alarm:CPU %" contributes only
|
|
48
|
+
* "doi-normalized-alarm" to the external ID.)
|
|
49
|
+
*/
|
|
50
|
+
export declare function splitAttributePath(attributeName: string): {
|
|
51
|
+
folderPath: string;
|
|
52
|
+
metricName: string;
|
|
53
|
+
};
|
|
54
|
+
/** External-ID formation for the canonical (default) format. */
|
|
55
|
+
export declare function formExternalId(rule: Pick<InventorizeRule, 'layer' | 'attributeParentFolder' | 'nest_levels'>, metric: Pick<MetricEvalContext, 'sourceName' | 'attributeName'>): string;
|
|
56
|
+
/** Vertex-name derivation: last N pipe-segments of the id minus "<layer>:". */
|
|
57
|
+
export declare function deriveVertexName(externalId: string, layer: string, vertexNameIndex: number | undefined): string;
|
|
58
|
+
export declare function projectRule(rule: InventorizeRule, metrics: MetricEvalContext[]): RuleProjection;
|
|
59
|
+
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/model/inventory/topology-rules/projection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,QAAQ,CAAC;AAMhB,OAAO,EACL,cAAc,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;GAOG;AAEH,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,yEAAyE;IACzE,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7C,0EAA0E;IAC1E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EACD,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAOA;AAwCD,gEAAgE;AAChE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,uBAAuB,GAAG,aAAa,CAAC,EAC9E,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,eAAe,CAAC,GAC9D,MAAM,CAUR;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,MAAM,CAQR;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,iBAAiB,EAAE,GAC3B,cAAc,CAyIhB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Topology Creator ("inventorize") rule schema — the single source of truth
|
|
4
|
+
* shared by the CLI command, the session-core handlers, and (via the
|
|
5
|
+
* web-react contracts generator) the SPA rule editor.
|
|
6
|
+
*
|
|
7
|
+
* Field semantics below are EMPIRICALLY CALIBRATED against THE_LABORATORY
|
|
8
|
+
* (2026-08-03, see docs/inventorize/CALIBRATION.md) — where the official
|
|
9
|
+
* docs and the live server disagreed, the describe() text records the
|
|
10
|
+
* observed server behavior.
|
|
11
|
+
*/
|
|
12
|
+
export declare const InventorizeLayerSchema: z.ZodEnum<{
|
|
13
|
+
CUSTOM: "CUSTOM";
|
|
14
|
+
INFRASTRUCTURE: "INFRASTRUCTURE";
|
|
15
|
+
ATC: "ATC";
|
|
16
|
+
APM_INFRASTRUCTURE: "APM_INFRASTRUCTURE";
|
|
17
|
+
INFRASTRUCTURE_UIM: "INFRASTRUCTURE_UIM";
|
|
18
|
+
}>;
|
|
19
|
+
export type InventorizeLayer = z.infer<typeof InventorizeLayerSchema>;
|
|
20
|
+
export declare const InventorizeRuleSchema: z.ZodObject<{
|
|
21
|
+
ruleId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
ruleName: z.ZodString;
|
|
24
|
+
sourceName: z.ZodString;
|
|
25
|
+
attributeName: z.ZodOptional<z.ZodString>;
|
|
26
|
+
allowRegexOnAttributeName: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
attributeParentFolder: z.ZodOptional<z.ZodString>;
|
|
28
|
+
nest_levels: z.ZodNumber;
|
|
29
|
+
vertexNameIndex: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
type: z.ZodString;
|
|
31
|
+
layer: z.ZodEnum<{
|
|
32
|
+
CUSTOM: "CUSTOM";
|
|
33
|
+
INFRASTRUCTURE: "INFRASTRUCTURE";
|
|
34
|
+
ATC: "ATC";
|
|
35
|
+
APM_INFRASTRUCTURE: "APM_INFRASTRUCTURE";
|
|
36
|
+
INFRASTRUCTURE_UIM: "INFRASTRUCTURE_UIM";
|
|
37
|
+
}>;
|
|
38
|
+
source_product: z.ZodOptional<z.ZodString>;
|
|
39
|
+
attribute_incl_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
attribute_incl_filter_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
attribute_excl_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
attribute_excl_filter_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
metric_incl_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
metric_incl_filter_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
metric_excl_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
metric_excl_filter_regex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
customAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
48
|
+
externalIdFormat: z.ZodOptional<z.ZodString>;
|
|
49
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
createdTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, z.core.$loose>;
|
|
52
|
+
export type InventorizeRule = z.infer<typeof InventorizeRuleSchema>;
|
|
53
|
+
/**
|
|
54
|
+
* The server default externalIdFormat. The local projection engine only
|
|
55
|
+
* emulates this canonical format; rules with a different format defer to
|
|
56
|
+
* the server preview.
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_EXTERNAL_ID_FORMAT = "${sourceName}|${attributeParentFolder}|${nest_levels}";
|
|
59
|
+
/** The 8 include/exclude filter array field names, in display order. */
|
|
60
|
+
export declare const FILTER_FIELDS: readonly ["attribute_incl_filter", "attribute_incl_filter_regex", "attribute_excl_filter", "attribute_excl_filter_regex", "metric_incl_filter", "metric_incl_filter_regex", "metric_excl_filter", "metric_excl_filter_regex"];
|
|
61
|
+
export type FilterField = (typeof FILTER_FIELDS)[number];
|
|
62
|
+
//# sourceMappingURL=rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/model/inventory/topology-rules/rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;;;;GASG;AAEH,eAAO,MAAM,sBAAsB;;;;;;EAIhC,CAAC;AACJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6GhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,0DACkB,CAAC;AAE1D,wEAAwE;AACxE,eAAO,MAAM,aAAa,+NAShB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -39,10 +39,14 @@ export declare class DataStoreMetricsMetadataService {
|
|
|
39
39
|
* Registers one or more metrics via `POST /metadata/registerMetric`.
|
|
40
40
|
*
|
|
41
41
|
* @remarks The request is validated against {@link MetricRegisterRequestSchema}.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* Metrics carrying an `attributes["@tags"]` array get the TYPE_TAGS flag
|
|
43
|
+
* added to their type automatically (idempotent). If the response fails
|
|
44
|
+
* schema validation, a warning is logged but the raw API response is
|
|
45
|
+
* still returned.
|
|
44
46
|
*
|
|
45
|
-
* @throws ZodError if the request fails schema validation
|
|
47
|
+
* @throws ZodError if the request fails schema validation — including the
|
|
48
|
+
* tag-registration restrictions ("@tags" non-empty, every listed tag
|
|
49
|
+
* present with a non-empty string value, TYPE_TAGS never set without tags).
|
|
46
50
|
*/
|
|
47
51
|
registerMetrics(metrics: MetricRegister[], sync?: boolean): Promise<MetricRegisterResponse>;
|
|
48
52
|
/** Registers a single metric. Convenience wrapper around {@link registerMetrics}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datastore-metrics-metadata.service.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/datastore/datastore-metrics-metadata.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"datastore-metrics-metadata.service.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/datastore/datastore-metrics-metadata.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASnD,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,cAAc,EAEd,sBAAsB,EACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;AA8BrC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,+BAA+B;IAQxC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IARtB;;;;;OAKG;gBAEgB,aAAa,EAAE,aAAa,EAC5B,GAAG,EAAE,SAAS;IAGjC;;;;;;;;;;;;OAYG;IACG,eAAe,CACnB,OAAO,EAAE,cAAc,EAAE,EACzB,IAAI,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,sBAAsB,CAAC;IAoBlC,qFAAqF;IAC/E,cAAc,CAClB,MAAM,EAAE,cAAc,EACtB,IAAI,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,sBAAsB,CAAC;IAIlC;;;;;;;;;;;OAWG;IACG,WAAW,CACf,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,6BAA6B,CAAC;CAe1C"}
|
|
@@ -4,8 +4,8 @@ import { Inventory } from '../model/inventory/inventory-search';
|
|
|
4
4
|
import { InventoryAttributes } from '../model/inventory/attributes';
|
|
5
5
|
import { NASSService } from './nass.service';
|
|
6
6
|
import { NASS } from '../model/nass/NASS';
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import { InventorizeDeleteResponse, InventorizePreviewResponse, InventorizeSaveResponse } from '../model/inventory/inventorize';
|
|
8
|
+
import { InventorizeRule } from '../model/inventory/topology-rules/rule';
|
|
9
9
|
import type { InventoryLookup } from '../model/inventory/inventory-lookup';
|
|
10
10
|
import { TASService } from './tas.service';
|
|
11
11
|
/**
|
|
@@ -23,14 +23,43 @@ export declare class InventoryService {
|
|
|
23
23
|
* @param log - Optional logger (defaults to null log)
|
|
24
24
|
*/
|
|
25
25
|
constructor(dxSaaSService: DxSaasService, dxNASSService: NASSService, dxTASService: TASService, log?: Logging.SimpleLog);
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Lists all inventorize (topology creator) rule configurations.
|
|
28
|
+
*
|
|
29
|
+
* @remarks Response is validated with `safeParse`; on mismatch a warning
|
|
30
|
+
* is logged and the raw response is still returned.
|
|
31
|
+
*/
|
|
32
|
+
listInventorizeConfigurations(): Promise<InventorizeRule[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Saves (creates or updates) an inventorize rule. The save endpoint
|
|
35
|
+
* UPSERTS: with `ruleId` present the existing rule is updated in place;
|
|
36
|
+
* without it a new rule is created (verified on THE_LABORATORY,
|
|
37
|
+
* 2026-08-03).
|
|
38
|
+
*
|
|
39
|
+
* @remarks Response validated with `safeParse` (warn + raw on mismatch).
|
|
40
|
+
* @throws ZodError if the rule fails schema validation.
|
|
41
|
+
*/
|
|
42
|
+
saveInventorizeConfiguration(rule: InventorizeRule): Promise<InventorizeSaveResponse>;
|
|
43
|
+
/** @deprecated Use {@link saveInventorizeConfiguration} (same endpoint; save upserts). */
|
|
44
|
+
createInventorizeConfiguration(rule: InventorizeRule): Promise<InventorizeSaveResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Previews the metrics an inventorize rule would match (read-only; max
|
|
47
|
+
* 100 metrics returned per rule).
|
|
48
|
+
*
|
|
49
|
+
* @remarks Response validated with `safeParse` (warn + raw on mismatch).
|
|
50
|
+
* @throws ZodError if the rule fails schema validation.
|
|
51
|
+
*/
|
|
52
|
+
previewInventorizeConfiguration(rule: InventorizeRule): Promise<InventorizePreviewResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Deletes an inventorize rule — and the vertices it created. The server
|
|
55
|
+
* requires the FULL rule config (a `{ruleId}`-only payload is rejected;
|
|
56
|
+
* verified on THE_LABORATORY) — pass a rule as returned by
|
|
57
|
+
* {@link listInventorizeConfigurations}.
|
|
58
|
+
*
|
|
59
|
+
* @remarks Input uses tolerant `safeParse` (round-tripped server data may
|
|
60
|
+
* carry legacy fields); response `safeParse` warns + returns raw.
|
|
61
|
+
*/
|
|
62
|
+
deleteInventorizeConfiguration(rule: InventorizeRule): Promise<InventorizeDeleteResponse>;
|
|
34
63
|
/** Performs an inventory lookup using a structured lookup request. */
|
|
35
64
|
lookupInventory(lookupRequest: InventoryLookup.InventoryLookupRequestBody): Promise<InventoryLookup.InventoryLookupResponseBody>;
|
|
36
65
|
/** Returns the distinct list of `product` attribute values present in the topology. */
|
|
@@ -58,5 +87,4 @@ export declare class InventoryService {
|
|
|
58
87
|
/** Returns a map of externalId → registered metrics for the given entity IDs. */
|
|
59
88
|
getRelatedMetrics(externalIds: string[]): Promise<Record<string, NASS.RegisteredMetric[]>>;
|
|
60
89
|
}
|
|
61
|
-
export {};
|
|
62
90
|
//# sourceMappingURL=inventory.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/inventory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAW,OAAO,EAAa,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,
|
|
1
|
+
{"version":3,"file":"inventory.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/inventory.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mB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