@dx-do/client 7.8.0 → 7.10.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 +1190 -92
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1148 -93
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +2 -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/datastore/tas/store.d.ts +114 -129
- package/dist/src/lib/model/datastore/tas/store.d.ts.map +1 -1
- package/dist/src/lib/model/log/ingest.d.ts +13 -0
- package/dist/src/lib/model/log/ingest.d.ts.map +1 -1
- package/dist/src/lib/model/nass/NASS.d.ts +4 -2
- package/dist/src/lib/model/nass/NASS.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.create.d.ts +19 -0
- package/dist/src/lib/model/oi/services.create.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.transform.d.ts +20 -1
- package/dist/src/lib/model/oi/services.transform.d.ts.map +1 -1
- package/dist/src/lib/model/service/service-overview.d.ts +2 -0
- package/dist/src/lib/model/service/service-overview.d.ts.map +1 -1
- package/dist/src/lib/model/situations/clustering-policy.d.ts +492 -0
- package/dist/src/lib/model/situations/clustering-policy.d.ts.map +1 -0
- package/dist/src/lib/model/tas/TASGraph.d.ts +7 -3
- package/dist/src/lib/model/tas/TASGraph.d.ts.map +1 -1
- package/dist/src/lib/services/alarm.service.d.ts +11 -1
- package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
- package/dist/src/lib/services/clustering-policy.service.d.ts +159 -0
- package/dist/src/lib/services/clustering-policy.service.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +6 -3
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts +6 -2
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts +8 -5
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts.map +1 -1
- package/dist/src/lib/services/dx-saas.service.d.ts +16 -7
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/event.service.d.ts +10 -1
- package/dist/src/lib/services/event.service.d.ts.map +1 -1
- package/dist/src/lib/services/logs.service.d.ts +40 -0
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/service-monolith.d.ts +2 -0
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/service.service.d.ts +24 -2
- package/dist/src/lib/services/service.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import type { PolicyFilterExpression } from '../channel/notify-policy-template';
|
|
3
|
+
/**
|
|
4
|
+
* Custom situation policies — the product calls them "custom situation
|
|
5
|
+
* definitions"; the API calls them clustering policies (`clusteringpolicy`).
|
|
6
|
+
*
|
|
7
|
+
* Situations are alarm clusters. A policy controls how and when a cluster
|
|
8
|
+
* forms, in three independent parts over one alarm stream:
|
|
9
|
+
*
|
|
10
|
+
* 1. `filterCriteria` — which raw alarms the policy may cluster at all.
|
|
11
|
+
* 2. `rcFilterCriteria` — which of those are root-cause candidates (nullable).
|
|
12
|
+
* 3. `clusteringCriteria` — the ranked fields the grouping keys on, each with
|
|
13
|
+
* a match weight and optional per-field properties.
|
|
14
|
+
*
|
|
15
|
+
* Shapes measured from HARs of the lab tenant's UI
|
|
16
|
+
* (`docs/internal/custom-situation.har`, `custom-situation-preview.har`,
|
|
17
|
+
* 2026-09-20) plus a live preview probe against seeded alarms.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Conditions accepted in criteria atoms. `equals`, `contains` and `not_empty`
|
|
21
|
+
* are observed in UI-authored policies; the rest come from the platform's
|
|
22
|
+
* shared alarm-filter component, which the policy editor reuses.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CLUSTERING_POLICY_CONDITIONS: readonly ["equals", "not_equals", "contains", "not_contains", "starts_with", "ends_with", "not_empty", "exists", "does_not_exists", "greater_than", "less_than"];
|
|
25
|
+
export type ClusteringPolicyCondition = (typeof CLUSTERING_POLICY_CONDITIONS)[number];
|
|
26
|
+
/** `not_empty` / `exists` / `does_not_exists` are presence tests; the UI sends `*` as their value. */
|
|
27
|
+
export declare const CLUSTERING_POLICY_PRESENCE_CONDITIONS: readonly string[];
|
|
28
|
+
export declare const CLUSTERING_POLICY_STATUSES: readonly ["ACTIVE", "INACTIVE"];
|
|
29
|
+
export type ClusteringPolicyStatus = (typeof CLUSTERING_POLICY_STATUSES)[number];
|
|
30
|
+
/**
|
|
31
|
+
* The preview windows the UI offers, in seconds. `time=` on the preview call
|
|
32
|
+
* accepts any integer; these are the labelled choices.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CLUSTERING_POLICY_PREVIEW_RANGES: Record<string, number>;
|
|
35
|
+
/** `updatedBy` values the platform stamps on its own seeded policies. */
|
|
36
|
+
export declare const CLUSTERING_POLICY_BUILTIN_AUTHORS: readonly string[];
|
|
37
|
+
/**
|
|
38
|
+
* Per-field clustering options. `hierarchy` makes a service match walk the
|
|
39
|
+
* service hierarchy; `leftElementTrim` drops N leading dot-separated elements
|
|
40
|
+
* of the value before comparing (e.g. trimming a host's subdomain).
|
|
41
|
+
*/
|
|
42
|
+
export declare const ClusteringCriterionPropertiesSchema: z.ZodObject<{
|
|
43
|
+
hierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
leftElementTrim: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
}, z.core.$loose>;
|
|
46
|
+
export type ClusteringCriterionProperties = z.infer<typeof ClusteringCriterionPropertiesSchema>;
|
|
47
|
+
/** One ranked clustering field and how strongly its values must match. */
|
|
48
|
+
export declare const ClusteringCriterionSchema: z.ZodObject<{
|
|
49
|
+
field: z.ZodString;
|
|
50
|
+
value: z.ZodNumber;
|
|
51
|
+
rank: z.ZodNumber;
|
|
52
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
hierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
leftElementTrim: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
|
+
}, z.core.$loose>;
|
|
57
|
+
export type ClusteringCriterion = z.infer<typeof ClusteringCriterionSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* Criteria are the platform's shared AND-of-OR-groups filter tree — the same
|
|
60
|
+
* shape as a notification policy's `filterExpressionV1`, so the atom and
|
|
61
|
+
* expression schemas are shared. The UI emits one OR-group per field.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ClusteringPolicyCriteriaSchema: z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>;
|
|
64
|
+
export type ClusteringPolicyCriteria = PolicyFilterExpression;
|
|
65
|
+
/**
|
|
66
|
+
* An unset criteria tree. The server does not store `null` — it normalizes an
|
|
67
|
+
* omitted or null `rcFilterCriteria` to an empty object and returns `{}`,
|
|
68
|
+
* which is not a valid atom / and / or node. Measured on the lab tenant.
|
|
69
|
+
*/
|
|
70
|
+
export declare const EmptyCriteriaSchema: z.ZodObject<{}, z.core.$strict>;
|
|
71
|
+
/** A criteria tree as the server may return it: a real tree, `{}`, or null. */
|
|
72
|
+
export declare const StoredCriteriaSchema: z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
73
|
+
/** True for the server's `{}` representation of "no criteria", and for null/undefined. */
|
|
74
|
+
export declare function isEmptyCriteria(criteria: unknown): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* A policy as the server returns it. `filterSearchFields`,
|
|
77
|
+
* `rcFilterSearchFields` and `clusteringSearchFields` are derived by the
|
|
78
|
+
* server from the criteria — never send them.
|
|
79
|
+
*/
|
|
80
|
+
export declare const ClusteringPolicySchema: z.ZodObject<{
|
|
81
|
+
policy_id: z.ZodString;
|
|
82
|
+
tenant_id: z.ZodOptional<z.ZodString>;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
situation_custom_name: z.ZodOptional<z.ZodString>;
|
|
85
|
+
priority: z.ZodNumber;
|
|
86
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
90
|
+
stableWindow: z.ZodNumber;
|
|
91
|
+
extensionWindow: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
maxStableWindow: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
status: z.ZodString;
|
|
94
|
+
filterCriteria: z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
95
|
+
rcFilterCriteria: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
96
|
+
clusteringCriteria: z.ZodArray<z.ZodObject<{
|
|
97
|
+
field: z.ZodString;
|
|
98
|
+
value: z.ZodNumber;
|
|
99
|
+
rank: z.ZodNumber;
|
|
100
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
hierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
leftElementTrim: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
}, z.core.$loose>>;
|
|
104
|
+
}, z.core.$loose>>;
|
|
105
|
+
filterSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
rcFilterSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
+
clusteringSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
}, z.core.$loose>;
|
|
109
|
+
export type ClusteringPolicy = z.infer<typeof ClusteringPolicySchema>;
|
|
110
|
+
/**
|
|
111
|
+
* The envelope of `POST clusteringpolicy/search` — and of
|
|
112
|
+
* `GET clusteringpolicy/{id}`, which returns the same shape with one result.
|
|
113
|
+
*/
|
|
114
|
+
export declare const ClusteringPolicySearchResponseSchema: z.ZodObject<{
|
|
115
|
+
searchPolicyResults: z.ZodArray<z.ZodObject<{
|
|
116
|
+
policy_id: z.ZodString;
|
|
117
|
+
tenant_id: z.ZodOptional<z.ZodString>;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
situation_custom_name: z.ZodOptional<z.ZodString>;
|
|
120
|
+
priority: z.ZodNumber;
|
|
121
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
125
|
+
stableWindow: z.ZodNumber;
|
|
126
|
+
extensionWindow: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
maxStableWindow: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
status: z.ZodString;
|
|
129
|
+
filterCriteria: z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>;
|
|
130
|
+
rcFilterCriteria: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
131
|
+
clusteringCriteria: z.ZodArray<z.ZodObject<{
|
|
132
|
+
field: z.ZodString;
|
|
133
|
+
value: z.ZodNumber;
|
|
134
|
+
rank: z.ZodNumber;
|
|
135
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
hierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
leftElementTrim: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$loose>>;
|
|
139
|
+
}, z.core.$loose>>;
|
|
140
|
+
filterSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
rcFilterSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
142
|
+
clusteringSearchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
}, z.core.$loose>>;
|
|
144
|
+
displayCount: z.ZodNumber;
|
|
145
|
+
}, z.core.$loose>;
|
|
146
|
+
export type ClusteringPolicySearchResponse = z.infer<typeof ClusteringPolicySearchResponseSchema>;
|
|
147
|
+
export declare const ClusteringPolicySearchRequestSchema: z.ZodObject<{
|
|
148
|
+
recordFrom: z.ZodNumber;
|
|
149
|
+
recordTo: z.ZodNumber;
|
|
150
|
+
sortCol: z.ZodString;
|
|
151
|
+
}, z.core.$loose>;
|
|
152
|
+
export type ClusteringPolicySearchRequest = z.infer<typeof ClusteringPolicySearchRequestSchema>;
|
|
153
|
+
/**
|
|
154
|
+
* The body of `PUT clusteringpolicy`. There is no POST: the presence of
|
|
155
|
+
* `policy_id` is the only thing that distinguishes an update from a create.
|
|
156
|
+
*/
|
|
157
|
+
export declare const ClusteringPolicyWriteBodySchema: z.ZodObject<{
|
|
158
|
+
policy_id: z.ZodOptional<z.ZodString>;
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
situation_custom_name: z.ZodString;
|
|
161
|
+
stableWindow: z.ZodNumber;
|
|
162
|
+
maxStableWindow: z.ZodNumber;
|
|
163
|
+
extensionWindow: z.ZodNumber;
|
|
164
|
+
status: z.ZodEnum<{
|
|
165
|
+
ACTIVE: "ACTIVE";
|
|
166
|
+
INACTIVE: "INACTIVE";
|
|
167
|
+
}>;
|
|
168
|
+
filterCriteria: z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>;
|
|
169
|
+
rcFilterCriteria: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodType<PolicyFilterExpression, unknown, z.core.$ZodTypeInternals<PolicyFilterExpression, unknown>>, z.ZodObject<{}, z.core.$strict>]>>>;
|
|
170
|
+
clusteringCriteria: z.ZodArray<z.ZodObject<{
|
|
171
|
+
field: z.ZodString;
|
|
172
|
+
value: z.ZodNumber;
|
|
173
|
+
rank: z.ZodNumber;
|
|
174
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
hierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
leftElementTrim: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$loose>>;
|
|
178
|
+
}, z.core.$loose>>;
|
|
179
|
+
priority: z.ZodNumber;
|
|
180
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$loose>;
|
|
185
|
+
export type ClusteringPolicyWriteBody = z.infer<typeof ClusteringPolicyWriteBodySchema>;
|
|
186
|
+
/** For one clustering field: every value seen, and those that actually matched. */
|
|
187
|
+
export declare const ClusteringCriteriaValuesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
188
|
+
allValues: z.ZodArray<z.ZodString>;
|
|
189
|
+
matchingValues: z.ZodArray<z.ZodString>;
|
|
190
|
+
}, z.core.$loose>>;
|
|
191
|
+
/**
|
|
192
|
+
* One alarm template inside a previewed cluster. `alarms` carries the full raw
|
|
193
|
+
* alarm documents, so a preview response grows quickly with `size` — render a
|
|
194
|
+
* summary, never the whole thing.
|
|
195
|
+
*/
|
|
196
|
+
export declare const ClusteringPreviewTemplateSchema: z.ZodObject<{
|
|
197
|
+
templateId: z.ZodNumber;
|
|
198
|
+
clusterId: z.ZodNumber;
|
|
199
|
+
message: z.ZodOptional<z.ZodString>;
|
|
200
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
201
|
+
host: z.ZodOptional<z.ZodString>;
|
|
202
|
+
product: z.ZodOptional<z.ZodString>;
|
|
203
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
204
|
+
lastAlarmsCount: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
highestSeverityAlarmCount: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
highestSeverityEarliestAlarmTime: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
alarms: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
208
|
+
totalAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
209
|
+
closedAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
|
+
servicesImpacted: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
211
|
+
earliestSourceAlarmURL: z.ZodOptional<z.ZodString>;
|
|
212
|
+
customAttributeMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
213
|
+
templateMetaDataMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
214
|
+
alarmCount: z.ZodNumber;
|
|
215
|
+
earliestAlarmTime: z.ZodNumber;
|
|
216
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$loose>>>;
|
|
218
|
+
}, z.core.$loose>;
|
|
219
|
+
export type ClusteringPreviewTemplate = z.infer<typeof ClusteringPreviewTemplateSchema>;
|
|
220
|
+
/** One cluster the policy would have produced over the previewed window. */
|
|
221
|
+
export declare const ClusteringPreviewClusterSchema: z.ZodObject<{
|
|
222
|
+
clusterId: z.ZodNumber;
|
|
223
|
+
clusterName: z.ZodOptional<z.ZodString>;
|
|
224
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
225
|
+
templateId: z.ZodNumber;
|
|
226
|
+
clusterId: z.ZodNumber;
|
|
227
|
+
message: z.ZodOptional<z.ZodString>;
|
|
228
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
229
|
+
host: z.ZodOptional<z.ZodString>;
|
|
230
|
+
product: z.ZodOptional<z.ZodString>;
|
|
231
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
232
|
+
lastAlarmsCount: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
highestSeverityAlarmCount: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
highestSeverityEarliestAlarmTime: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
alarms: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
236
|
+
totalAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
237
|
+
closedAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
238
|
+
servicesImpacted: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
239
|
+
earliestSourceAlarmURL: z.ZodOptional<z.ZodString>;
|
|
240
|
+
customAttributeMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
241
|
+
templateMetaDataMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
242
|
+
alarmCount: z.ZodNumber;
|
|
243
|
+
earliestAlarmTime: z.ZodNumber;
|
|
244
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$loose>>>;
|
|
246
|
+
}, z.core.$loose>>;
|
|
247
|
+
totalTemplates: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
totalAlarms: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
250
|
+
product: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
+
mostImpacted_alarmId: z.ZodOptional<z.ZodString>;
|
|
252
|
+
clusteringCriteriaValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
253
|
+
allValues: z.ZodArray<z.ZodString>;
|
|
254
|
+
matchingValues: z.ZodArray<z.ZodString>;
|
|
255
|
+
}, z.core.$loose>>>;
|
|
256
|
+
}, z.core.$loose>;
|
|
257
|
+
export type ClusteringPreviewCluster = z.infer<typeof ClusteringPreviewClusterSchema>;
|
|
258
|
+
/** Response of `PUT clusteringpolicy/preview?size=&time=`. */
|
|
259
|
+
export declare const ClusteringPolicyPreviewResponseSchema: z.ZodObject<{
|
|
260
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
261
|
+
clusteringList: z.ZodArray<z.ZodObject<{
|
|
262
|
+
clusterId: z.ZodNumber;
|
|
263
|
+
clusterName: z.ZodOptional<z.ZodString>;
|
|
264
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
265
|
+
templateId: z.ZodNumber;
|
|
266
|
+
clusterId: z.ZodNumber;
|
|
267
|
+
message: z.ZodOptional<z.ZodString>;
|
|
268
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
269
|
+
host: z.ZodOptional<z.ZodString>;
|
|
270
|
+
product: z.ZodOptional<z.ZodString>;
|
|
271
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
272
|
+
lastAlarmsCount: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
highestSeverityAlarmCount: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
highestSeverityEarliestAlarmTime: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
alarms: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
276
|
+
totalAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
|
+
closedAlarmIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
+
servicesImpacted: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
279
|
+
earliestSourceAlarmURL: z.ZodOptional<z.ZodString>;
|
|
280
|
+
customAttributeMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
281
|
+
templateMetaDataMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
282
|
+
alarmCount: z.ZodNumber;
|
|
283
|
+
earliestAlarmTime: z.ZodNumber;
|
|
284
|
+
earliestAlarmMessage: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$loose>>>;
|
|
286
|
+
}, z.core.$loose>>;
|
|
287
|
+
totalTemplates: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
totalAlarms: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
290
|
+
product: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
291
|
+
mostImpacted_alarmId: z.ZodOptional<z.ZodString>;
|
|
292
|
+
clusteringCriteriaValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
293
|
+
allValues: z.ZodArray<z.ZodString>;
|
|
294
|
+
matchingValues: z.ZodArray<z.ZodString>;
|
|
295
|
+
}, z.core.$loose>>>;
|
|
296
|
+
}, z.core.$loose>>;
|
|
297
|
+
totalAlarms: z.ZodNumber;
|
|
298
|
+
totalClusters: z.ZodNumber;
|
|
299
|
+
totalTemplates: z.ZodNumber;
|
|
300
|
+
noiseReductionPercent: z.ZodNumber;
|
|
301
|
+
}, z.core.$loose>;
|
|
302
|
+
export type ClusteringPolicyPreviewResponse = z.infer<typeof ClusteringPolicyPreviewResponseSchema>;
|
|
303
|
+
/**
|
|
304
|
+
* A catalog entry. `values` is NOT a closed vocabulary: for the window fields
|
|
305
|
+
* it is `[min, max, default]` and for clustering fields `[min, max]`. Only
|
|
306
|
+
* filtering fields use it as a value suggestion list.
|
|
307
|
+
*/
|
|
308
|
+
export declare const PolicyFieldSchema: z.ZodObject<{
|
|
309
|
+
field: z.ZodString;
|
|
310
|
+
fieldDescription: z.ZodString;
|
|
311
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
312
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
+
}, z.core.$loose>;
|
|
314
|
+
export type PolicyField = z.infer<typeof PolicyFieldSchema>;
|
|
315
|
+
/** One custom-naming operation usable inside `situation_custom_name`. */
|
|
316
|
+
export declare const PolicyNamingOperationSchema: z.ZodObject<{
|
|
317
|
+
opName: z.ZodString;
|
|
318
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
319
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
paramNumber: z.ZodNumber;
|
|
321
|
+
isMandatory: z.ZodBoolean;
|
|
322
|
+
type: z.ZodString;
|
|
323
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, z.core.$loose>>>;
|
|
325
|
+
supportedFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
326
|
+
field: z.ZodString;
|
|
327
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, z.core.$loose>>>;
|
|
329
|
+
}, z.core.$loose>;
|
|
330
|
+
export type PolicyNamingOperation = z.infer<typeof PolicyNamingOperationSchema>;
|
|
331
|
+
/** Response of `GET policyfields` — everything the policy editor needs. */
|
|
332
|
+
export declare const PolicyFieldsResponseSchema: z.ZodObject<{
|
|
333
|
+
filteringFields: z.ZodArray<z.ZodObject<{
|
|
334
|
+
field: z.ZodString;
|
|
335
|
+
fieldDescription: z.ZodString;
|
|
336
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
337
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
}, z.core.$loose>>;
|
|
339
|
+
clusteringFields: z.ZodArray<z.ZodObject<{
|
|
340
|
+
field: z.ZodString;
|
|
341
|
+
fieldDescription: z.ZodString;
|
|
342
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
343
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
}, z.core.$loose>>;
|
|
345
|
+
operationsDefinition: z.ZodArray<z.ZodObject<{
|
|
346
|
+
opName: z.ZodString;
|
|
347
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
348
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
349
|
+
paramNumber: z.ZodNumber;
|
|
350
|
+
isMandatory: z.ZodBoolean;
|
|
351
|
+
type: z.ZodString;
|
|
352
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
353
|
+
}, z.core.$loose>>>;
|
|
354
|
+
supportedFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
355
|
+
field: z.ZodString;
|
|
356
|
+
fieldDescription: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.core.$loose>>>;
|
|
358
|
+
}, z.core.$loose>>;
|
|
359
|
+
stableWindow: z.ZodObject<{
|
|
360
|
+
field: z.ZodString;
|
|
361
|
+
fieldDescription: z.ZodString;
|
|
362
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
363
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
364
|
+
}, z.core.$loose>;
|
|
365
|
+
maxStableWindow: z.ZodObject<{
|
|
366
|
+
field: z.ZodString;
|
|
367
|
+
fieldDescription: z.ZodString;
|
|
368
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
370
|
+
}, z.core.$loose>;
|
|
371
|
+
extensionWindow: z.ZodObject<{
|
|
372
|
+
field: z.ZodString;
|
|
373
|
+
fieldDescription: z.ZodString;
|
|
374
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
hideMoreOptions: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
}, z.core.$loose>;
|
|
377
|
+
}, z.core.$loose>;
|
|
378
|
+
export type PolicyFieldsResponse = z.infer<typeof PolicyFieldsResponseSchema>;
|
|
379
|
+
/** Response of `GET tenantConfigAttributes` — tenant-wide clustering knobs. */
|
|
380
|
+
export declare const TenantConfigAttributeSchema: z.ZodObject<{
|
|
381
|
+
key: z.ZodString;
|
|
382
|
+
value: z.ZodUnknown;
|
|
383
|
+
type: z.ZodString;
|
|
384
|
+
}, z.core.$loose>;
|
|
385
|
+
export type TenantConfigAttribute = z.infer<typeof TenantConfigAttributeSchema>;
|
|
386
|
+
export declare const TenantConfigAttributesResponseSchema: z.ZodObject<{
|
|
387
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
388
|
+
configAttrList: z.ZodArray<z.ZodObject<{
|
|
389
|
+
key: z.ZodString;
|
|
390
|
+
value: z.ZodUnknown;
|
|
391
|
+
type: z.ZodString;
|
|
392
|
+
}, z.core.$loose>>;
|
|
393
|
+
}, z.core.$loose>;
|
|
394
|
+
export type TenantConfigAttributesResponse = z.infer<typeof TenantConfigAttributesResponseSchema>;
|
|
395
|
+
/**
|
|
396
|
+
* The body of `PUT tenantConfigAttributes`. A **partial** update: send only the
|
|
397
|
+
* attributes to change, not the whole list. Measured on the lab tenant.
|
|
398
|
+
*
|
|
399
|
+
* **These attributes are the clustering engine's internal tuning surface, not a
|
|
400
|
+
* documented public API.** Of the ~three dozen keys a tenant exposes, only
|
|
401
|
+
* {@link ALGORITHMIC_SITUATIONS_KEY} has semantics established here; the rest
|
|
402
|
+
* are unverified, the server accepts nonsensical values without complaint, the
|
|
403
|
+
* effect is tenant-wide and continuous, and there is no reset-to-defaults. Read
|
|
404
|
+
* the hazards in full on `ClusteringPolicyService.setTenantConfigAttributes`
|
|
405
|
+
* before writing anything else.
|
|
406
|
+
*/
|
|
407
|
+
export declare const TenantConfigAttributesWriteBodySchema: z.ZodObject<{
|
|
408
|
+
tenantId: z.ZodString;
|
|
409
|
+
configAttrList: z.ZodArray<z.ZodObject<{
|
|
410
|
+
key: z.ZodString;
|
|
411
|
+
value: z.ZodUnknown;
|
|
412
|
+
type: z.ZodString;
|
|
413
|
+
}, z.core.$loose>>;
|
|
414
|
+
}, z.core.$loose>;
|
|
415
|
+
export type TenantConfigAttributesWriteBody = z.infer<typeof TenantConfigAttributesWriteBodySchema>;
|
|
416
|
+
/** Response of `PUT tenantConfigAttributes`. */
|
|
417
|
+
export declare const TenantConfigAttributesWriteResponseSchema: z.ZodObject<{
|
|
418
|
+
Status: z.ZodString;
|
|
419
|
+
}, z.core.$loose>;
|
|
420
|
+
export type TenantConfigAttributesWriteResponse = z.infer<typeof TenantConfigAttributesWriteResponseSchema>;
|
|
421
|
+
/**
|
|
422
|
+
* The tenant attribute behind the UI's "Enable Algorithmic Situations" toggle.
|
|
423
|
+
*
|
|
424
|
+
* When it is on, the platform clusters alarms with its own algorithm and custom
|
|
425
|
+
* situation policies are ignored or behave unpredictably — the single most
|
|
426
|
+
* common reason a correct-looking policy produces nothing.
|
|
427
|
+
*/
|
|
428
|
+
export declare const ALGORITHMIC_SITUATIONS_KEY = "enable_algorithm_cluster";
|
|
429
|
+
/** Reads one attribute out of a `tenantConfigAttributes` response. */
|
|
430
|
+
export declare function tenantConfigAttribute(config: Pick<TenantConfigAttributesResponse, 'configAttrList'>, key: string): TenantConfigAttribute | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* Whether algorithmic situations are on for the tenant. `undefined` when the
|
|
433
|
+
* attribute is absent, which is not the same as "off" — say so rather than
|
|
434
|
+
* guessing.
|
|
435
|
+
*/
|
|
436
|
+
export declare function algorithmicSituationsEnabled(config: Pick<TenantConfigAttributesResponse, 'configAttrList'>): boolean | undefined;
|
|
437
|
+
/** Platform-seeded policies, which a tenant user should not be editing casually. */
|
|
438
|
+
export declare function isBuiltInClusteringPolicy(policy: Pick<ClusteringPolicy, 'updatedBy'>): boolean;
|
|
439
|
+
/** `[min, max]` from a catalog entry's `values`, when it carries bounds. */
|
|
440
|
+
export declare function policyFieldBounds(entry: PolicyField | undefined): {
|
|
441
|
+
min: number;
|
|
442
|
+
max: number;
|
|
443
|
+
} | undefined;
|
|
444
|
+
export interface ClusteringPolicyCreateInput {
|
|
445
|
+
name: string;
|
|
446
|
+
situationName?: string | undefined;
|
|
447
|
+
stableWindow?: number | undefined;
|
|
448
|
+
maxStableWindow?: number | undefined;
|
|
449
|
+
extensionWindow?: number | undefined;
|
|
450
|
+
status?: ClusteringPolicyStatus | undefined;
|
|
451
|
+
priority?: number | undefined;
|
|
452
|
+
filterCriteria: ClusteringPolicyCriteria;
|
|
453
|
+
rcFilterCriteria?: ClusteringPolicyCriteria | null | undefined;
|
|
454
|
+
clusteringCriteria: ClusteringCriterion[];
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* The create body with the UI's defaults filled in. `priority` defaults to
|
|
458
|
+
* the current epoch-ms the way the UI seeds it, which sorts a new policy
|
|
459
|
+
* after every platform-seeded one.
|
|
460
|
+
*/
|
|
461
|
+
export declare function toClusteringPolicyWriteBody(input: ClusteringPolicyCreateInput): ClusteringPolicyWriteBody;
|
|
462
|
+
export interface ClusteringPolicyUpdatePatch {
|
|
463
|
+
name?: string | undefined;
|
|
464
|
+
situationName?: string | undefined;
|
|
465
|
+
stableWindow?: number | undefined;
|
|
466
|
+
maxStableWindow?: number | undefined;
|
|
467
|
+
extensionWindow?: number | undefined;
|
|
468
|
+
status?: ClusteringPolicyStatus | undefined;
|
|
469
|
+
priority?: number | undefined;
|
|
470
|
+
filterCriteria?: ClusteringPolicyCriteria | undefined;
|
|
471
|
+
rcFilterCriteria?: ClusteringPolicyCriteria | null | undefined;
|
|
472
|
+
clusteringCriteria?: ClusteringCriterion[] | undefined;
|
|
473
|
+
}
|
|
474
|
+
/** Renders `clusteringCriteria` as a short, comparable string for change lines. */
|
|
475
|
+
export declare function describeClusteringCriteria(criteria: readonly ClusteringCriterion[]): string;
|
|
476
|
+
/**
|
|
477
|
+
* The update body for an existing policy with only the patched fields changed;
|
|
478
|
+
* everything else is echoed back verbatim, including the envelope fields the
|
|
479
|
+
* server needs (`version`, `created`, `lastUpdated`, `updatedBy`).
|
|
480
|
+
*
|
|
481
|
+
* Returns human-readable `changes`; an empty list means nothing to save.
|
|
482
|
+
*/
|
|
483
|
+
export declare function buildClusteringPolicyUpdateBody(existing: ClusteringPolicy, patch: ClusteringPolicyUpdatePatch): {
|
|
484
|
+
body: ClusteringPolicyWriteBody;
|
|
485
|
+
changes: string[];
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* The seven-key subset `PUT clusteringpolicy/preview` accepts. Sending the
|
|
489
|
+
* full write body is rejected, so the pick is deliberate.
|
|
490
|
+
*/
|
|
491
|
+
export declare function toClusteringPolicyPreviewBody(body: ClusteringPolicyWriteBody): Record<string, unknown>;
|
|
492
|
+
//# sourceMappingURL=clustering-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clustering-policy.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/situations/clustering-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;;;;;;;;;;GAeG;AAMH;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,kKAY/B,CAAC;AACX,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtF,sGAAsG;AACtG,eAAO,MAAM,qCAAqC,EAAE,SAAS,MAAM,EAIlE,CAAC;AAEF,eAAO,MAAM,0BAA0B,iCAAkC,CAAC;AAC1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOnE,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iCAAiC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8ExD;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUtG"}
|
|
@@ -7,13 +7,16 @@ export declare namespace TASGraph {
|
|
|
7
7
|
name: string;
|
|
8
8
|
type: string;
|
|
9
9
|
}
|
|
10
|
+
/** Attribute value the TAS write interface accepts: a string or a list of strings. */
|
|
11
|
+
type AttributeValue = string | string[];
|
|
10
12
|
interface Vertex {
|
|
11
13
|
externalId: string;
|
|
12
|
-
attributes: RequiredAttributes & Record<string,
|
|
14
|
+
attributes: RequiredAttributes & Record<string, AttributeValue>;
|
|
13
15
|
}
|
|
14
16
|
interface Edge {
|
|
15
17
|
sourceExternalId: string;
|
|
16
18
|
targetExternalId: string;
|
|
19
|
+
attributes?: Record<string, AttributeValue>;
|
|
17
20
|
}
|
|
18
21
|
interface StoreGraphRequestBody {
|
|
19
22
|
ttl: number | null;
|
|
@@ -29,10 +32,11 @@ export declare namespace TASGraph {
|
|
|
29
32
|
code: string;
|
|
30
33
|
message: string;
|
|
31
34
|
}
|
|
35
|
+
/** The wire returns arrays for `failedEdges` / `failedVertices` (empty when nothing failed). */
|
|
32
36
|
interface StoreGraphResponseBody {
|
|
33
37
|
graph: Graph;
|
|
34
|
-
failedEdges: FailedEdge;
|
|
35
|
-
failedVertices: FailedVertex;
|
|
38
|
+
failedEdges: FailedEdge[];
|
|
39
|
+
failedVertices: FailedVertex[];
|
|
36
40
|
}
|
|
37
41
|
const sample: StoreGraphRequestBody;
|
|
38
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TASGraph.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/tas/TASGraph.ts"],"names":[],"mappings":"AAAA,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAK;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,EAAE,IAAI,EAAE,CAAC;KACf;IAED,UAAiB,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AAW,EAAE,UAAU,EAAE,CAAC;QAC1B,cAAc,EAAE,YAAY,EAAE,CAAC;KAChC;IAEM,MAAM,MAAM,EAAE,qBAmBpB,CAAC;CACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DxSaasService } from './dx-saas.service';
|
|
1
|
+
import { DxSaasService, RequestOverrides } from './dx-saas.service';
|
|
2
2
|
import { OIAlarm } from '../model/oi/alarms';
|
|
3
3
|
import { DateTime } from 'luxon';
|
|
4
4
|
import { Logging } from '@dx-do/util';
|
|
@@ -22,6 +22,16 @@ export declare class AlarmService {
|
|
|
22
22
|
constructor(dxSaaSService: DxSaasService, simpleLog?: Logging.SimpleLog);
|
|
23
23
|
/** Returns a single alarm by its ID using the GET endpoint. */
|
|
24
24
|
getAlarm(alarmId: string): Promise<OIAlarm.Alarm>;
|
|
25
|
+
/**
|
|
26
|
+
* Finds one alarm, open or closed, by its ID (for an ingested alarm, the
|
|
27
|
+
* `alarm_unique_id` it was sent with) among alarms from the last
|
|
28
|
+
* `lookbackMs`, through the alarm search.
|
|
29
|
+
*
|
|
30
|
+
* @remarks Resolves `undefined` when there is no such alarm. {@link getAlarm}
|
|
31
|
+
* cannot tell that apart from a failure: its endpoint answers HTTP 500 for an
|
|
32
|
+
* unknown ID.
|
|
33
|
+
*/
|
|
34
|
+
findAlarm(alarmId: string, lookbackMs: number, requestOverrides?: RequestOverrides): Promise<OIAlarm.Alarm | undefined>;
|
|
25
35
|
/** Returns the overview (first alarm in a custom-filter search) for an alarm ID. */
|
|
26
36
|
getAlarmOverview(alarmId: string): Promise<OIAlarm.Alarm>;
|
|
27
37
|
/** Sends a notification for an alarm to the specified channel with optional template/locale. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alarm.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/alarm.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":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