@dx-do/client 8.0.0 → 9.0.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 +2283 -174
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2204 -175
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/alarm/alarm-queue.d.ts +2 -0
- package/dist/src/lib/model/alarm/alarm-queue.d.ts.map +1 -1
- package/dist/src/lib/model/channel/notify-channel.d.ts +5 -4
- package/dist/src/lib/model/channel/notify-channel.d.ts.map +1 -1
- package/dist/src/lib/model/dashboard/DashboardResponse.d.ts +12 -3
- package/dist/src/lib/model/dashboard/DashboardResponse.d.ts.map +1 -1
- package/dist/src/lib/model/oi/alarms.d.ts +14 -0
- package/dist/src/lib/model/oi/alarms.d.ts.map +1 -1
- package/dist/src/lib/model/oi/custom-properties.d.ts +184 -0
- package/dist/src/lib/model/oi/custom-properties.d.ts.map +1 -0
- package/dist/src/lib/model/oi/custom-property-grid.d.ts +121 -0
- package/dist/src/lib/model/oi/custom-property-grid.d.ts.map +1 -0
- package/dist/src/lib/model/oi/custom-property-routing.d.ts +60 -0
- package/dist/src/lib/model/oi/custom-property-routing.d.ts.map +1 -0
- package/dist/src/lib/model/oi/services.create.d.ts +6 -1
- package/dist/src/lib/model/oi/services.create.d.ts.map +1 -1
- package/dist/src/lib/model/security/access-references.d.ts +23 -0
- package/dist/src/lib/model/security/access-references.d.ts.map +1 -0
- package/dist/src/lib/model/security/roles.d.ts +75 -0
- package/dist/src/lib/model/security/roles.d.ts.map +1 -0
- package/dist/src/lib/model/security/user-groups.d.ts +69 -0
- package/dist/src/lib/model/security/user-groups.d.ts.map +1 -0
- package/dist/src/lib/model/service/availability-kpi.d.ts +86 -0
- package/dist/src/lib/model/service/availability-kpi.d.ts.map +1 -0
- package/dist/src/lib/model/situations/SituationLifecycle.d.ts +2 -0
- package/dist/src/lib/model/situations/SituationLifecycle.d.ts.map +1 -1
- package/dist/src/lib/model/situations/naming-template.d.ts +73 -0
- package/dist/src/lib/model/situations/naming-template.d.ts.map +1 -0
- package/dist/src/lib/model/situations/situation-explain.d.ts +365 -0
- package/dist/src/lib/model/situations/situation-explain.d.ts.map +1 -0
- package/dist/src/lib/model/synthetics/access-policy.d.ts +115 -0
- package/dist/src/lib/model/synthetics/access-policy.d.ts.map +1 -0
- package/dist/src/lib/services/alarm.service.d.ts +4 -2
- package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
- package/dist/src/lib/services/custom-property.service.d.ts +53 -0
- package/dist/src/lib/services/custom-property.service.d.ts.map +1 -0
- package/dist/src/lib/services/dashboard.service.d.ts +11 -0
- package/dist/src/lib/services/dashboard.service.d.ts.map +1 -1
- package/dist/src/lib/services/role.service.d.ts +46 -0
- package/dist/src/lib/services/role.service.d.ts.map +1 -0
- package/dist/src/lib/services/service-monolith.d.ts +8 -0
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/service.service.d.ts +40 -0
- package/dist/src/lib/services/service.service.d.ts.map +1 -1
- package/dist/src/lib/services/situation.service.d.ts +13 -2
- package/dist/src/lib/services/situation.service.d.ts.map +1 -1
- package/dist/src/lib/services/synthetic-access.service.d.ts +35 -0
- package/dist/src/lib/services/synthetic-access.service.d.ts.map +1 -0
- package/dist/src/lib/services/user-group.service.d.ts +52 -0
- package/dist/src/lib/services/user-group.service.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ServiceBulk } from './services.bulk';
|
|
2
|
+
import { CustomPropertyDefinition, PropertyCoverageService } from './custom-properties';
|
|
3
|
+
/**
|
|
4
|
+
* The service-property grid (#1629): one row per service, one column per property, edited in a
|
|
5
|
+
* spreadsheet (CSV) or by a script (JSON) and imported back. Each row carries the values it was
|
|
6
|
+
* exported with (`baseline`), so an import changes only what was edited and refuses a cell
|
|
7
|
+
* someone else changed since the export. Trailing machine columns start with `_`; a property
|
|
8
|
+
* name must start with a letter, so they never collide with one.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PROPERTY_GRID_FORMAT = "dxdo.service-properties/1";
|
|
11
|
+
export declare const GRID_SERVICE_COLUMN = "service";
|
|
12
|
+
export declare const GRID_MACHINE_COLUMNS: readonly ["_issues", "_id", "_tenant", "_baseline"];
|
|
13
|
+
export interface PropertyGridRow {
|
|
14
|
+
service: string;
|
|
15
|
+
id: string;
|
|
16
|
+
/** Column → value; '' (CSV blank) or null (JSON) = not set. */
|
|
17
|
+
values: Record<string, string | null>;
|
|
18
|
+
/** Read-only notes: missing required properties, invalid values. */
|
|
19
|
+
issues: string[];
|
|
20
|
+
/** Column → value at export ('' = not set). */
|
|
21
|
+
baseline: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
export interface PropertyGrid {
|
|
24
|
+
format: typeof PROPERTY_GRID_FORMAT;
|
|
25
|
+
tenant: string | null;
|
|
26
|
+
exportedAt: string;
|
|
27
|
+
/** Property columns in order: required managed, optional managed, then unmanaged keys. */
|
|
28
|
+
columns: string[];
|
|
29
|
+
rows: PropertyGridRow[];
|
|
30
|
+
}
|
|
31
|
+
export interface GridExportOptions {
|
|
32
|
+
unmanaged?: boolean;
|
|
33
|
+
requiredOnly?: boolean;
|
|
34
|
+
tenant: string | null;
|
|
35
|
+
exportedAt: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GridService extends PropertyCoverageService {
|
|
38
|
+
id?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The grid for `services`, plus how many unmanaged keys it left out (they are opt-in).
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildPropertyGrid(definitions: CustomPropertyDefinition[], services: GridService[], opts: GridExportOptions): {
|
|
44
|
+
grid: PropertyGrid;
|
|
45
|
+
omittedUnmanaged: string[];
|
|
46
|
+
};
|
|
47
|
+
/** Cells a spreadsheet would evaluate as a formula when the file is opened by double-click. */
|
|
48
|
+
export declare function formulaLikeCells(grid: PropertyGrid): {
|
|
49
|
+
service: string;
|
|
50
|
+
property: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[];
|
|
53
|
+
/**
|
|
54
|
+
* The grid as a header row plus one row of strings per service: the shape every tabular format
|
|
55
|
+
* (CSV, XLSX) writes and {@link parseGridRows} reads back.
|
|
56
|
+
*/
|
|
57
|
+
export declare function gridToRows(grid: PropertyGrid): string[][];
|
|
58
|
+
/** RFC 4180 CSV with a UTF-8 BOM (so Excel reads non-ASCII names) and CRLF line ends. */
|
|
59
|
+
export declare function gridToCsv(grid: PropertyGrid): string;
|
|
60
|
+
/** Parses RFC 4180 CSV (quoted fields, doubled quotes, newlines inside quotes). */
|
|
61
|
+
export declare function parseCsv(input: string): string[][];
|
|
62
|
+
export declare function gridToJson(grid: PropertyGrid): string;
|
|
63
|
+
/** A grid read back from a file, with the problems that make rows unusable. */
|
|
64
|
+
export interface ParsedGrid {
|
|
65
|
+
tenant: string | null;
|
|
66
|
+
columns: string[];
|
|
67
|
+
rows: PropertyGridRow[];
|
|
68
|
+
problems: string[];
|
|
69
|
+
}
|
|
70
|
+
/** Reads an exported grid back (CSV or JSON, decided by content). */
|
|
71
|
+
export declare function parsePropertyGrid(text: string): ParsedGrid;
|
|
72
|
+
/** Reads a grid back from its rows of strings (header first), whatever file they came from. */
|
|
73
|
+
export declare function parseGridRows(input: string[][]): ParsedGrid;
|
|
74
|
+
/**
|
|
75
|
+
* Why `edited` looks like a spreadsheet's automatic conversion of `original` rather than an edit,
|
|
76
|
+
* or undefined. Such a cell is reported and left alone.
|
|
77
|
+
*/
|
|
78
|
+
export declare function spreadsheetMangling(original: string, edited: string): string | undefined;
|
|
79
|
+
/** Services whose row has a cell that differs from its baseline: the only ones an import reads again. */
|
|
80
|
+
export declare function editedServices(grid: ParsedGrid): string[];
|
|
81
|
+
/**
|
|
82
|
+
* `services` with each one's properties taken from a hierarchy read where it has them, plus the
|
|
83
|
+
* services the read found that the list lacks. The services list can lag a save by up to a minute
|
|
84
|
+
* (and miss a just-created service); the hierarchy read is what a save is built from, so existence
|
|
85
|
+
* and conflicts are judged against it.
|
|
86
|
+
*/
|
|
87
|
+
export declare function withGraphProperties(services: GridService[], graph: ServiceBulk.ServiceGraph): GridService[];
|
|
88
|
+
export interface PropertyEdit {
|
|
89
|
+
service: string;
|
|
90
|
+
property: string;
|
|
91
|
+
before: string;
|
|
92
|
+
after: string;
|
|
93
|
+
kind: 'set' | 'remove';
|
|
94
|
+
}
|
|
95
|
+
export interface PropertyImportPlan {
|
|
96
|
+
changes: ServiceBulk.ServiceChange[];
|
|
97
|
+
edits: PropertyEdit[];
|
|
98
|
+
blockers: string[];
|
|
99
|
+
warnings: string[];
|
|
100
|
+
/** Rows whose cells all match their baseline. */
|
|
101
|
+
unchanged: number;
|
|
102
|
+
}
|
|
103
|
+
export interface PropertyImportContext {
|
|
104
|
+
definitions: CustomPropertyDefinition[];
|
|
105
|
+
/** The current service list (name, id, customProperties). */
|
|
106
|
+
services: GridService[];
|
|
107
|
+
tenant: string | null;
|
|
108
|
+
/** Allow a cleared cell to remove the key. */
|
|
109
|
+
force?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The changes an edited grid asks for, checked against the tenant as it is now:
|
|
113
|
+
* - a cell equal to its baseline is untouched;
|
|
114
|
+
* - a cell that looks like a spreadsheet conversion of its baseline is a warning, not a write;
|
|
115
|
+
* - an edited cell whose current value differs from its baseline is a conflict (blocker);
|
|
116
|
+
* - a cleared cell removes the key only with `force`;
|
|
117
|
+
* - a managed value its type or options reject, a column that is not a managed property or a key
|
|
118
|
+
* any service holds, an unknown or renamed service, a duplicate row and a tenant mismatch block.
|
|
119
|
+
*/
|
|
120
|
+
export declare function planPropertyGridImport(grid: ParsedGrid, ctx: PropertyImportContext): PropertyImportPlan;
|
|
121
|
+
//# sourceMappingURL=custom-property-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-property-grid.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/custom-property-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,wBAAwB,EAExB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,oBAAoB,qDAAsD,CAAC;AAExF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,oEAAoE;IACpE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,oBAAoB,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,uBAAuB;IAC1D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AASD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,wBAAwB,EAAE,EACvC,QAAQ,EAAE,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C,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,EAAE,CAU3G;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,WAAW,CAAC,aAAa,EAAE,CAAC;IACrC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,6DAA6D;IAC7D,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,qBAAqB,GAAG,kBAAkB,CA8EvG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { PropertyCoverage } from './custom-properties';
|
|
2
|
+
/**
|
|
3
|
+
* Routing exposure of custom properties (#1628): which notification policies and alarm queues
|
|
4
|
+
* filter on `service_custom_properties.<key>`, and what a service without the key does to them.
|
|
5
|
+
*
|
|
6
|
+
* Measured on THE_LABORATORY (#1628): a policy links a queue through `alarmViews: [<queue id>]`,
|
|
7
|
+
* and the UI also copies the queue's atoms into the policy's own `filterExpressionV1`. An alarm
|
|
8
|
+
* whose services lack the key never matches `equals` / `contains`, and always matches
|
|
9
|
+
* `not_equals` / `not_contains` (even for a key nobody holds). That was measured through the
|
|
10
|
+
* alarm query a queue uses; the notification engine is assumed to evaluate the same way.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SERVICE_PROPERTY_FIELD_PREFIX = "service_custom_properties.";
|
|
13
|
+
export type MissingKeyEffect = 'never matches' | 'always matches' | 'not measured';
|
|
14
|
+
/** What an alarm from a service without the key does to an atom with `condition`. */
|
|
15
|
+
export declare const missingKeyEffect: (condition: string) => MissingKeyEffect;
|
|
16
|
+
/** The fields of a notification policy the exposure reads. */
|
|
17
|
+
export interface RoutingPolicyLike {
|
|
18
|
+
name: string;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
alarmCategory?: string;
|
|
21
|
+
filterExpressionV1?: unknown;
|
|
22
|
+
alarmViews?: unknown[];
|
|
23
|
+
channelNames?: string[];
|
|
24
|
+
}
|
|
25
|
+
/** The fields of an alarm queue the exposure reads. */
|
|
26
|
+
export interface RoutingQueueLike {
|
|
27
|
+
id: string;
|
|
28
|
+
filterName: string;
|
|
29
|
+
alarmCategory?: string;
|
|
30
|
+
filterExpressions?: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface PropertyRoutingAtom {
|
|
33
|
+
kind: 'policy' | 'queue';
|
|
34
|
+
name: string;
|
|
35
|
+
alarmCategory: string;
|
|
36
|
+
active: boolean | null;
|
|
37
|
+
/** Where the atom comes from: the item's own filter, a linked queue, or both. */
|
|
38
|
+
source: string[];
|
|
39
|
+
property: string;
|
|
40
|
+
condition: string;
|
|
41
|
+
value: string;
|
|
42
|
+
managed: boolean;
|
|
43
|
+
totalServices: number;
|
|
44
|
+
holders: number;
|
|
45
|
+
/** Services in scope without the key. */
|
|
46
|
+
missing: string[];
|
|
47
|
+
missingEffect: MissingKeyEffect;
|
|
48
|
+
/** Value → services holding it. */
|
|
49
|
+
heldValues: Record<string, number>;
|
|
50
|
+
notes: string[];
|
|
51
|
+
/** Policies that link this queue (queues only). */
|
|
52
|
+
usedBy: string[];
|
|
53
|
+
channels: string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Every atom on a service custom property in `policies` (their own filters plus the queues they
|
|
57
|
+
* link) and in `queues`, with the services in `coverage` that lack the key and what that does.
|
|
58
|
+
*/
|
|
59
|
+
export declare function propertyRoutingExposure(policies: RoutingPolicyLike[], queues: RoutingQueueLike[], coverage: PropertyCoverage): PropertyRoutingAtom[];
|
|
60
|
+
//# sourceMappingURL=custom-property-routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-property-routing.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/custom-property-routing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;GASG;AAEH,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,GAAG,cAAc,CAAC;AASnF,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,KAAG,gBAAmE,CAAC;AAEzH,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,iFAAiF;IACjF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,gBAAgB,CAAC;IAChC,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mDAAmD;IACnD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAmBD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,MAAM,EAAE,gBAAgB,EAAE,EAC1B,QAAQ,EAAE,gBAAgB,GACzB,mBAAmB,EAAE,CA4EvB"}
|
|
@@ -10,7 +10,12 @@ export declare namespace CreateServices {
|
|
|
10
10
|
sourceName: string;
|
|
11
11
|
attributeName: string;
|
|
12
12
|
id: string;
|
|
13
|
-
|
|
13
|
+
/** Absent on a configured KPI entry when saved; read back as 0. */
|
|
14
|
+
firstSeen?: number;
|
|
15
|
+
/** On a configured KPI entry (`type: 'availability'`): `metric` when it points at a metric. */
|
|
16
|
+
configSource?: string;
|
|
17
|
+
/** On a configured KPI entry: saved as a number, read back as a string ("0.5"). */
|
|
18
|
+
threshold?: number | string;
|
|
14
19
|
}
|
|
15
20
|
interface ServiceCustomProperty {
|
|
16
21
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.create.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/services.create.ts"],"names":[],"mappings":"AAAA,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,mBAAmB;QAClC,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,aAAa;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"services.create.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/services.create.ts"],"names":[],"mappings":"AAAA,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,mBAAmB;QAClC,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,aAAa;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,EAAE,EAAE,MAAM,CAAC;QACX,mEAAmE;QACnE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,+FAA+F;QAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mFAAmF;QACnF,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC7B;IAED,UAAiB,qBAAqB;QACpC,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf;IAED,KAAY,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAC;IAE3D,UAAiB,mBAAmB;QAClC,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,2BAA2B,CAAC;KACvC;IAED,UAAiB,qBAAqB;QACp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AiB,WAAW;QAC1B,gBAAgB,EAAE,MAAM,CAAC;QACzB,gBAAgB,EAAE,MAAM,CAAC;QACzB,UAAU,EAAE,qBAAqB,CAAC;KACnC;IAED,UAAiB,iBAAiB;QAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC1B,KAAK,EAAE,WAAW,EAAE,CAAC;KACtB;IAED,UAAiB,qBAAqB;QACpC,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SyntheticAccessPolicy } from '../synthetics/access-policy';
|
|
2
|
+
import { RoleView } from './roles';
|
|
3
|
+
/**
|
|
4
|
+
* Where a user group is named. Roles and synthetics access policies reference groups by NAME and
|
|
5
|
+
* the platform never follows a rename or a delete (#1584), so these are what a rename or a delete
|
|
6
|
+
* would silently break — and, for names no group has, what is already broken.
|
|
7
|
+
*/
|
|
8
|
+
export interface GroupReference {
|
|
9
|
+
group: string;
|
|
10
|
+
kind: 'role' | 'synthetics-access';
|
|
11
|
+
/** Role id, or the policy id. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Role label, or the policy name. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** What the reference grants. */
|
|
16
|
+
grants: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function allGroupReferences(roleViews: RoleView[], policies: SyntheticAccessPolicy[]): GroupReference[];
|
|
19
|
+
/** The roles and access policies that name `group`. */
|
|
20
|
+
export declare function groupReferences(group: string, roleViews: RoleView[], policies: SyntheticAccessPolicy[]): GroupReference[];
|
|
21
|
+
/** References to group names no existing group has: access that silently grants nobody. */
|
|
22
|
+
export declare function danglingGroupReferences(existingGroups: string[], roleViews: RoleView[], policies: SyntheticAccessPolicy[]): GroupReference[];
|
|
23
|
+
//# sourceMappingURL=access-references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-references.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/security/access-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAe,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACnC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,GAAG,cAAc,EAAE,CAsB7G;AAED,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,GAAG,cAAc,EAAE,CAEzH;AAED,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,GAAG,cAAc,EAAE,CAG5I"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Roles (2026-11 release). Measured on THE_LABORATORY (#1584, #1597):
|
|
4
|
+
* - `GET ess/roles/v1?cohort=<GUID>` is the catalog: built-in PU, SA, TA, UZ and custom `VIEW####`
|
|
5
|
+
* roles, each with a level, a permission tree (`taskMap`) and a description.
|
|
6
|
+
* - The same roles are DataStore views with `attributes.owner: 'DP'` (`views/view/{id}`). WHO HOLDS
|
|
7
|
+
* a role is the view's `access.users` and `access.groups` (groups by NAME). A grant or revoke is a
|
|
8
|
+
* full `PUT` of the view carrying `lastModificationTimestamp`; a stale timestamp is refused (409,
|
|
9
|
+
* "View … was updated meanwhile") and nothing changes.
|
|
10
|
+
* - Built-in roles' features cannot be edited; their holders can.
|
|
11
|
+
* These views do not fit the generic DataStore view schema (`views` is a list of feature filters and
|
|
12
|
+
* grants carry `permissions`), so they have their own.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BUILT_IN_ROLE_IDS: readonly ["PU", "SA", "TA", "UZ"];
|
|
15
|
+
/** The tenant admin role: revoking its last holder would lock admins out. */
|
|
16
|
+
export declare const TENANT_ADMIN_ROLE_ID = "TA";
|
|
17
|
+
export declare const RoleCatalogEntrySchema: z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
20
|
+
level: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
roleDescription: z.ZodOptional<z.ZodString>;
|
|
22
|
+
customRoles: z.ZodOptional<z.ZodUnknown>;
|
|
23
|
+
privileges: z.ZodOptional<z.ZodUnknown>;
|
|
24
|
+
taskMap: z.ZodOptional<z.ZodUnknown>;
|
|
25
|
+
}, z.core.$loose>;
|
|
26
|
+
export type RoleCatalogEntry = z.infer<typeof RoleCatalogEntrySchema>;
|
|
27
|
+
export declare const RoleCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
30
|
+
level: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
roleDescription: z.ZodOptional<z.ZodString>;
|
|
32
|
+
customRoles: z.ZodOptional<z.ZodUnknown>;
|
|
33
|
+
privileges: z.ZodOptional<z.ZodUnknown>;
|
|
34
|
+
taskMap: z.ZodOptional<z.ZodUnknown>;
|
|
35
|
+
}, z.core.$loose>>;
|
|
36
|
+
/** A group or user holding a role. `permissions` is what the UI writes: READ, WRITE, DELETE. */
|
|
37
|
+
export declare const RoleGrantSchema: z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
}, z.core.$loose>;
|
|
41
|
+
export type RoleGrant = z.infer<typeof RoleGrantSchema>;
|
|
42
|
+
export declare const RoleViewSchema: z.ZodObject<{
|
|
43
|
+
viewId: z.ZodString;
|
|
44
|
+
access: z.ZodObject<{
|
|
45
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
}, z.core.$loose>>>;
|
|
49
|
+
users: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$loose>>>;
|
|
53
|
+
}, z.core.$loose>;
|
|
54
|
+
lastModificationTimestamp: z.ZodNumber;
|
|
55
|
+
views: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
56
|
+
attributes: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
58
|
+
label: z.ZodOptional<z.ZodString>;
|
|
59
|
+
description: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>>;
|
|
61
|
+
inactive: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
}, z.core.$loose>;
|
|
63
|
+
export type RoleView = z.infer<typeof RoleViewSchema>;
|
|
64
|
+
/** The permissions the UI writes when a role is granted. */
|
|
65
|
+
export declare const ROLE_GRANT_PERMISSIONS: string[];
|
|
66
|
+
/** The view with `name` added to its group or user holders (unchanged when already there). */
|
|
67
|
+
export declare function withRoleGrant(view: RoleView, kind: 'groups' | 'users', name: string): RoleView;
|
|
68
|
+
/** The view with `name` removed from its group or user holders. */
|
|
69
|
+
export declare function withoutRoleGrant(view: RoleView, kind: 'groups' | 'users', name: string): RoleView;
|
|
70
|
+
/** Group and user names holding the role. */
|
|
71
|
+
export declare function roleHolders(view: RoleView): {
|
|
72
|
+
groups: string[];
|
|
73
|
+
users: string[];
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/security/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,iBAAiB,mCAAoC,CAAC;AACnE,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,eAAO,MAAM,sBAAsB;;;;;;;;iBAQjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,iBAAiB;;;;;;;;kBAAkC,CAAC;AAEjE,gGAAgG;AAChG,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;iBAczB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,UAA8B,CAAC;AAIlE,8FAA8F;AAC9F,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAG9F;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAEjG;AAED,6CAA6C;AAC7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAEjF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* User groups (2026-11 release): `ess/usergroups/v1`. Measured on THE_LABORATORY (#1584, #1597):
|
|
4
|
+
* names are unique (a duplicate create is a 400, code 1251341); `PUT …/{id}` replaces the whole
|
|
5
|
+
* member list and can rename; `DELETE …/{id}` is a 204. Roles and synthetics access policies name a
|
|
6
|
+
* group by its NAME, so a rename or a delete leaves those references dangling — the platform does
|
|
7
|
+
* not follow or check them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const UserGroupUserInfoSchema: z.ZodObject<{
|
|
10
|
+
userId: z.ZodString;
|
|
11
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
12
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
13
|
+
statusEnum: z.ZodOptional<z.ZodString>;
|
|
14
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
15
|
+
userRefID: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
16
|
+
dateCreated: z.ZodOptional<z.ZodString>;
|
|
17
|
+
dateModified: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$loose>;
|
|
19
|
+
export type UserGroupUserInfo = z.infer<typeof UserGroupUserInfoSchema>;
|
|
20
|
+
/** One group as listed (`GET …/list`, no members) or read (`GET …/{id}`, members on request). */
|
|
21
|
+
export declare const UserGroupSchema: z.ZodObject<{
|
|
22
|
+
groupId: z.ZodNumber;
|
|
23
|
+
groupName: z.ZodString;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
created: z.ZodOptional<z.ZodString>;
|
|
26
|
+
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
27
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
28
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
userInfos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
userId: z.ZodString;
|
|
32
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
33
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
statusEnum: z.ZodOptional<z.ZodString>;
|
|
35
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
36
|
+
userRefID: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
37
|
+
dateCreated: z.ZodOptional<z.ZodString>;
|
|
38
|
+
dateModified: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$loose>>>;
|
|
40
|
+
}, z.core.$loose>;
|
|
41
|
+
export type UserGroup = z.infer<typeof UserGroupSchema>;
|
|
42
|
+
export declare const UserGroupListSchema: z.ZodArray<z.ZodObject<{
|
|
43
|
+
groupId: z.ZodNumber;
|
|
44
|
+
groupName: z.ZodString;
|
|
45
|
+
description: z.ZodOptional<z.ZodString>;
|
|
46
|
+
created: z.ZodOptional<z.ZodString>;
|
|
47
|
+
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
48
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
49
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
userInfos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
userId: z.ZodString;
|
|
53
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
54
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
55
|
+
statusEnum: z.ZodOptional<z.ZodString>;
|
|
56
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
57
|
+
userRefID: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
58
|
+
dateCreated: z.ZodOptional<z.ZodString>;
|
|
59
|
+
dateModified: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>>>;
|
|
61
|
+
}, z.core.$loose>>;
|
|
62
|
+
/** Create body (`POST ess/usergroups/v1`); update (`PUT …/{id}`) adds `groupId` and replaces members. */
|
|
63
|
+
export declare const UserGroupWriteSchema: z.ZodObject<{
|
|
64
|
+
groupName: z.ZodString;
|
|
65
|
+
description: z.ZodString;
|
|
66
|
+
userIds: z.ZodArray<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type UserGroupWrite = z.infer<typeof UserGroupWriteSchema>;
|
|
69
|
+
//# sourceMappingURL=user-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-groups.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/security/user-groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;GAMG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;iBASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,iGAAiG;AACjG,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;kBAA2B,CAAC;AAE5D,yGAAyG;AACzG,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { CreateServices } from '../oi/services.create';
|
|
2
|
+
import type { ServiceSLIs } from './slis';
|
|
3
|
+
/**
|
|
4
|
+
* A service's Availability KPI, set from one of its SLIs (#1564; UI HAR, 2026-11-15).
|
|
5
|
+
*
|
|
6
|
+
* The KPI is one entry of `type: 'availability'` in the service's `attributes.metrics`, saved with the rest of the
|
|
7
|
+
* service (`oi/v2/sa/save?replace=true`); clearing it removes the entry. Set from an SLI, the entry points at the SLI's
|
|
8
|
+
* SLO Threshold metric (`<service uuid>:<SLI name> Threshold` on `OI|SA|SERVICES|ALL`), which emits 1 for an interval
|
|
9
|
+
* that meets the objective (`threshold_emit_value`) and 0 otherwise; the UI saves threshold 0.5, so the service counts
|
|
10
|
+
* as available while the objective is met. Only an Availability SLI with an SLO qualifies, and only once its Threshold
|
|
11
|
+
* metric is published: a few minutes after the SLI or its SLO is created or changed. Renaming the SLI renames the
|
|
12
|
+
* metric, and a KPI set before the rename keeps pointing at the old one.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace AvailabilityKpi {
|
|
15
|
+
type ServiceMetric = CreateServices.ServiceMetric;
|
|
16
|
+
type CreateServiceBody = CreateServices.CreateServiceBody;
|
|
17
|
+
export const SOURCE = "OI|SA|SERVICES|ALL";
|
|
18
|
+
export const THRESHOLD = 0.5;
|
|
19
|
+
/** How far back a Threshold metric must have reported to count as published (the UI asks for 24 h). */
|
|
20
|
+
export const PUBLISHED_WINDOW_MS = 86400000;
|
|
21
|
+
export const NOT_PUBLISHED = "its SLO Threshold metric is not published yet: it appears a few minutes after the SLI or its SLO is created or changed; list again shortly";
|
|
22
|
+
/** A metric the metadata store returned for one of the names asked about. */
|
|
23
|
+
export interface Published {
|
|
24
|
+
id: string;
|
|
25
|
+
firstSeen?: number;
|
|
26
|
+
lastSeen?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface Candidate {
|
|
29
|
+
sli: string;
|
|
30
|
+
/** The SLI group's id: the SLI list API's `id`, which every SLI in a group shares (#1570). */
|
|
31
|
+
sliGroupId: string;
|
|
32
|
+
sliType: string;
|
|
33
|
+
hasSLO: boolean;
|
|
34
|
+
targetPercent?: number;
|
|
35
|
+
/** The SLI's SLO Threshold metric (attribute name), when it has an SLO. */
|
|
36
|
+
thresholdMetric?: string;
|
|
37
|
+
/** The metric id the KPI would point at, from the metadata store; absent until published. */
|
|
38
|
+
metricId?: string;
|
|
39
|
+
firstSeen?: number;
|
|
40
|
+
/** True when this SLI can be the KPI now. */
|
|
41
|
+
eligible: boolean;
|
|
42
|
+
/** Why it cannot, when it cannot. */
|
|
43
|
+
reason?: string;
|
|
44
|
+
/** True when this SLI is the current KPI. */
|
|
45
|
+
current: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface Current {
|
|
48
|
+
attributeName: string;
|
|
49
|
+
metricId: string;
|
|
50
|
+
configSource?: string;
|
|
51
|
+
threshold?: number | string;
|
|
52
|
+
/** The SLI the KPI comes from, when it is one of the service's SLIs. */
|
|
53
|
+
sli?: string;
|
|
54
|
+
published: boolean;
|
|
55
|
+
note?: string;
|
|
56
|
+
}
|
|
57
|
+
/** The service's KPI entry, if it has one. */
|
|
58
|
+
export function currentEntry(metrics: readonly ServiceMetric[] | undefined): ServiceMetric | undefined;
|
|
59
|
+
/** The metric names to look up: every SLI's SLO Threshold metric, and the current KPI's metric. */
|
|
60
|
+
export function metricNames(slis: readonly ServiceSLIs.SLI[], current?: ServiceMetric): string[];
|
|
61
|
+
/** Each SLI, whether it can be the KPI now, and why not. */
|
|
62
|
+
export function candidates(slis: readonly ServiceSLIs.SLI[], published: ReadonlyMap<string, Published>, current?: ServiceMetric): Candidate[];
|
|
63
|
+
/** The current KPI, what it comes from, and whether its metric still reports. */
|
|
64
|
+
export function describeCurrent(entry: ServiceMetric | undefined, slis: readonly ServiceSLIs.SLI[], published: ReadonlyMap<string, Published>): Current | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Finds an SLI by exact name, then by name ignoring case. Never by id: the only id the SLI list carries is the SLI
|
|
67
|
+
* group's, shared by every SLI in the group (#1570).
|
|
68
|
+
*/
|
|
69
|
+
export function findCandidate(list: readonly Candidate[], sli: string): Candidate | undefined;
|
|
70
|
+
/** Why `sli` names none of the service's SLIs, and what it could name instead. */
|
|
71
|
+
export function notFound(list: readonly Candidate[], sli: string, serviceName: string): string;
|
|
72
|
+
/** The KPI entry for an eligible candidate, as the UI saves it. */
|
|
73
|
+
export function entryFor(candidate: Candidate): ServiceMetric;
|
|
74
|
+
/**
|
|
75
|
+
* Sets (`entry`) or clears (`null`) the KPI on `serviceName` in a store body, replacing any existing KPI entry.
|
|
76
|
+
*
|
|
77
|
+
* @returns change lines; empty when nothing changes.
|
|
78
|
+
* @throws Error if the service is not in the body.
|
|
79
|
+
*/
|
|
80
|
+
export function apply(body: CreateServiceBody, serviceName: string, entry: ServiceMetric | null, names?: {
|
|
81
|
+
before?: string;
|
|
82
|
+
after?: string;
|
|
83
|
+
}): string[];
|
|
84
|
+
export {};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=availability-kpi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability-kpi.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/service/availability-kpi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,yBAAiB,eAAe,CAAC;IAC/B,KAAK,aAAa,GAAG,cAAc,CAAC,aAAa,CAAC;IAClD,KAAK,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,CAAC;IAE1D,MAAM,CAAC,MAAM,MAAM,uBAAuB,CAAC;IAC3C,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC;IAC7B,uGAAuG;IACvG,MAAM,CAAC,MAAM,mBAAmB,WAAa,CAAC;IAC9C,MAAM,CAAC,MAAM,aAAa,+IACoH,CAAC;IAE/I,6EAA6E;IAC7E,MAAM,WAAW,SAAS;QACxB,EAAE,EAAE,MAAM,CAAC;QACX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AAE,SAAS,CAAC,EACzC,OAAO,CAAC,EAAE,aAAa,GACtB,SAAS,EAAE,CAwBb;IAED,iFAAiF;IACjF,MAAM,UAAU,eAAe,CAC7B,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,IAAI,EAAE,SAAS,WAAW,CAAC,GAAG,EAAE,EAChC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,GACxC,OAAO,GAAG,SAAS,CAkBrB;IAED;;;OAGG;IACH,MAAM,UAAU,aAAa,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE5F;IAED,kFAAkF;IAClF,MAAM,UAAU,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAO7F;IAED,mEAAmE;IACnE,MAAM,UAAU,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,aAAa,CAY5D;IAOD;;;;;OAKG;IACH,MAAM,UAAU,KAAK,CACnB,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,aAAa,GAAG,IAAI,EAC3B,KAAK,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAC9C,MAAM,EAAE,CAUV;;CACF"}
|
|
@@ -5,6 +5,8 @@ export declare namespace SituationLifecycle {
|
|
|
5
5
|
propValue: string[];
|
|
6
6
|
oldValue: string[];
|
|
7
7
|
timestamp: string;
|
|
8
|
+
/** When the platform processed the event (epoch ms). `processed_time - timestamp` is the processing delay. Absent on older events. */
|
|
9
|
+
processed_time?: string;
|
|
8
10
|
updatedBy: string;
|
|
9
11
|
userType: string;
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SituationLifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/situations/SituationLifecycle.ts"],"names":[],"mappings":"AAAA,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,aAAa;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB;IAED,UAAiB,oCAAoC;QACnD,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,aAAa,EAAE,CAAC;KACnC;CA+OF"}
|
|
1
|
+
{"version":3,"file":"SituationLifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/situations/SituationLifecycle.ts"],"names":[],"mappings":"AAAA,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,aAAa;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,sIAAsI;QACtI,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB;IAED,UAAiB,oCAAoC;QACnD,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,aAAa,EAAE,CAAC;KACnC;CA+OF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { PolicyNamingOperation } from './clustering-policy';
|
|
2
|
+
/**
|
|
3
|
+
* Custom situation naming templates (`situation_custom_name`): literal text with
|
|
4
|
+
* `{operation(arg, …)}` calls the platform fills from the situation's alarms,
|
|
5
|
+
* e.g. `{split(host,'.',0)} – {rootcausealarm(product)}`.
|
|
6
|
+
*
|
|
7
|
+
* The operation catalog (`policyfields` → `operationsDefinition`) gives each
|
|
8
|
+
* operation's positional parameters. Parameter 1 is the alarm field, written
|
|
9
|
+
* bare. Delimiters are quoted strings. Rules below were measured through policy
|
|
10
|
+
* preview on THE_LABORATORY (2026-11-16, REL-P1 #1588):
|
|
11
|
+
*
|
|
12
|
+
* - `split(field, 'd', n)` — the 0-based nth segment.
|
|
13
|
+
* - `slice(field, 'd', a, b)` — segments a..b inclusive, rejoined with the
|
|
14
|
+
* delimiter; b past the end is clamped; a > b is a 400.
|
|
15
|
+
* - `slicesegment(field, 'd', [i, j, …])` — the listed segments in the order
|
|
16
|
+
* given, joined with the delimiter; out-of-range indices are dropped. A bare
|
|
17
|
+
* integer instead of a list is a 400.
|
|
18
|
+
* - A segment that does not exist renders as `N/A`. Negative indices, an empty
|
|
19
|
+
* delimiter or a missing argument are a 400 on save and preview.
|
|
20
|
+
* - Whitespace around the field name is kept, so `{split( host ,…)}` reads a
|
|
21
|
+
* field named ` host ` and always renders `N/A`.
|
|
22
|
+
* - Operation names are case-insensitive; literal text between calls is kept.
|
|
23
|
+
*/
|
|
24
|
+
/** One argument of a naming call, classified by how it was written. */
|
|
25
|
+
export type NamingArgument = {
|
|
26
|
+
kind: 'quoted';
|
|
27
|
+
raw: string;
|
|
28
|
+
value: string;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'list';
|
|
31
|
+
raw: string;
|
|
32
|
+
items: string[];
|
|
33
|
+
} | {
|
|
34
|
+
kind: 'bare';
|
|
35
|
+
raw: string;
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
/** One piece of a parsed template: literal text or an operation call. */
|
|
39
|
+
export type NamingTemplatePart = {
|
|
40
|
+
kind: 'text';
|
|
41
|
+
text: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'call';
|
|
44
|
+
raw: string;
|
|
45
|
+
operation: string;
|
|
46
|
+
args: NamingArgument[];
|
|
47
|
+
};
|
|
48
|
+
export interface ParsedNamingTemplate {
|
|
49
|
+
parts: NamingTemplatePart[];
|
|
50
|
+
/** Syntax problems; when non-empty, `parts` holds what parsed before the first one. */
|
|
51
|
+
errors: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Splits a template into literal text and `{operation(args)}` calls. Quotes and
|
|
55
|
+
* `[…]` lists may contain commas, parentheses and braces. Parsing is purely
|
|
56
|
+
* syntactic; {@link namingTemplateProblems} checks calls against the catalog.
|
|
57
|
+
*/
|
|
58
|
+
export declare function parseNamingTemplate(template: string): ParsedNamingTemplate;
|
|
59
|
+
/**
|
|
60
|
+
* A usable example call built from the catalog's parameter defaults, e.g.
|
|
61
|
+
* `{split(field,'|',0)}` or `{mostimpacted(field[,3])}` (optional arguments in
|
|
62
|
+
* brackets).
|
|
63
|
+
*/
|
|
64
|
+
export declare function namingOperationSignature(operation: PolicyNamingOperation): string;
|
|
65
|
+
/**
|
|
66
|
+
* Problems that would make the platform reject a template (400) or render a
|
|
67
|
+
* call as `N/A` for every situation: syntax errors, operations the tenant does
|
|
68
|
+
* not define, unsupported or space-padded fields, wrong argument counts or
|
|
69
|
+
* types, and inverted `slice` ranges. With an empty catalog only syntax is
|
|
70
|
+
* checked. Returns human-readable lines, empty when the template is usable.
|
|
71
|
+
*/
|
|
72
|
+
export declare function namingTemplateProblems(template: string, operations: PolicyNamingOperation[]): string[];
|
|
73
|
+
//# sourceMappingURL=naming-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming-template.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/situations/naming-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,I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