@dx-do/client 5.2.36 → 5.2.38
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/README.md +37 -0
- package/dist/index.cjs.js +1856 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1721 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/agent/AgentSourceQuery.d.ts +2 -0
- package/dist/src/lib/model/agent/AgentSourceQuery.d.ts.map +1 -1
- package/dist/src/lib/model/alarm/alarm-enrichment-filter.d.ts +5 -0
- package/dist/src/lib/model/alarm/alarm-enrichment-filter.d.ts.map +1 -1
- package/dist/src/lib/model/alarm/alarm-enrichment.d.ts +1 -0
- package/dist/src/lib/model/alarm/alarm-enrichment.d.ts.map +1 -1
- package/dist/src/lib/model/alert/AlertResponse.d.ts +9 -0
- package/dist/src/lib/model/alert/AlertResponse.d.ts.map +1 -1
- package/dist/src/lib/model/alert/PlatformAlert.d.ts +99 -0
- package/dist/src/lib/model/alert/PlatformAlert.d.ts.map +1 -0
- package/dist/src/lib/model/apm-universe/APMUniverseResponse.d.ts +2 -0
- package/dist/src/lib/model/apm-universe/APMUniverseResponse.d.ts.map +1 -1
- package/dist/src/lib/model/channel/ChannelCreateRequest.d.ts +1 -0
- package/dist/src/lib/model/channel/ChannelCreateRequest.d.ts.map +1 -1
- package/dist/src/lib/model/channel/ChannelResponse.d.ts +3 -0
- package/dist/src/lib/model/channel/ChannelResponse.d.ts.map +1 -1
- package/dist/src/lib/model/channel/TemplatesResponse.d.ts +3 -0
- package/dist/src/lib/model/channel/TemplatesResponse.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts +23 -0
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts +33 -1
- 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 -0
- package/dist/src/lib/model/datastore/metrics-metadata/attribute-name-specifier.d.ts +120 -0
- package/dist/src/lib/model/datastore/metrics-metadata/attribute-name-specifier.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/folder-name-specifier.d.ts +41 -0
- package/dist/src/lib/model/datastore/metrics-metadata/folder-name-specifier.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/index.d.ts +7 -0
- package/dist/src/lib/model/datastore/metrics-metadata/index.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/query-specifier.d.ts +76 -0
- package/dist/src/lib/model/datastore/metrics-metadata/query-specifier.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/query.d.ts +24 -0
- package/dist/src/lib/model/datastore/metrics-metadata/query.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/response.d.ts +44 -0
- package/dist/src/lib/model/datastore/metrics-metadata/response.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/source-name-specifier.d.ts +57 -0
- package/dist/src/lib/model/datastore/metrics-metadata/source-name-specifier.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nassql/filter-specs.d.ts +16 -0
- package/dist/src/lib/model/datastore/nassql/filter-specs.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nassql/index.d.ts +5 -0
- package/dist/src/lib/model/datastore/nassql/index.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nassql/operations.d.ts +462 -0
- package/dist/src/lib/model/datastore/nassql/operations.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nassql/query.d.ts +412 -0
- package/dist/src/lib/model/datastore/nassql/query.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nassql/response.d.ts +4 -0
- package/dist/src/lib/model/datastore/nassql/response.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/tas/filters.d.ts +388 -0
- package/dist/src/lib/model/datastore/tas/filters.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/tas/index.d.ts +4 -0
- package/dist/src/lib/model/datastore/tas/index.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/tas/query.d.ts +64 -0
- package/dist/src/lib/model/datastore/tas/query.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/tas/response.d.ts +151 -0
- package/dist/src/lib/model/datastore/tas/response.d.ts.map +1 -0
- package/dist/src/lib/model/dxchannel/DXChannel.d.ts +3 -0
- package/dist/src/lib/model/dxchannel/DXChannel.d.ts.map +1 -1
- package/dist/src/lib/model/managementmodule/PlatformManagementModule.d.ts +71 -0
- package/dist/src/lib/model/managementmodule/PlatformManagementModule.d.ts.map +1 -0
- package/dist/src/lib/model/metricgrouping/PlatformMetricGrouping.d.ts +107 -0
- package/dist/src/lib/model/metricgrouping/PlatformMetricGrouping.d.ts.map +1 -0
- package/dist/src/lib/model/oi/services.d.ts +6 -0
- package/dist/src/lib/model/oi/services.d.ts.map +1 -1
- package/dist/src/lib/model/postman/Postman.d.ts +2 -0
- package/dist/src/lib/model/postman/Postman.d.ts.map +1 -1
- package/dist/src/lib/model/service/service-detail.d.ts +2 -0
- package/dist/src/lib/model/service/service-detail.d.ts.map +1 -1
- package/dist/src/lib/model/service/service-search.d.ts +1 -1
- package/dist/src/lib/model/service/service-search.d.ts.map +1 -1
- package/dist/src/lib/model/tas/TAS.d.ts +3 -0
- package/dist/src/lib/model/tas/TAS.d.ts.map +1 -1
- package/dist/src/lib/model/vertex/BulkVertexPatch.d.ts +1 -0
- package/dist/src/lib/model/vertex/BulkVertexPatch.d.ts.map +1 -1
- package/dist/src/lib/services/agent.service.d.ts +17 -0
- package/dist/src/lib/services/agent.service.d.ts.map +1 -1
- package/dist/src/lib/services/alarm.service.d.ts +13 -0
- package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
- package/dist/src/lib/services/alert.service.d.ts +15 -0
- package/dist/src/lib/services/alert.service.d.ts.map +1 -1
- package/dist/src/lib/services/apm-universe.service.d.ts +5 -0
- package/dist/src/lib/services/apm-universe.service.d.ts.map +1 -1
- package/dist/src/lib/services/asm.service.d.ts +2 -0
- package/dist/src/lib/services/asm.service.d.ts.map +1 -1
- package/dist/src/lib/services/attribute.service.d.ts +3 -0
- package/dist/src/lib/services/attribute.service.d.ts.map +1 -1
- package/dist/src/lib/services/authorization.service.d.ts +3 -0
- package/dist/src/lib/services/authorization.service.d.ts.map +1 -1
- package/dist/src/lib/services/axa.service.d.ts +21 -0
- package/dist/src/lib/services/axa.service.d.ts.map +1 -1
- package/dist/src/lib/services/blob.service.d.ts +3 -0
- package/dist/src/lib/services/blob.service.d.ts.map +1 -1
- package/dist/src/lib/services/channel.service.d.ts +12 -0
- package/dist/src/lib/services/channel.service.d.ts.map +1 -1
- package/dist/src/lib/services/dashboard.service.d.ts +23 -0
- package/dist/src/lib/services/dashboard.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +25 -0
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-nassql.service.d.ts +44 -0
- package/dist/src/lib/services/datastore/datastore-nassql.service.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts +25 -0
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts.map +1 -0
- package/dist/src/lib/services/dx-saas.service.d.ts +139 -0
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/dxoi.service.d.ts +6 -0
- package/dist/src/lib/services/dxoi.service.d.ts.map +1 -1
- package/dist/src/lib/services/event.service.d.ts +4 -0
- package/dist/src/lib/services/event.service.d.ts.map +1 -1
- package/dist/src/lib/services/experience.service.d.ts +10 -0
- package/dist/src/lib/services/experience.service.d.ts.map +1 -1
- package/dist/src/lib/services/graph.service.d.ts +7 -0
- package/dist/src/lib/services/graph.service.d.ts.map +1 -1
- package/dist/src/lib/services/inventory.service.d.ts +11 -2
- package/dist/src/lib/services/inventory.service.d.ts.map +1 -1
- package/dist/src/lib/services/js-extension.service.d.ts +5 -0
- package/dist/src/lib/services/js-extension.service.d.ts.map +1 -1
- package/dist/src/lib/services/logs.service.d.ts +1 -0
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/management-module.service.d.ts +10 -0
- package/dist/src/lib/services/management-module.service.d.ts.map +1 -1
- package/dist/src/lib/services/metric-batch.service.d.ts +8 -0
- package/dist/src/lib/services/metric-batch.service.d.ts.map +1 -1
- package/dist/src/lib/services/metric-grouping.service.d.ts +6 -0
- package/dist/src/lib/services/metric-grouping.service.d.ts.map +1 -1
- package/dist/src/lib/services/nass.service.d.ts +7 -0
- package/dist/src/lib/services/nass.service.d.ts.map +1 -1
- package/dist/src/lib/services/notification.service.d.ts +1 -0
- package/dist/src/lib/services/notification.service.d.ts.map +1 -1
- package/dist/src/lib/services/o2-notification.service.d.ts +1 -0
- package/dist/src/lib/services/o2-notification.service.d.ts.map +1 -1
- package/dist/src/lib/services/o2-universe.service.d.ts +8 -0
- package/dist/src/lib/services/o2-universe.service.d.ts.map +1 -1
- package/dist/src/lib/services/perspective.service.d.ts +3 -0
- package/dist/src/lib/services/perspective.service.d.ts.map +1 -1
- package/dist/src/lib/services/platform-alert.service.d.ts +24 -0
- package/dist/src/lib/services/platform-alert.service.d.ts.map +1 -0
- package/dist/src/lib/services/platform-management-module.service.d.ts +21 -0
- package/dist/src/lib/services/platform-management-module.service.d.ts.map +1 -0
- package/dist/src/lib/services/platform-metric-grouping.service.d.ts +24 -0
- package/dist/src/lib/services/platform-metric-grouping.service.d.ts.map +1 -0
- package/dist/src/lib/services/service-monolith.d.ts +23 -1
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/service.service.d.ts +16 -0
- package/dist/src/lib/services/service.service.d.ts.map +1 -1
- package/dist/src/lib/services/session.service.d.ts +1 -0
- package/dist/src/lib/services/session.service.d.ts.map +1 -1
- package/dist/src/lib/services/situation.service.d.ts +7 -0
- package/dist/src/lib/services/situation.service.d.ts.map +1 -1
- package/dist/src/lib/services/sql.service.d.ts +1 -0
- package/dist/src/lib/services/sql.service.d.ts.map +1 -1
- package/dist/src/lib/services/tas.service.d.ts +2 -0
- package/dist/src/lib/services/tas.service.d.ts.map +1 -1
- package/dist/src/lib/services/vertex.service.d.ts +25 -0
- package/dist/src/lib/services/vertex.service.d.ts.map +1 -1
- package/package.json +11 -2
package/dist/index.esm.js
CHANGED
|
@@ -15,6 +15,7 @@ import require$$1$2 from 'tty';
|
|
|
15
15
|
import require$$0$4 from 'os';
|
|
16
16
|
import zlib from 'zlib';
|
|
17
17
|
import require$$0$5, { EventEmitter as EventEmitter$1 } from 'events';
|
|
18
|
+
import { z } from 'zod/v4';
|
|
18
19
|
import require$$0$7 from 'node:stream';
|
|
19
20
|
import require$$0$6 from 'net';
|
|
20
21
|
import require$$1$3 from 'tls';
|
|
@@ -38,6 +39,7 @@ function _mergeNamespaces(n, m) {
|
|
|
38
39
|
return Object.freeze(n);
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
/** @internal */
|
|
41
43
|
const ags = {
|
|
42
44
|
"specifier": {
|
|
43
45
|
"op": "OR",
|
|
@@ -53,6 +55,7 @@ const ags = {
|
|
|
53
55
|
},
|
|
54
56
|
"authorizationView": null,
|
|
55
57
|
};
|
|
58
|
+
/** @internal */
|
|
56
59
|
const agsresponse = {
|
|
57
60
|
"items": [
|
|
58
61
|
{ "name": "SuperDomain|lvnkprod010236|Spectrum|SpectrumWeb" },
|
|
@@ -157,6 +160,7 @@ var AlarmEnrichmentFilter;
|
|
|
157
160
|
throw new Error(':unknown alarm filter type');
|
|
158
161
|
}
|
|
159
162
|
AlarmEnrichmentFilter.getAlarmFilterType = getAlarmFilterType;
|
|
163
|
+
/** @internal */
|
|
160
164
|
class FilterNode {
|
|
161
165
|
data;
|
|
162
166
|
children = new Array();
|
|
@@ -171,6 +175,7 @@ var AlarmEnrichmentFilter;
|
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
AlarmEnrichmentFilter.FilterNode = FilterNode;
|
|
178
|
+
/** @internal */
|
|
174
179
|
function convertAnd(andFilter, parent) {
|
|
175
180
|
if (andFilter.and.expressions.length == 1) {
|
|
176
181
|
return convertFilterToNode(andFilter.and.expressions[0], parent);
|
|
@@ -187,6 +192,7 @@ var AlarmEnrichmentFilter;
|
|
|
187
192
|
}
|
|
188
193
|
}
|
|
189
194
|
AlarmEnrichmentFilter.convertAnd = convertAnd;
|
|
195
|
+
/** @internal */
|
|
190
196
|
function convertOr(orFilter, parent) {
|
|
191
197
|
if (orFilter.or.expressions.length == 1) {
|
|
192
198
|
return convertFilterToNode(orFilter.or.expressions[0], parent);
|
|
@@ -214,6 +220,7 @@ var AlarmEnrichmentFilter;
|
|
|
214
220
|
}
|
|
215
221
|
}
|
|
216
222
|
AlarmEnrichmentFilter.conditionReadable = conditionReadable;
|
|
223
|
+
/** @internal */
|
|
217
224
|
function convertAttribute(alarmAttributeFilter, parent) {
|
|
218
225
|
const node = new FilterNode({
|
|
219
226
|
filterType: 'attribute',
|
|
@@ -222,6 +229,7 @@ var AlarmEnrichmentFilter;
|
|
|
222
229
|
return node;
|
|
223
230
|
}
|
|
224
231
|
AlarmEnrichmentFilter.convertAttribute = convertAttribute;
|
|
232
|
+
/** @internal */
|
|
225
233
|
function convertFilterToNode(alarmFilter, parent) {
|
|
226
234
|
switch (getAlarmFilterType(alarmFilter)) {
|
|
227
235
|
case 'and':
|
|
@@ -239,6 +247,7 @@ var AlarmEnrichmentFilter;
|
|
|
239
247
|
|
|
240
248
|
var AlarmEnrichment;
|
|
241
249
|
(function (AlarmEnrichment) {
|
|
250
|
+
/** @internal */
|
|
242
251
|
AlarmEnrichment.SAMPLE_RULES_RESPONSE = [
|
|
243
252
|
{
|
|
244
253
|
tenant_id: 'AA0725E0-0402-4320-A2B7-407025E9D673',
|
|
@@ -526,6 +535,9 @@ var AlertDefinitionResponse;
|
|
|
526
535
|
|
|
527
536
|
var AlertResponse;
|
|
528
537
|
(function (AlertResponse) {
|
|
538
|
+
/**
|
|
539
|
+
* @deprecated Use {@link AlertResponseV2.AllAlertsRequestBody} instead.
|
|
540
|
+
*/
|
|
529
541
|
AlertResponse.AllAlertsRequestBody = {
|
|
530
542
|
mgmtModuleExtIds: [],
|
|
531
543
|
alertType: 'all',
|
|
@@ -25329,8 +25341,1074 @@ var DashboardSearch;
|
|
|
25329
25341
|
})(DashboardSearch.SearchType || (DashboardSearch.SearchType = {}));
|
|
25330
25342
|
})(DashboardSearch || (DashboardSearch = {}));
|
|
25331
25343
|
|
|
25344
|
+
const AttributeExpressionOperatorSchema = z.enum([
|
|
25345
|
+
'IN',
|
|
25346
|
+
'NOT_IN',
|
|
25347
|
+
'MATCHES',
|
|
25348
|
+
'NOT_MATCHES',
|
|
25349
|
+
'GE',
|
|
25350
|
+
'GT',
|
|
25351
|
+
'LE',
|
|
25352
|
+
'LT',
|
|
25353
|
+
]);
|
|
25354
|
+
const AttributeExpressionComparatorSchema = z.enum([
|
|
25355
|
+
'LEXICAL',
|
|
25356
|
+
'NUMBER',
|
|
25357
|
+
'DATETIME',
|
|
25358
|
+
]);
|
|
25359
|
+
const AttributeExpressionSchema = z.looseObject({
|
|
25360
|
+
name: z.string().optional(),
|
|
25361
|
+
pointer: z.string().optional(),
|
|
25362
|
+
values: z.array(z.string()).optional(),
|
|
25363
|
+
operator: AttributeExpressionOperatorSchema.optional(),
|
|
25364
|
+
layer: z.string().optional(),
|
|
25365
|
+
comparator: AttributeExpressionComparatorSchema.optional(),
|
|
25366
|
+
caseInsensitive: z.boolean().optional(),
|
|
25367
|
+
});
|
|
25368
|
+
const AttributeValueAsFieldSchema = z.looseObject({
|
|
25369
|
+
name: z.string().optional(),
|
|
25370
|
+
pointer: z.string().optional(),
|
|
25371
|
+
as: z.string().optional(),
|
|
25372
|
+
});
|
|
25373
|
+
const TraversalVertexFilterSchema = z.looseObject({
|
|
25374
|
+
op: z.string().optional(),
|
|
25375
|
+
input: z.lazy(() => z.array(TraversalVertexFilterSchema)).optional(),
|
|
25376
|
+
expressions: z.array(AttributeExpressionSchema).optional(),
|
|
25377
|
+
layer: z.string().optional(),
|
|
25378
|
+
values: z.array(z.string()).optional(),
|
|
25379
|
+
vertexId: z.array(z.number()).optional(),
|
|
25380
|
+
});
|
|
25381
|
+
const TraversalEdgeFilterSchema = z.looseObject({
|
|
25382
|
+
op: z.string().optional(),
|
|
25383
|
+
input: z.lazy(() => z.array(TraversalEdgeFilterSchema)).optional(),
|
|
25384
|
+
expressions: z.array(AttributeExpressionSchema).optional(),
|
|
25385
|
+
flowFilter: z.array(z.string()).optional(),
|
|
25386
|
+
});
|
|
25387
|
+
const TraverseDirectionSchema = z.enum(['FORWARD', 'BACKWARD', 'ANY']);
|
|
25388
|
+
const TraverseCollectSchema = z.enum(['ALL', 'EDGE', 'VERTEX', 'NONE']);
|
|
25389
|
+
const TraverseSchema = z.looseObject({
|
|
25390
|
+
edgeFilter: TraversalEdgeFilterSchema.optional(),
|
|
25391
|
+
vertexFilter: TraversalVertexFilterSchema.optional(),
|
|
25392
|
+
collect: TraverseCollectSchema.optional(),
|
|
25393
|
+
direction: TraverseDirectionSchema.optional(),
|
|
25394
|
+
repeatMin: z.number().optional(),
|
|
25395
|
+
repeat: z.number().optional(),
|
|
25396
|
+
optional: z.boolean().optional(),
|
|
25397
|
+
next: z.lazy(() => z.array(TraverseSchema)).optional(),
|
|
25398
|
+
});
|
|
25399
|
+
const VertexStateFilterSchema = z.looseObject({
|
|
25400
|
+
op: z.string().optional(),
|
|
25401
|
+
});
|
|
25402
|
+
const TasGroupingItemSchema = z.looseObject({
|
|
25403
|
+
name: z.string().optional(),
|
|
25404
|
+
layer: z.string().optional(),
|
|
25405
|
+
});
|
|
25406
|
+
const TasAttributeFilterModeSchema = z.enum([
|
|
25407
|
+
'VERTEX_AND_RELATED_EDGES',
|
|
25408
|
+
'EDGE_AND_RELATED_VERTICES',
|
|
25409
|
+
'VERTEX_ONLY',
|
|
25410
|
+
'EDGE_ONLY',
|
|
25411
|
+
]);
|
|
25412
|
+
const TasFollowPathTypeSchema = z.enum([
|
|
25413
|
+
'BOTH',
|
|
25414
|
+
'DOWN',
|
|
25415
|
+
'UP',
|
|
25416
|
+
'UP_THEN_DOWN',
|
|
25417
|
+
'DOWN_THEN_UP',
|
|
25418
|
+
'FULL',
|
|
25419
|
+
'COVERAGE',
|
|
25420
|
+
]);
|
|
25421
|
+
const TasFollowPathFlowFilterSchema = z.enum([
|
|
25422
|
+
'UNDEFINED_FLOW',
|
|
25423
|
+
'DEFINED_FLOW',
|
|
25424
|
+
'FLOW_FROM_INPUT',
|
|
25425
|
+
]);
|
|
25426
|
+
const TasJoinTypeSchema = z.enum(['LEFT', 'INNER', 'RIGHT', 'NOT']);
|
|
25427
|
+
const TasCollectCardInfoTierSchema = z.enum([
|
|
25428
|
+
'EXPERIENCE',
|
|
25429
|
+
'FRONTEND',
|
|
25430
|
+
'DATABASE',
|
|
25431
|
+
'BACKEND',
|
|
25432
|
+
'ANY_ATC',
|
|
25433
|
+
'AGENT',
|
|
25434
|
+
]);
|
|
25435
|
+
const TasCollectExperienceSelectorSchema = z.enum(['EXPERIENCE', 'BT']);
|
|
25436
|
+
const TasFilterLazy = z.lazy(() => TasFilterSchema);
|
|
25437
|
+
const TasAllFilterSchema = z.looseObject({
|
|
25438
|
+
op: z.literal('ALL'),
|
|
25439
|
+
});
|
|
25440
|
+
const TasEmptyFilterSchema = z.looseObject({
|
|
25441
|
+
op: z.literal('EMPTY'),
|
|
25442
|
+
input: TasFilterLazy.optional(),
|
|
25443
|
+
});
|
|
25444
|
+
const TasAndFilterSchema = z.looseObject({
|
|
25445
|
+
op: z.literal('AND'),
|
|
25446
|
+
input: z.array(TasFilterLazy).optional(),
|
|
25447
|
+
});
|
|
25448
|
+
const TasOrFilterSchema = z.looseObject({
|
|
25449
|
+
op: z.literal('OR'),
|
|
25450
|
+
input: z.array(TasFilterLazy).optional(),
|
|
25451
|
+
});
|
|
25452
|
+
const TasNotFilterSchema = z.looseObject({
|
|
25453
|
+
op: z.literal('NOT'),
|
|
25454
|
+
input: TasFilterLazy.optional(),
|
|
25455
|
+
});
|
|
25456
|
+
const TasAttributeFilterSchema = z.looseObject({
|
|
25457
|
+
op: z.literal('ATTRIBUTE'),
|
|
25458
|
+
input: TasFilterLazy.optional(),
|
|
25459
|
+
expressions: z.array(AttributeExpressionSchema).optional(),
|
|
25460
|
+
layer: z.string().optional(),
|
|
25461
|
+
mode: TasAttributeFilterModeSchema.optional(),
|
|
25462
|
+
});
|
|
25463
|
+
const TasTraverseFilterSchema = z.looseObject({
|
|
25464
|
+
op: z.literal('TRAVERSE'),
|
|
25465
|
+
input: TasFilterLazy.optional(),
|
|
25466
|
+
traverse: z.array(TraverseSchema).optional(),
|
|
25467
|
+
collectStart: z.boolean().optional(),
|
|
25468
|
+
includeInput: z.boolean().optional(),
|
|
25469
|
+
});
|
|
25470
|
+
const TasVertexIdFilterSchema = z.looseObject({
|
|
25471
|
+
op: z.literal('VERTEX'),
|
|
25472
|
+
input: TasFilterLazy.optional(),
|
|
25473
|
+
vertexId: z.array(z.number()).optional(),
|
|
25474
|
+
externalId: z.array(z.string()).optional(),
|
|
25475
|
+
not: z.boolean().optional(),
|
|
25476
|
+
});
|
|
25477
|
+
const TasServiceFilterSchema = z.looseObject({
|
|
25478
|
+
op: z.literal('SERVICE'),
|
|
25479
|
+
input: TasFilterLazy.optional(),
|
|
25480
|
+
values: z.array(z.string()).optional(),
|
|
25481
|
+
includeServiceHierarchy: z.boolean().optional(),
|
|
25482
|
+
excludeSubServices: z.boolean().optional(),
|
|
25483
|
+
});
|
|
25484
|
+
const TasLuceneFilterSchema = z.looseObject({
|
|
25485
|
+
op: z.literal('LUCENE'),
|
|
25486
|
+
input: TasFilterLazy.optional(),
|
|
25487
|
+
query: z.string().optional(),
|
|
25488
|
+
});
|
|
25489
|
+
const TasLayerFilterSchema = z.looseObject({
|
|
25490
|
+
op: z.literal('LAYER'),
|
|
25491
|
+
input: TasFilterLazy.optional(),
|
|
25492
|
+
value: z.string().optional(),
|
|
25493
|
+
values: z.array(z.string()).optional(),
|
|
25494
|
+
});
|
|
25495
|
+
const TasJoinFilterSchema = z.looseObject({
|
|
25496
|
+
op: z.literal('JOIN'),
|
|
25497
|
+
input: TasFilterLazy.optional(),
|
|
25498
|
+
type: TasJoinTypeSchema.optional(),
|
|
25499
|
+
rightInput: TasFilterLazy.optional(),
|
|
25500
|
+
});
|
|
25501
|
+
const TasFollowPathFilterSchema = z.looseObject({
|
|
25502
|
+
op: z.literal('FOLLOW_PATH'),
|
|
25503
|
+
input: TasFilterLazy.optional(),
|
|
25504
|
+
type: TasFollowPathTypeSchema.optional(),
|
|
25505
|
+
upHops: z.number().optional(),
|
|
25506
|
+
downHops: z.number().optional(),
|
|
25507
|
+
flowFilter: z.array(TasFollowPathFlowFilterSchema).optional(),
|
|
25508
|
+
followToLayers: z.array(z.string()).optional(),
|
|
25509
|
+
});
|
|
25510
|
+
const TasCoverageFilterSchema = z.looseObject({
|
|
25511
|
+
op: z.literal('COVERAGE'),
|
|
25512
|
+
input: TasFilterLazy.optional(),
|
|
25513
|
+
});
|
|
25514
|
+
const TasStatusFilterSchema = z.looseObject({
|
|
25515
|
+
op: z.literal('STATUS'),
|
|
25516
|
+
input: TasFilterLazy.optional(),
|
|
25517
|
+
statusFilter: VertexStateFilterSchema.optional(),
|
|
25518
|
+
});
|
|
25519
|
+
const TasVariableFilterSchema = z.looseObject({
|
|
25520
|
+
op: z.literal('VARIABLE'),
|
|
25521
|
+
name: z.string().optional(),
|
|
25522
|
+
});
|
|
25523
|
+
const TasLegacyFilterSchema = z.looseObject({
|
|
25524
|
+
op: z.literal('LEGACY'),
|
|
25525
|
+
legacy: z.unknown().optional(),
|
|
25526
|
+
});
|
|
25527
|
+
const TasAddFlowsFilterSchema = z.looseObject({
|
|
25528
|
+
op: z.literal('ADD_FLOWS'),
|
|
25529
|
+
input: TasFilterLazy.optional(),
|
|
25530
|
+
includeJoined: z.boolean().optional(),
|
|
25531
|
+
});
|
|
25532
|
+
const TasAddWiresFilterSchema = z.looseObject({
|
|
25533
|
+
op: z.literal('ADD_WIRES'),
|
|
25534
|
+
input: TasFilterLazy.optional(),
|
|
25535
|
+
considerIncompleteEdges: z.boolean().optional(),
|
|
25536
|
+
});
|
|
25537
|
+
const TasAddWireContextFilterSchema = z.looseObject({
|
|
25538
|
+
op: z.literal('ADD_WIRE_CONTEXT'),
|
|
25539
|
+
input: TasFilterLazy.optional(),
|
|
25540
|
+
addEdges: z.boolean().optional(),
|
|
25541
|
+
addSourceVertices: z.boolean().optional(),
|
|
25542
|
+
addTargetVertices: z.boolean().optional(),
|
|
25543
|
+
});
|
|
25544
|
+
const TasAddTransitioningEdgesFilterSchema = z.looseObject({
|
|
25545
|
+
op: z.literal('ADD_TRANSITIONING_EDGES'),
|
|
25546
|
+
input: TasFilterLazy.optional(),
|
|
25547
|
+
});
|
|
25548
|
+
const TasTakeVerticesFilterSchema = z.looseObject({
|
|
25549
|
+
op: z.literal('TAKE_VERTICES'),
|
|
25550
|
+
input: TasFilterLazy.optional(),
|
|
25551
|
+
});
|
|
25552
|
+
const TasTakeEdgesFilterSchema = z.looseObject({
|
|
25553
|
+
op: z.literal('TAKE_EDGES'),
|
|
25554
|
+
input: TasFilterLazy.optional(),
|
|
25555
|
+
});
|
|
25556
|
+
const TasTakeFlowsFilterSchema = z.looseObject({
|
|
25557
|
+
op: z.literal('TAKE_FLOWS'),
|
|
25558
|
+
input: TasFilterLazy.optional(),
|
|
25559
|
+
});
|
|
25560
|
+
const TasCollectAttributesFilterSchema = z.looseObject({
|
|
25561
|
+
op: z.literal('COLLECT_ATTRIBUTES'),
|
|
25562
|
+
input: TasFilterLazy.optional(),
|
|
25563
|
+
id: z.string().optional(),
|
|
25564
|
+
attributeName: z.string().optional(),
|
|
25565
|
+
layer: z.string().optional(),
|
|
25566
|
+
includeIds: z.boolean().optional(),
|
|
25567
|
+
caseInsensitive: z.boolean().optional(),
|
|
25568
|
+
skipBackends: z.boolean().optional(),
|
|
25569
|
+
});
|
|
25570
|
+
const TasCollectAttributeNamesFilterSchema = z.looseObject({
|
|
25571
|
+
op: z.literal('COLLECT_ATTRIBUTE_NAMES'),
|
|
25572
|
+
input: TasFilterLazy.optional(),
|
|
25573
|
+
id: z.string().optional(),
|
|
25574
|
+
layer: z.string().optional(),
|
|
25575
|
+
});
|
|
25576
|
+
const TasCollectCountsFilterSchema = z.looseObject({
|
|
25577
|
+
op: z.literal('COLLECT_COUNTS'),
|
|
25578
|
+
input: TasFilterLazy.optional(),
|
|
25579
|
+
id: z.string().optional(),
|
|
25580
|
+
});
|
|
25581
|
+
const TasCollectVertexIdFilterSchema = z.looseObject({
|
|
25582
|
+
op: z.literal('COLLECT_VERTEX_ID'),
|
|
25583
|
+
input: TasFilterLazy.optional(),
|
|
25584
|
+
id: z.string().optional(),
|
|
25585
|
+
layer: z.string().optional(),
|
|
25586
|
+
skipBackends: z.boolean().optional(),
|
|
25587
|
+
});
|
|
25588
|
+
const TasCollectGroupingInfoFilterSchema = z.looseObject({
|
|
25589
|
+
op: z.literal('COLLECT_GROUPING_INFO'),
|
|
25590
|
+
input: TasFilterLazy.optional(),
|
|
25591
|
+
id: z.string().optional(),
|
|
25592
|
+
layer: z.string().optional(),
|
|
25593
|
+
grouping: z.array(TasGroupingItemSchema).optional(),
|
|
25594
|
+
});
|
|
25595
|
+
const TasCollectCardInfoFilterSchema = z.looseObject({
|
|
25596
|
+
op: z.literal('COLLECT_CARD_INFO'),
|
|
25597
|
+
input: TasFilterLazy.optional(),
|
|
25598
|
+
tier: TasCollectCardInfoTierSchema.optional(),
|
|
25599
|
+
grouping: TasGroupingItemSchema.optional(),
|
|
25600
|
+
includeVertexInfo: z.boolean().optional(),
|
|
25601
|
+
});
|
|
25602
|
+
const TasCollectExperienceAttributesFilterSchema = z.looseObject({
|
|
25603
|
+
op: z.literal('COLLECT_EXPERIENCE_ATTRIBUTES'),
|
|
25604
|
+
input: TasFilterLazy.optional(),
|
|
25605
|
+
id: z.string().optional(),
|
|
25606
|
+
attributeName: z.string().optional(),
|
|
25607
|
+
layer: z.string().optional(),
|
|
25608
|
+
caseInsensitive: z.boolean().optional(),
|
|
25609
|
+
selector: TasCollectExperienceSelectorSchema.optional(),
|
|
25610
|
+
});
|
|
25611
|
+
const TasFilterSchema = z.discriminatedUnion('op', [
|
|
25612
|
+
TasAddFlowsFilterSchema,
|
|
25613
|
+
TasAddTransitioningEdgesFilterSchema,
|
|
25614
|
+
TasAddWiresFilterSchema,
|
|
25615
|
+
TasAddWireContextFilterSchema,
|
|
25616
|
+
TasAllFilterSchema,
|
|
25617
|
+
TasAndFilterSchema,
|
|
25618
|
+
TasAttributeFilterSchema,
|
|
25619
|
+
TasEmptyFilterSchema,
|
|
25620
|
+
TasFollowPathFilterSchema,
|
|
25621
|
+
TasJoinFilterSchema,
|
|
25622
|
+
TasLayerFilterSchema,
|
|
25623
|
+
TasNotFilterSchema,
|
|
25624
|
+
TasOrFilterSchema,
|
|
25625
|
+
TasCoverageFilterSchema,
|
|
25626
|
+
TasTakeEdgesFilterSchema,
|
|
25627
|
+
TasTakeFlowsFilterSchema,
|
|
25628
|
+
TasTakeVerticesFilterSchema,
|
|
25629
|
+
TasTraverseFilterSchema,
|
|
25630
|
+
TasVertexIdFilterSchema,
|
|
25631
|
+
TasLegacyFilterSchema,
|
|
25632
|
+
TasVariableFilterSchema,
|
|
25633
|
+
TasCollectAttributesFilterSchema,
|
|
25634
|
+
TasCollectAttributeNamesFilterSchema,
|
|
25635
|
+
TasCollectExperienceAttributesFilterSchema,
|
|
25636
|
+
TasCollectGroupingInfoFilterSchema,
|
|
25637
|
+
TasCollectCardInfoFilterSchema,
|
|
25638
|
+
TasLuceneFilterSchema,
|
|
25639
|
+
TasCollectVertexIdFilterSchema,
|
|
25640
|
+
TasCollectCountsFilterSchema,
|
|
25641
|
+
TasStatusFilterSchema,
|
|
25642
|
+
TasServiceFilterSchema,
|
|
25643
|
+
]);
|
|
25644
|
+
const TasVariableSchema = z.looseObject({
|
|
25645
|
+
name: z.string().optional(),
|
|
25646
|
+
input: TasFilterLazy.optional(),
|
|
25647
|
+
});
|
|
25648
|
+
const TasProjectionFilterSchema = z.looseObject({
|
|
25649
|
+
attributes: z.array(z.string()).optional(),
|
|
25650
|
+
attributeValueAsFields: z.array(AttributeValueAsFieldSchema).optional(),
|
|
25651
|
+
});
|
|
25652
|
+
|
|
25653
|
+
const TasViewSchema = z.enum(['DETAILED', 'BRIEF', 'NO_TYPE']);
|
|
25654
|
+
const TasOrderSchema = z.looseObject({
|
|
25655
|
+
name: z.string().optional(),
|
|
25656
|
+
comparator: AttributeExpressionComparatorSchema.optional(),
|
|
25657
|
+
caseInsensitive: z.boolean().optional(),
|
|
25658
|
+
desc: z.boolean().optional(),
|
|
25659
|
+
});
|
|
25660
|
+
const TasQuerySchema = z.looseObject({
|
|
25661
|
+
version: z.string().optional(),
|
|
25662
|
+
time: z.number().optional(),
|
|
25663
|
+
schema: z.string().optional(),
|
|
25664
|
+
offset: z.number().optional(),
|
|
25665
|
+
limit: z.number().optional(),
|
|
25666
|
+
order: z.array(TasOrderSchema).optional(),
|
|
25667
|
+
variables: z.array(TasVariableSchema).optional(),
|
|
25668
|
+
filter: TasFilterSchema.optional(),
|
|
25669
|
+
universe: TasFilterSchema.optional(),
|
|
25670
|
+
authorizationView: z.string().optional(),
|
|
25671
|
+
postFilter: TasFilterSchema.optional(),
|
|
25672
|
+
stateFilter: VertexStateFilterSchema.optional(),
|
|
25673
|
+
includeStatus: z.boolean().optional(),
|
|
25674
|
+
includeServices: z.boolean().optional(),
|
|
25675
|
+
includeProfile: z.boolean().optional(),
|
|
25676
|
+
flushCacheBeforeQuery: z.boolean().optional(),
|
|
25677
|
+
projection: TasViewSchema.optional(),
|
|
25678
|
+
projectionFilter: TasProjectionFilterSchema.optional(),
|
|
25679
|
+
});
|
|
25680
|
+
|
|
25681
|
+
const TasExternalIdSchema = z.string();
|
|
25682
|
+
const TasAttributeTypeSchema = z.enum([
|
|
25683
|
+
'GATHERED',
|
|
25684
|
+
'CUSTOM',
|
|
25685
|
+
'DECORATED',
|
|
25686
|
+
'HIDDEN',
|
|
25687
|
+
]);
|
|
25688
|
+
const TasVertexSchema = z.looseObject({
|
|
25689
|
+
id: z.number(),
|
|
25690
|
+
externalId: TasExternalIdSchema.optional(),
|
|
25691
|
+
startTime: z.number().optional(),
|
|
25692
|
+
endTime: z.number().optional(),
|
|
25693
|
+
attributes: z.record(z.string(), z.unknown()).optional(),
|
|
25694
|
+
attributesType: z.record(z.string(), TasAttributeTypeSchema).optional(),
|
|
25695
|
+
});
|
|
25696
|
+
const EdgeNumericIdSchema = z.looseObject({
|
|
25697
|
+
sourceId: z.number(),
|
|
25698
|
+
targetId: z.number(),
|
|
25699
|
+
flowId: z.number(),
|
|
25700
|
+
wireId: z.number(),
|
|
25701
|
+
});
|
|
25702
|
+
const TasEdgeSchema = z.looseObject({
|
|
25703
|
+
sourceId: z.number(),
|
|
25704
|
+
targetId: z.number(),
|
|
25705
|
+
flowId: z.number(),
|
|
25706
|
+
wireId: z.number(),
|
|
25707
|
+
sourceExternalId: TasExternalIdSchema.optional(),
|
|
25708
|
+
targetExternalId: TasExternalIdSchema.optional(),
|
|
25709
|
+
flowExternalId: TasExternalIdSchema.optional(),
|
|
25710
|
+
wireExternalId: TasExternalIdSchema.optional(),
|
|
25711
|
+
startTime: z.number().optional(),
|
|
25712
|
+
endTime: z.number().optional(),
|
|
25713
|
+
attributes: z.record(z.string(), z.unknown()).optional(),
|
|
25714
|
+
attributesType: z.record(z.string(), TasAttributeTypeSchema).optional(),
|
|
25715
|
+
});
|
|
25716
|
+
const VertexStateExternalIdSchema = z.looseObject({
|
|
25717
|
+
vertexExternalId: TasExternalIdSchema.optional(),
|
|
25718
|
+
alertExternalId: z.string().optional(),
|
|
25719
|
+
metricExternalId: z.string().optional(),
|
|
25720
|
+
});
|
|
25721
|
+
const VertexStateNumericIdSchema = z.looseObject({
|
|
25722
|
+
vertexId: z.number(),
|
|
25723
|
+
alertId: z.number(),
|
|
25724
|
+
metricId: z.number(),
|
|
25725
|
+
});
|
|
25726
|
+
const VertexStateSchema = z.looseObject({
|
|
25727
|
+
vertexId: z.number(),
|
|
25728
|
+
alertId: z.number(),
|
|
25729
|
+
metricId: z.number(),
|
|
25730
|
+
stateExternalId: VertexStateExternalIdSchema.optional(),
|
|
25731
|
+
status: z.number(),
|
|
25732
|
+
data: z.unknown().optional(),
|
|
25733
|
+
startTime: z.number().optional(),
|
|
25734
|
+
endTime: z.number().optional(),
|
|
25735
|
+
});
|
|
25736
|
+
const TasAnalyticResultSchema = z.looseObject({
|
|
25737
|
+
t: z.string().optional(),
|
|
25738
|
+
});
|
|
25739
|
+
const TasGraphSchema = z.looseObject({
|
|
25740
|
+
vertices: z.array(TasVertexSchema).optional(),
|
|
25741
|
+
edges: z.array(TasEdgeSchema).optional(),
|
|
25742
|
+
states: z.array(VertexStateSchema).optional(),
|
|
25743
|
+
expiredVertices: z.array(z.number()).optional(),
|
|
25744
|
+
expiredEdges: z.array(EdgeNumericIdSchema).optional(),
|
|
25745
|
+
expiredStates: z.array(VertexStateNumericIdSchema).optional(),
|
|
25746
|
+
version: z.string().optional(),
|
|
25747
|
+
analytics: z.array(TasAnalyticResultSchema).optional(),
|
|
25748
|
+
nextOffset: z.number().optional(),
|
|
25749
|
+
totalVertices: z.number().optional(),
|
|
25750
|
+
totalEdges: z.number().optional(),
|
|
25751
|
+
});
|
|
25752
|
+
|
|
25753
|
+
const OperatorSchema = z.enum(['EQ', 'GE', 'GT', 'LE', 'LT', 'NE']);
|
|
25754
|
+
const SourceNameAllSpecifierSchema = z.looseObject({
|
|
25755
|
+
op: z.literal('ALL'),
|
|
25756
|
+
});
|
|
25757
|
+
const SourceNameNoneSpecifierSchema = z.looseObject({
|
|
25758
|
+
op: z.literal('NONE'),
|
|
25759
|
+
});
|
|
25760
|
+
const SourceNameAndSpecifierSchema = z.looseObject({
|
|
25761
|
+
op: z.literal('AND'),
|
|
25762
|
+
specifiers: z.array(z.lazy(() => SourceNameSpecifierSchema)),
|
|
25763
|
+
});
|
|
25764
|
+
const SourceNameOrSpecifierSchema = z.looseObject({
|
|
25765
|
+
op: z.literal('OR'),
|
|
25766
|
+
specifiers: z.array(z.lazy(() => SourceNameSpecifierSchema)),
|
|
25767
|
+
});
|
|
25768
|
+
const SourceNameNotSpecifierSchema = z.looseObject({
|
|
25769
|
+
op: z.literal('NOT'),
|
|
25770
|
+
specifier: z.lazy(() => SourceNameSpecifierSchema),
|
|
25771
|
+
});
|
|
25772
|
+
const SourceNameExactSpecifierSchema = z.looseObject({
|
|
25773
|
+
op: z.literal('EXACT'),
|
|
25774
|
+
names: z.array(z.string()).optional(),
|
|
25775
|
+
ignoreCase: z.boolean().optional(),
|
|
25776
|
+
});
|
|
25777
|
+
const SourceNameRegExSpecifierSchema = z.looseObject({
|
|
25778
|
+
op: z.literal('REGEX'),
|
|
25779
|
+
pattern: z.string().optional(),
|
|
25780
|
+
ignoreCase: z.boolean().optional(),
|
|
25781
|
+
});
|
|
25782
|
+
const SourceNamePartOperatorSpecifierSchema = z.looseObject({
|
|
25783
|
+
op: z.literal('PART'),
|
|
25784
|
+
operator: OperatorSchema.optional(),
|
|
25785
|
+
part: z.number(),
|
|
25786
|
+
partValue: z.string().optional(),
|
|
25787
|
+
});
|
|
25788
|
+
const SourceNameSpecifierSchema = z.discriminatedUnion('op', [
|
|
25789
|
+
SourceNameAllSpecifierSchema,
|
|
25790
|
+
SourceNameNoneSpecifierSchema,
|
|
25791
|
+
SourceNameAndSpecifierSchema,
|
|
25792
|
+
SourceNameOrSpecifierSchema,
|
|
25793
|
+
SourceNameNotSpecifierSchema,
|
|
25794
|
+
SourceNameExactSpecifierSchema,
|
|
25795
|
+
SourceNameRegExSpecifierSchema,
|
|
25796
|
+
SourceNamePartOperatorSpecifierSchema,
|
|
25797
|
+
]);
|
|
25798
|
+
|
|
25799
|
+
const FolderNameAllSpecifierSchema = z.looseObject({
|
|
25800
|
+
op: z.literal('ALL'),
|
|
25801
|
+
});
|
|
25802
|
+
const FolderNameNoneSpecifierSchema = z.looseObject({
|
|
25803
|
+
op: z.literal('NONE'),
|
|
25804
|
+
});
|
|
25805
|
+
const FolderNameAndSpecifierSchema = z.looseObject({
|
|
25806
|
+
op: z.literal('AND'),
|
|
25807
|
+
specifiers: z.array(z.lazy(() => FolderNameSpecifierSchema)),
|
|
25808
|
+
});
|
|
25809
|
+
const FolderNameOrSpecifierSchema = z.looseObject({
|
|
25810
|
+
op: z.literal('OR'),
|
|
25811
|
+
specifiers: z.array(z.lazy(() => FolderNameSpecifierSchema)),
|
|
25812
|
+
});
|
|
25813
|
+
const FolderNameNotSpecifierSchema = z.looseObject({
|
|
25814
|
+
op: z.literal('NOT'),
|
|
25815
|
+
specifier: z.lazy(() => FolderNameSpecifierSchema),
|
|
25816
|
+
});
|
|
25817
|
+
const FolderNameExactSpecifierSchema = z.looseObject({
|
|
25818
|
+
op: z.literal('EXACT'),
|
|
25819
|
+
names: z.array(z.string()).optional(),
|
|
25820
|
+
ignoreCase: z.boolean().optional(),
|
|
25821
|
+
});
|
|
25822
|
+
const FolderNameRegExSpecifierSchema = z.looseObject({
|
|
25823
|
+
op: z.literal('REGEX'),
|
|
25824
|
+
pattern: z.string().optional(),
|
|
25825
|
+
ignoreCase: z.boolean().optional(),
|
|
25826
|
+
});
|
|
25827
|
+
const FolderNameChildrenSpecifierSchema = z.looseObject({
|
|
25828
|
+
op: z.literal('CHILDREN'),
|
|
25829
|
+
prefix: z.string().optional(),
|
|
25830
|
+
recursive: z.boolean().optional(),
|
|
25831
|
+
});
|
|
25832
|
+
const FolderNameSpecifierSchema = z.discriminatedUnion('op', [
|
|
25833
|
+
FolderNameAllSpecifierSchema,
|
|
25834
|
+
FolderNameNoneSpecifierSchema,
|
|
25835
|
+
FolderNameAndSpecifierSchema,
|
|
25836
|
+
FolderNameOrSpecifierSchema,
|
|
25837
|
+
FolderNameNotSpecifierSchema,
|
|
25838
|
+
FolderNameExactSpecifierSchema,
|
|
25839
|
+
FolderNameRegExSpecifierSchema,
|
|
25840
|
+
FolderNameChildrenSpecifierSchema,
|
|
25841
|
+
]);
|
|
25842
|
+
|
|
25843
|
+
const QueryAttributeExpressionSchema = z.looseObject({
|
|
25844
|
+
name: z.string().optional(),
|
|
25845
|
+
values: z.array(z.string()).optional(),
|
|
25846
|
+
operator: z.enum(['IN', 'NOT_IN', 'MATCHES', 'NOT_MATCHES', 'GE', 'GT', 'LE', 'LT']).optional(),
|
|
25847
|
+
comparator: z.enum(['LEXICAL', 'NUMBER', 'DATETIME']).optional(),
|
|
25848
|
+
caseInsensitive: z.boolean().optional(),
|
|
25849
|
+
});
|
|
25850
|
+
const AttributeNameAllSpecifierSchema = z.looseObject({
|
|
25851
|
+
op: z.literal('ALL'),
|
|
25852
|
+
});
|
|
25853
|
+
const AttributeNameNoneSpecifierSchema = z.looseObject({
|
|
25854
|
+
op: z.literal('NONE'),
|
|
25855
|
+
});
|
|
25856
|
+
const AttributeNameAndSpecifierSchema = z.looseObject({
|
|
25857
|
+
op: z.literal('AND'),
|
|
25858
|
+
specifiers: z.array(z.lazy(() => AttributeNameSpecifierSchema)),
|
|
25859
|
+
});
|
|
25860
|
+
const AttributeNameOrSpecifierSchema = z.looseObject({
|
|
25861
|
+
op: z.literal('OR'),
|
|
25862
|
+
specifiers: z.array(z.lazy(() => AttributeNameSpecifierSchema)),
|
|
25863
|
+
});
|
|
25864
|
+
const AttributeNameNotSpecifierSchema = z.looseObject({
|
|
25865
|
+
op: z.literal('NOT'),
|
|
25866
|
+
specifier: z.lazy(() => AttributeNameSpecifierSchema),
|
|
25867
|
+
});
|
|
25868
|
+
const AttributeNameExactSpecifierSchema = z.looseObject({
|
|
25869
|
+
op: z.literal('EXACT'),
|
|
25870
|
+
names: z.array(z.string()).optional(),
|
|
25871
|
+
type: z.number().optional(),
|
|
25872
|
+
ignoreCase: z.boolean().optional(),
|
|
25873
|
+
});
|
|
25874
|
+
const AttributeNameRegExSpecifierSchema = z.looseObject({
|
|
25875
|
+
op: z.literal('REGEX'),
|
|
25876
|
+
pattern: z.string().optional(),
|
|
25877
|
+
ignoreCase: z.boolean().optional(),
|
|
25878
|
+
});
|
|
25879
|
+
const AttributeNameFolderSpecifierSchema = z.looseObject({
|
|
25880
|
+
op: z.literal('FOLDER'),
|
|
25881
|
+
specifier: FolderNameSpecifierSchema.optional(),
|
|
25882
|
+
});
|
|
25883
|
+
const AttributeNameChildrenSpecifierSchema = z.looseObject({
|
|
25884
|
+
op: z.literal('CHILDREN'),
|
|
25885
|
+
prefix: z.string().optional(),
|
|
25886
|
+
recursive: z.boolean().optional(),
|
|
25887
|
+
});
|
|
25888
|
+
const AttributeNameTypeSpecifierSchema = z.looseObject({
|
|
25889
|
+
op: z.literal('TYPE'),
|
|
25890
|
+
specifier: z.lazy(() => AttributeNameSpecifierSchema).optional(),
|
|
25891
|
+
bitMask: z.number().optional(),
|
|
25892
|
+
bitMatch: z.number().optional(),
|
|
25893
|
+
operator: OperatorSchema.optional(),
|
|
25894
|
+
});
|
|
25895
|
+
const AttributeNameOperatorSpecifierSchema = z.looseObject({
|
|
25896
|
+
op: z.literal('OPERATOR'),
|
|
25897
|
+
name: z.string().optional(),
|
|
25898
|
+
fullPath: z.boolean().optional(),
|
|
25899
|
+
operator: OperatorSchema.optional(),
|
|
25900
|
+
});
|
|
25901
|
+
const AttributeNameAnyNumericSpecifierSchema = z.looseObject({
|
|
25902
|
+
op: z.literal('NUMERIC'),
|
|
25903
|
+
});
|
|
25904
|
+
const AttributeNameAttributeSpecifierSchema = z.looseObject({
|
|
25905
|
+
op: z.literal('ATTRIBUTE'),
|
|
25906
|
+
expressions: z.array(QueryAttributeExpressionSchema).optional(),
|
|
25907
|
+
});
|
|
25908
|
+
const AttributeNameSpecifierSchema = z.discriminatedUnion('op', [
|
|
25909
|
+
AttributeNameAllSpecifierSchema,
|
|
25910
|
+
AttributeNameNoneSpecifierSchema,
|
|
25911
|
+
AttributeNameAndSpecifierSchema,
|
|
25912
|
+
AttributeNameOrSpecifierSchema,
|
|
25913
|
+
AttributeNameNotSpecifierSchema,
|
|
25914
|
+
AttributeNameExactSpecifierSchema,
|
|
25915
|
+
AttributeNameRegExSpecifierSchema,
|
|
25916
|
+
AttributeNameFolderSpecifierSchema,
|
|
25917
|
+
AttributeNameChildrenSpecifierSchema,
|
|
25918
|
+
AttributeNameTypeSpecifierSchema,
|
|
25919
|
+
AttributeNameOperatorSpecifierSchema,
|
|
25920
|
+
AttributeNameAnyNumericSpecifierSchema,
|
|
25921
|
+
AttributeNameAttributeSpecifierSchema,
|
|
25922
|
+
]);
|
|
25923
|
+
|
|
25924
|
+
const ManagementModuleIdSchema = z.looseObject({
|
|
25925
|
+
name: z.string().optional(),
|
|
25926
|
+
});
|
|
25927
|
+
const QueryAllSpecifierSchema = z.looseObject({
|
|
25928
|
+
op: z.literal('ALL'),
|
|
25929
|
+
includeFolders: z.boolean().optional(),
|
|
25930
|
+
includeMetrics: z.boolean().optional(),
|
|
25931
|
+
});
|
|
25932
|
+
const QueryNoneSpecifierSchema = z.looseObject({
|
|
25933
|
+
op: z.literal('NONE'),
|
|
25934
|
+
});
|
|
25935
|
+
const QueryAndSpecifierSchema = z.looseObject({
|
|
25936
|
+
op: z.literal('AND'),
|
|
25937
|
+
specifiers: z.array(z.lazy(() => QuerySpecifierSchema)),
|
|
25938
|
+
});
|
|
25939
|
+
const QueryOrSpecifierSchema = z.looseObject({
|
|
25940
|
+
op: z.literal('OR'),
|
|
25941
|
+
specifiers: z.array(z.lazy(() => QuerySpecifierSchema)),
|
|
25942
|
+
});
|
|
25943
|
+
const QueryNotSpecifierSchema = z.looseObject({
|
|
25944
|
+
op: z.literal('NOT'),
|
|
25945
|
+
specifier: z.lazy(() => QuerySpecifierSchema),
|
|
25946
|
+
});
|
|
25947
|
+
const QuerySpecSpecifierSchema = z.looseObject({
|
|
25948
|
+
op: z.literal('SPEC'),
|
|
25949
|
+
sourceNameSpecifier: SourceNameSpecifierSchema.optional(),
|
|
25950
|
+
folderNameSpecifier: FolderNameSpecifierSchema.optional(),
|
|
25951
|
+
attributeNameSpecifier: AttributeNameSpecifierSchema.optional(),
|
|
25952
|
+
});
|
|
25953
|
+
const QueryIdSpecifierSchema = z.looseObject({
|
|
25954
|
+
op: z.literal('ID'),
|
|
25955
|
+
ids: z.array(z.string()).optional(),
|
|
25956
|
+
});
|
|
25957
|
+
const QueryAttributeSpecifierSchema = z.looseObject({
|
|
25958
|
+
op: z.literal('ATTRIBUTE'),
|
|
25959
|
+
expressions: z.array(QueryAttributeExpressionSchema).optional(),
|
|
25960
|
+
});
|
|
25961
|
+
const QueryMetricGroupSpecifierSchema = z.looseObject({
|
|
25962
|
+
op: z.literal('GROUP'),
|
|
25963
|
+
id: z.string().optional(),
|
|
25964
|
+
managementModuleId: ManagementModuleIdSchema.optional(),
|
|
25965
|
+
});
|
|
25966
|
+
const ServiceFilterSpecifierSchema = z.looseObject({
|
|
25967
|
+
op: z.literal('SERVICE'),
|
|
25968
|
+
values: z.array(z.string()).optional(),
|
|
25969
|
+
});
|
|
25970
|
+
const QuerySpecifierSchema = z.discriminatedUnion('op', [
|
|
25971
|
+
QueryAllSpecifierSchema,
|
|
25972
|
+
QueryNoneSpecifierSchema,
|
|
25973
|
+
QueryAndSpecifierSchema,
|
|
25974
|
+
QueryOrSpecifierSchema,
|
|
25975
|
+
QueryNotSpecifierSchema,
|
|
25976
|
+
QuerySpecSpecifierSchema,
|
|
25977
|
+
QueryIdSpecifierSchema,
|
|
25978
|
+
QueryAttributeSpecifierSchema,
|
|
25979
|
+
QueryMetricGroupSpecifierSchema,
|
|
25980
|
+
ServiceFilterSpecifierSchema,
|
|
25981
|
+
]);
|
|
25982
|
+
|
|
25983
|
+
const QueryHintForceRangeSchema = z.looseObject({
|
|
25984
|
+
hint: z.literal('ForceRange'),
|
|
25985
|
+
});
|
|
25986
|
+
const QueryHintSchema = z.discriminatedUnion('hint', [
|
|
25987
|
+
QueryHintForceRangeSchema,
|
|
25988
|
+
]);
|
|
25989
|
+
const MetadataMetricQuerySchema = z.looseObject({
|
|
25990
|
+
specifier: QuerySpecifierSchema.optional(),
|
|
25991
|
+
clamp: z.number().optional(),
|
|
25992
|
+
time: z.number().optional(),
|
|
25993
|
+
range: z.number().optional(),
|
|
25994
|
+
includeLive: z.boolean().optional(),
|
|
25995
|
+
authorizationView: z.string().optional(),
|
|
25996
|
+
includeProfile: z.boolean().optional(),
|
|
25997
|
+
profileLevel: z.string().optional(),
|
|
25998
|
+
queryHints: z.array(QueryHintSchema).optional(),
|
|
25999
|
+
});
|
|
26000
|
+
|
|
26001
|
+
const MetricAttributeSchema = z.looseObject({
|
|
26002
|
+
id: z.string().optional(),
|
|
26003
|
+
sourceName: z.string().optional(),
|
|
26004
|
+
type: z.number(),
|
|
26005
|
+
attributeName: z.string().optional(),
|
|
26006
|
+
attributes: z.record(z.string(), z.unknown()).optional(),
|
|
26007
|
+
firstSeen: z.number().optional(),
|
|
26008
|
+
lastSeen: z.number().optional(),
|
|
26009
|
+
live: z.boolean().optional(),
|
|
26010
|
+
});
|
|
26011
|
+
const MetricFolderSchema = z.looseObject({
|
|
26012
|
+
sourceId: z.string().optional(),
|
|
26013
|
+
sourceName: z.string().optional(),
|
|
26014
|
+
folderName: z.string().optional(),
|
|
26015
|
+
firstSeen: z.number().optional(),
|
|
26016
|
+
lastSeen: z.number().optional(),
|
|
26017
|
+
live: z.boolean().optional(),
|
|
26018
|
+
});
|
|
26019
|
+
const MetadataMetricQueryResponseV2Schema = z.looseObject({
|
|
26020
|
+
metrics: z.array(MetricAttributeSchema).optional(),
|
|
26021
|
+
folders: z.array(MetricFolderSchema).optional(),
|
|
26022
|
+
analytics: z.record(z.string(), z.unknown()).optional(),
|
|
26023
|
+
});
|
|
26024
|
+
|
|
26025
|
+
const NumericOperatorSchema = z.enum(['EQ', 'LT', 'LE', 'GT', 'GE', 'NE']);
|
|
26026
|
+
const QueryFilterAndSpecSchema = z.looseObject({
|
|
26027
|
+
op: z.literal('AND'),
|
|
26028
|
+
spec: z.lazy(() => z.array(QueryFilterPredicateSpecSchema)),
|
|
26029
|
+
});
|
|
26030
|
+
const QueryFilterOrSpecSchema = z.looseObject({
|
|
26031
|
+
op: z.literal('OR'),
|
|
26032
|
+
spec: z.lazy(() => z.array(QueryFilterPredicateSpecSchema)),
|
|
26033
|
+
});
|
|
26034
|
+
const QueryFilterNotSpecSchema = z.looseObject({
|
|
26035
|
+
op: z.literal('NOT'),
|
|
26036
|
+
spec: z.lazy(() => QueryFilterPredicateSpecSchema),
|
|
26037
|
+
});
|
|
26038
|
+
const QueryFilterExprSpecSchema = z.looseObject({
|
|
26039
|
+
op: z.literal('EXPR'),
|
|
26040
|
+
spec: z.string(),
|
|
26041
|
+
});
|
|
26042
|
+
const QueryFilterInSpecSchema = z.looseObject({
|
|
26043
|
+
op: z.literal('IN'),
|
|
26044
|
+
column: z.string(),
|
|
26045
|
+
values: z.array(z.unknown()),
|
|
26046
|
+
});
|
|
26047
|
+
const QueryFilterRegexSpecSchema = z.looseObject({
|
|
26048
|
+
op: z.literal('REGEX'),
|
|
26049
|
+
column: z.string(),
|
|
26050
|
+
pattern: z.string(),
|
|
26051
|
+
ignoreCase: z.boolean(),
|
|
26052
|
+
});
|
|
26053
|
+
const QueryFilterNumericSpecSchema = z.looseObject({
|
|
26054
|
+
op: z.literal('NUMERIC'),
|
|
26055
|
+
column: z.string(),
|
|
26056
|
+
operator: NumericOperatorSchema,
|
|
26057
|
+
value: z.number().optional(),
|
|
26058
|
+
});
|
|
26059
|
+
const QueryFilterPredicateSpecSchema = z.union([
|
|
26060
|
+
QueryFilterAndSpecSchema,
|
|
26061
|
+
QueryFilterOrSpecSchema,
|
|
26062
|
+
QueryFilterNotSpecSchema,
|
|
26063
|
+
QueryFilterExprSpecSchema,
|
|
26064
|
+
QueryFilterInSpecSchema,
|
|
26065
|
+
QueryFilterRegexSpecSchema,
|
|
26066
|
+
QueryFilterNumericSpecSchema,
|
|
26067
|
+
]);
|
|
26068
|
+
|
|
26069
|
+
const QueryRangeSpecSchema = z.looseObject({
|
|
26070
|
+
endTime: z.number(),
|
|
26071
|
+
rangeSize: z.number(),
|
|
26072
|
+
frequency: z.number(),
|
|
26073
|
+
});
|
|
26074
|
+
const QueryMetricIdSchema = z.looseObject({
|
|
26075
|
+
metrics: z.array(z.string()),
|
|
26076
|
+
});
|
|
26077
|
+
const JoinTypeSchema = z.enum(['INNER_JOIN', 'LEFT_OUTER_JOIN']);
|
|
26078
|
+
const FillModeSchema = z.enum(['MARK', 'INNER', 'ALL']);
|
|
26079
|
+
const AlignmentSchema = z.enum(['ABSOLUTE', 'LEFT', 'RIGHT']);
|
|
26080
|
+
const CalendarIntervalSchema = z.enum([
|
|
26081
|
+
'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR',
|
|
26082
|
+
]);
|
|
26083
|
+
const QuantileMethodSchema = z.enum(['EXACT_INTERPOLATION', 'EXACT_SELECTOR']);
|
|
26084
|
+
const NassValueTypeSchema = z.enum(['DOUBLE', 'LONG', 'STRING']);
|
|
26085
|
+
const QueryColumnTypeSpecSchema = z.enum(['LONG', 'DOUBLE', 'STRING']);
|
|
26086
|
+
const aggregationFields = {
|
|
26087
|
+
fillGaps: z.boolean().optional(),
|
|
26088
|
+
fillValue: z.union([z.string(), z.number(), z.boolean(), z.null()]).optional(),
|
|
26089
|
+
fillMode: FillModeSchema.optional(),
|
|
26090
|
+
};
|
|
26091
|
+
const OrderItemSchema = z.looseObject({
|
|
26092
|
+
column: z.string(),
|
|
26093
|
+
sortDescending: z.boolean(),
|
|
26094
|
+
});
|
|
26095
|
+
const QueryFromSpecSchema = z.looseObject({
|
|
26096
|
+
op: z.literal('FROM'),
|
|
26097
|
+
querySpecifier: QuerySpecifierSchema,
|
|
26098
|
+
queryRange: QueryRangeSpecSchema.optional(),
|
|
26099
|
+
queryHints: z.array(QueryHintSchema).optional(),
|
|
26100
|
+
alias: z.string().optional(),
|
|
26101
|
+
clampSize: z.number().optional(),
|
|
26102
|
+
rowsClampSize: z.number().optional(),
|
|
26103
|
+
metadataOnly: z.boolean().optional(),
|
|
26104
|
+
});
|
|
26105
|
+
const QueryFromTableSpecSchema = z.looseObject({
|
|
26106
|
+
op: z.literal('FROM_TABLE'),
|
|
26107
|
+
tableName: z.string(),
|
|
26108
|
+
alias: z.string().optional(),
|
|
26109
|
+
limit: z.number().optional(),
|
|
26110
|
+
lowerBoundKey: z.array(z.unknown()).optional(),
|
|
26111
|
+
upperBoundKey: z.array(z.unknown()).optional(),
|
|
26112
|
+
});
|
|
26113
|
+
const QueryShowTablesSpecSchema = z.looseObject({
|
|
26114
|
+
op: z.literal('SHOW_TABLES'),
|
|
26115
|
+
});
|
|
26116
|
+
const QueryWindowSpecSchema = z.looseObject({
|
|
26117
|
+
op: z.literal('WINDOW'),
|
|
26118
|
+
every: z.number(),
|
|
26119
|
+
align: AlignmentSchema.optional(),
|
|
26120
|
+
incomplete: z.boolean().optional(),
|
|
26121
|
+
useFrequency: z.boolean().optional(),
|
|
26122
|
+
});
|
|
26123
|
+
const QueryCalendarWindowSpecSchema = z.looseObject({
|
|
26124
|
+
op: z.literal('WINDOW_CALENDAR'),
|
|
26125
|
+
calendarInterval: CalendarIntervalSchema,
|
|
26126
|
+
timeZone: z.string().optional(),
|
|
26127
|
+
});
|
|
26128
|
+
const QueryGroupSpecSchema = z.looseObject({
|
|
26129
|
+
op: z.literal('GROUP'),
|
|
26130
|
+
columns: z.array(z.string()),
|
|
26131
|
+
});
|
|
26132
|
+
const QueryOrderSpecSchema = z.looseObject({
|
|
26133
|
+
op: z.literal('ORDER'),
|
|
26134
|
+
columns: z.array(OrderItemSchema),
|
|
26135
|
+
topN: z.number().optional(),
|
|
26136
|
+
});
|
|
26137
|
+
const QueryKeepSpecSchema = z.looseObject({
|
|
26138
|
+
op: z.literal('KEEP'),
|
|
26139
|
+
columns: z.array(z.string()),
|
|
26140
|
+
as: z.array(z.string()).optional(),
|
|
26141
|
+
});
|
|
26142
|
+
const QueryCountSpecSchema = z.looseObject({
|
|
26143
|
+
op: z.literal('COUNT'),
|
|
26144
|
+
...aggregationFields,
|
|
26145
|
+
column: z.string().optional(),
|
|
26146
|
+
as: z.string().optional(),
|
|
26147
|
+
});
|
|
26148
|
+
const QuerySumSpecSchema = z.looseObject({
|
|
26149
|
+
op: z.literal('SUM'),
|
|
26150
|
+
...aggregationFields,
|
|
26151
|
+
column: z.string(),
|
|
26152
|
+
as: z.string().optional(),
|
|
26153
|
+
});
|
|
26154
|
+
const QueryMinSpecSchema = z.looseObject({
|
|
26155
|
+
op: z.literal('MIN'),
|
|
26156
|
+
...aggregationFields,
|
|
26157
|
+
column: z.string(),
|
|
26158
|
+
as: z.string().optional(),
|
|
26159
|
+
});
|
|
26160
|
+
const QueryMaxSpecSchema = z.looseObject({
|
|
26161
|
+
op: z.literal('MAX'),
|
|
26162
|
+
...aggregationFields,
|
|
26163
|
+
column: z.string(),
|
|
26164
|
+
as: z.string().optional(),
|
|
26165
|
+
});
|
|
26166
|
+
const QueryMeanSpecSchema = z.looseObject({
|
|
26167
|
+
op: z.literal('MEAN'),
|
|
26168
|
+
...aggregationFields,
|
|
26169
|
+
column: z.string(),
|
|
26170
|
+
as: z.string().optional(),
|
|
26171
|
+
weightColumn: z.string().optional(),
|
|
26172
|
+
});
|
|
26173
|
+
const QueryMultiAggregationSpecSchema = z.looseObject({
|
|
26174
|
+
op: z.literal('AGG'),
|
|
26175
|
+
...aggregationFields,
|
|
26176
|
+
spec: z.array(z.looseObject({
|
|
26177
|
+
...aggregationFields,
|
|
26178
|
+
op: z.string().optional(),
|
|
26179
|
+
column: z.string().optional(),
|
|
26180
|
+
as: z.string().optional(),
|
|
26181
|
+
fromAlias: z.string().optional(),
|
|
26182
|
+
weightColumn: z.string().optional(),
|
|
26183
|
+
orderSrc: z.string().optional(),
|
|
26184
|
+
index: z.number().optional(),
|
|
26185
|
+
scale: z.number().optional(),
|
|
26186
|
+
method: QuantileMethodSchema.optional(),
|
|
26187
|
+
})),
|
|
26188
|
+
});
|
|
26189
|
+
const QueryNassAggregationSpecSchema = z.looseObject({
|
|
26190
|
+
op: z.literal('NASS_AGG'),
|
|
26191
|
+
...aggregationFields,
|
|
26192
|
+
fromAlias: z.string().optional(),
|
|
26193
|
+
as: z.string().optional(),
|
|
26194
|
+
});
|
|
26195
|
+
const QueryDerivativeSpecSchema = z.looseObject({
|
|
26196
|
+
op: z.literal('DERIVATIVE'),
|
|
26197
|
+
column: z.string(),
|
|
26198
|
+
unit: z.number().optional(),
|
|
26199
|
+
negative: z.boolean().optional(),
|
|
26200
|
+
as: z.string().optional(),
|
|
26201
|
+
timeSrc: z.string().optional(),
|
|
26202
|
+
});
|
|
26203
|
+
const QueryDifferenceSpecSchema = z.looseObject({
|
|
26204
|
+
op: z.literal('DIFFERENCE'),
|
|
26205
|
+
column: z.string(),
|
|
26206
|
+
negative: z.boolean().optional(),
|
|
26207
|
+
as: z.string().optional(),
|
|
26208
|
+
timeSrc: z.string().optional(),
|
|
26209
|
+
});
|
|
26210
|
+
const QueryFirstSpecSchema = z.looseObject({
|
|
26211
|
+
op: z.literal('FIRST'),
|
|
26212
|
+
...aggregationFields,
|
|
26213
|
+
column: z.string(),
|
|
26214
|
+
as: z.string().optional(),
|
|
26215
|
+
orderSrc: z.string().optional(),
|
|
26216
|
+
});
|
|
26217
|
+
const QueryLastSpecSchema = z.looseObject({
|
|
26218
|
+
op: z.literal('LAST'),
|
|
26219
|
+
...aggregationFields,
|
|
26220
|
+
column: z.string(),
|
|
26221
|
+
as: z.string().optional(),
|
|
26222
|
+
orderSrc: z.string().optional(),
|
|
26223
|
+
});
|
|
26224
|
+
const QueryQuantileSpecSchema = z.looseObject({
|
|
26225
|
+
op: z.literal('QUANTILE'),
|
|
26226
|
+
...aggregationFields,
|
|
26227
|
+
column: z.string(),
|
|
26228
|
+
as: z.string().optional(),
|
|
26229
|
+
method: QuantileMethodSchema.optional(),
|
|
26230
|
+
index: z.number(),
|
|
26231
|
+
scale: z.number().optional(),
|
|
26232
|
+
});
|
|
26233
|
+
const QueryDistinctSpecSchema = z.looseObject({
|
|
26234
|
+
op: z.literal('DISTINCT'),
|
|
26235
|
+
...aggregationFields,
|
|
26236
|
+
});
|
|
26237
|
+
const QueryDescribeSpecSchema = z.looseObject({
|
|
26238
|
+
op: z.literal('DESCRIBE'),
|
|
26239
|
+
});
|
|
26240
|
+
const QueryTopSpecSchema = z.looseObject({
|
|
26241
|
+
op: z.literal('TOP'),
|
|
26242
|
+
column: z.string(),
|
|
26243
|
+
n: z.number(),
|
|
26244
|
+
sortAscending: z.boolean().optional(),
|
|
26245
|
+
});
|
|
26246
|
+
const QueryBottomSpecSchema = z.looseObject({
|
|
26247
|
+
op: z.literal('BOTTOM'),
|
|
26248
|
+
column: z.string(),
|
|
26249
|
+
n: z.number(),
|
|
26250
|
+
sortAscending: z.boolean().optional(),
|
|
26251
|
+
});
|
|
26252
|
+
const QueryMapSpecSchema = z.looseObject({
|
|
26253
|
+
op: z.literal('MAP'),
|
|
26254
|
+
fn: z.string(),
|
|
26255
|
+
as: z.string(),
|
|
26256
|
+
});
|
|
26257
|
+
const QueryMapStringSpecSchema = z.looseObject({
|
|
26258
|
+
op: z.literal('MAP_STRING'),
|
|
26259
|
+
column: z.string(),
|
|
26260
|
+
pattern: z.string(),
|
|
26261
|
+
as: z.array(z.string()).optional(),
|
|
26262
|
+
asType: z.array(QueryColumnTypeSpecSchema).optional(),
|
|
26263
|
+
fillValues: z.array(z.string()).optional(),
|
|
26264
|
+
filterNotMatching: z.boolean().optional(),
|
|
26265
|
+
});
|
|
26266
|
+
const QueryNassMapSpecSchema = z.looseObject({
|
|
26267
|
+
op: z.literal('NASS_MAP'),
|
|
26268
|
+
type: NassValueTypeSchema.optional(),
|
|
26269
|
+
time: z.string().optional(),
|
|
26270
|
+
interval: z.unknown().optional(),
|
|
26271
|
+
min: z.unknown().optional(),
|
|
26272
|
+
max: z.unknown().optional(),
|
|
26273
|
+
value: z.string().optional(),
|
|
26274
|
+
count: z.unknown().optional(),
|
|
26275
|
+
frequency: z.number().optional(),
|
|
26276
|
+
});
|
|
26277
|
+
const QueryFilterSpecSchema = z.looseObject({
|
|
26278
|
+
op: z.literal('FILTER'),
|
|
26279
|
+
spec: QueryFilterPredicateSpecSchema,
|
|
26280
|
+
});
|
|
26281
|
+
const QueryFilterExprFnSpecSchema = z.looseObject({
|
|
26282
|
+
op: z.literal('FILTER_EXPR'),
|
|
26283
|
+
spec: z.string(),
|
|
26284
|
+
});
|
|
26285
|
+
const QueryJoinDataSpecSchema = z.looseObject({
|
|
26286
|
+
op: z.literal('JOIN_DATA'),
|
|
26287
|
+
queryRange: QueryRangeSpecSchema.optional(),
|
|
26288
|
+
metricIdColumn: z.string(),
|
|
26289
|
+
alias: z.string().optional(),
|
|
26290
|
+
joinFirstOnly: z.boolean().optional(),
|
|
26291
|
+
rowsClampSize: z.number().optional(),
|
|
26292
|
+
});
|
|
26293
|
+
const QueryFromMetadataSpecSchema = z.looseObject({
|
|
26294
|
+
op: z.literal('FROM_METADATA'),
|
|
26295
|
+
querySpecifier: QuerySpecifierSchema,
|
|
26296
|
+
queryRange: QueryRangeSpecSchema.optional(),
|
|
26297
|
+
queryHints: z.array(QueryHintSchema).optional(),
|
|
26298
|
+
alias: z.string().optional(),
|
|
26299
|
+
rowsClampSize: z.number().optional(),
|
|
26300
|
+
});
|
|
26301
|
+
const QueryFromTopologySpecSchema = z.looseObject({
|
|
26302
|
+
op: z.literal('FROM_TOPOLOGY'),
|
|
26303
|
+
querySpecifier: TasQuerySchema,
|
|
26304
|
+
alias: z.string().optional(),
|
|
26305
|
+
rowsClampSize: z.number().optional(),
|
|
26306
|
+
});
|
|
26307
|
+
const QueryFromDataSpecSchema = z.looseObject({
|
|
26308
|
+
op: z.literal('FROM_DATA'),
|
|
26309
|
+
querySpecifier: QueryMetricIdSchema,
|
|
26310
|
+
queryRange: QueryRangeSpecSchema.optional(),
|
|
26311
|
+
alias: z.string().optional(),
|
|
26312
|
+
});
|
|
26313
|
+
const QueryJoinMetadataSpecSchema = z.looseObject({
|
|
26314
|
+
op: z.literal('JOIN_METADATA'),
|
|
26315
|
+
querySpecifier: QuerySpecifierSchema.optional(),
|
|
26316
|
+
queryRange: QueryRangeSpecSchema.optional(),
|
|
26317
|
+
queryHints: z.array(QueryHintSchema).optional(),
|
|
26318
|
+
alias: z.string().optional(),
|
|
26319
|
+
rowsClampSize: z.number().optional(),
|
|
26320
|
+
externalIdColumn: z.string().optional(),
|
|
26321
|
+
joinType: JoinTypeSchema.optional(),
|
|
26322
|
+
});
|
|
26323
|
+
const QueryJoinTopologySpecSchema = z.looseObject({
|
|
26324
|
+
op: z.literal('JOIN_TOPOLOGY'),
|
|
26325
|
+
rowsClampSize: z.number().optional(),
|
|
26326
|
+
externalIdColumn: z.string().optional(),
|
|
26327
|
+
joinType: JoinTypeSchema.optional(),
|
|
26328
|
+
});
|
|
26329
|
+
const QueryFormatTimeSpecSchema = z.looseObject({
|
|
26330
|
+
op: z.literal('FORMAT_TIME'),
|
|
26331
|
+
column: z.string(),
|
|
26332
|
+
as: z.string().optional(),
|
|
26333
|
+
duration: z.boolean().optional(),
|
|
26334
|
+
pattern: z.string().optional(),
|
|
26335
|
+
timezone: z.string().optional(),
|
|
26336
|
+
});
|
|
26337
|
+
const QueryFormatSpecSchema = z.looseObject({
|
|
26338
|
+
op: z.literal('FORMAT'),
|
|
26339
|
+
format: z.string(),
|
|
26340
|
+
columns: z.array(z.string()).optional(),
|
|
26341
|
+
as: z.string().optional(),
|
|
26342
|
+
languageTag: z.string().optional(),
|
|
26343
|
+
fillFormatError: z.boolean().optional(),
|
|
26344
|
+
fillValue: z.string().optional(),
|
|
26345
|
+
});
|
|
26346
|
+
const QueryLogSpecSchema = z.looseObject({
|
|
26347
|
+
op: z.literal('LOG'),
|
|
26348
|
+
name: z.string().optional(),
|
|
26349
|
+
limit: z.number().optional(),
|
|
26350
|
+
countRecords: z.boolean().optional(),
|
|
26351
|
+
excludeFinalResult: z.boolean().optional(),
|
|
26352
|
+
});
|
|
26353
|
+
const QueryScriptSpecSchema = z.looseObject({
|
|
26354
|
+
op: z.literal('SCRIPT'),
|
|
26355
|
+
script: z.string(),
|
|
26356
|
+
inputColumns: z.array(z.string()).optional(),
|
|
26357
|
+
outputColumns: z.array(z.string()).optional(),
|
|
26358
|
+
});
|
|
26359
|
+
const QueryFunctionSpecSchema = z.discriminatedUnion('op', [
|
|
26360
|
+
QueryFromSpecSchema,
|
|
26361
|
+
QueryFromTableSpecSchema,
|
|
26362
|
+
QueryShowTablesSpecSchema,
|
|
26363
|
+
QueryWindowSpecSchema,
|
|
26364
|
+
QueryCalendarWindowSpecSchema,
|
|
26365
|
+
QueryGroupSpecSchema,
|
|
26366
|
+
QueryOrderSpecSchema,
|
|
26367
|
+
QueryKeepSpecSchema,
|
|
26368
|
+
QueryCountSpecSchema,
|
|
26369
|
+
QuerySumSpecSchema,
|
|
26370
|
+
QueryMinSpecSchema,
|
|
26371
|
+
QueryMaxSpecSchema,
|
|
26372
|
+
QueryMeanSpecSchema,
|
|
26373
|
+
QueryMultiAggregationSpecSchema,
|
|
26374
|
+
QueryDerivativeSpecSchema,
|
|
26375
|
+
QueryDifferenceSpecSchema,
|
|
26376
|
+
QueryFirstSpecSchema,
|
|
26377
|
+
QueryLastSpecSchema,
|
|
26378
|
+
QueryQuantileSpecSchema,
|
|
26379
|
+
QueryDistinctSpecSchema,
|
|
26380
|
+
QueryDescribeSpecSchema,
|
|
26381
|
+
QueryTopSpecSchema,
|
|
26382
|
+
QueryBottomSpecSchema,
|
|
26383
|
+
QueryNassAggregationSpecSchema,
|
|
26384
|
+
QueryFilterSpecSchema,
|
|
26385
|
+
QueryFilterExprFnSpecSchema,
|
|
26386
|
+
QueryJoinDataSpecSchema,
|
|
26387
|
+
QueryFormatTimeSpecSchema,
|
|
26388
|
+
QueryFromMetadataSpecSchema,
|
|
26389
|
+
QueryFromTopologySpecSchema,
|
|
26390
|
+
QueryFromDataSpecSchema,
|
|
26391
|
+
QueryJoinMetadataSpecSchema,
|
|
26392
|
+
QueryJoinTopologySpecSchema,
|
|
26393
|
+
QueryLogSpecSchema,
|
|
26394
|
+
QueryNassMapSpecSchema,
|
|
26395
|
+
QueryMapStringSpecSchema,
|
|
26396
|
+
QueryMapSpecSchema,
|
|
26397
|
+
QueryFormatSpecSchema,
|
|
26398
|
+
QueryScriptSpecSchema,
|
|
26399
|
+
]);
|
|
26400
|
+
|
|
26401
|
+
const QueryRequestSchema = z.looseObject({
|
|
26402
|
+
query: z.array(QueryFunctionSpecSchema),
|
|
26403
|
+
authorizationView: z.string().optional(),
|
|
26404
|
+
limit: z.number().optional(),
|
|
26405
|
+
});
|
|
26406
|
+
|
|
26407
|
+
const QueryResultSchema = z.array(z.unknown());
|
|
26408
|
+
|
|
25332
26409
|
var DXChannel;
|
|
25333
26410
|
(function (DXChannel) {
|
|
26411
|
+
/** @internal */
|
|
25334
26412
|
DXChannel.DX_CHANNEL_RESPONSE_EXAMPLE_WEBHOOK = {
|
|
25335
26413
|
id: 32498,
|
|
25336
26414
|
orgId: 'ITOM-DX-DEMO-PROD',
|
|
@@ -25543,6 +26621,7 @@ var DXChannel;
|
|
|
25543
26621
|
],
|
|
25544
26622
|
enableProxy: false,
|
|
25545
26623
|
};
|
|
26624
|
+
/** @internal */
|
|
25546
26625
|
DXChannel.DX_CHANNEL_RESPONSE_EXAMPLE_SMTP = {
|
|
25547
26626
|
id: 32393,
|
|
25548
26627
|
orgId: 'ITOM-DX-DEMO-PROD',
|
|
@@ -25596,6 +26675,7 @@ var DXChannel;
|
|
|
25596
26675
|
],
|
|
25597
26676
|
enableProxy: false,
|
|
25598
26677
|
};
|
|
26678
|
+
/** @internal */
|
|
25599
26679
|
DXChannel.DX_CHANNEL_RESPONSE_EXAMPLE_ITSM = {
|
|
25600
26680
|
id: 32182,
|
|
25601
26681
|
orgId: 'ITOM-DX-DEMO-PROD',
|
|
@@ -40717,6 +41797,7 @@ var OIAlarm;
|
|
|
40717
41797
|
|
|
40718
41798
|
var OIService;
|
|
40719
41799
|
(function (OIService) {
|
|
41800
|
+
/** @internal */
|
|
40720
41801
|
OIService.DEFAULT_SERVICE_INVENTORY_FILTER = {
|
|
40721
41802
|
"and": {
|
|
40722
41803
|
"expressions": [{
|
|
@@ -40731,6 +41812,7 @@ var OIService;
|
|
|
40731
41812
|
}],
|
|
40732
41813
|
},
|
|
40733
41814
|
};
|
|
41815
|
+
/** @internal */
|
|
40734
41816
|
OIService.DEFAULT_SERVICE_INVENTORY_REQUEST_BODY = {
|
|
40735
41817
|
"pageSize": 1000,
|
|
40736
41818
|
"customFilter": OIService.DEFAULT_SERVICE_INVENTORY_FILTER,
|
|
@@ -40740,6 +41822,7 @@ var OIService;
|
|
|
40740
41822
|
"projectionFields": ["product", "name", "ipAddresses", "serviceNames", "type", "maintenance"],
|
|
40741
41823
|
"groupByField": "type",
|
|
40742
41824
|
};
|
|
41825
|
+
/** @internal */
|
|
40743
41826
|
OIService.SAMPLE_SERVICE_INVENTORY_RESPONSE = {
|
|
40744
41827
|
"totalCount": 11,
|
|
40745
41828
|
"pageSize": 100,
|
|
@@ -40948,6 +42031,7 @@ var OIService;
|
|
|
40948
42031
|
OIService.TYPICAL_SERVICE_REQUEST_PROJECTION_FILTER = ["rollupFilteredAlarmCount", "situationCount", "availability", "filteredParent", "availability_lastday",
|
|
40949
42032
|
"immediateFilteredChildren", "immediateFilterChildrenCount", "health", "extId", "location", "maintenance",
|
|
40950
42033
|
"name", "risk", "status", "tags", "serviceMetricGroups", "healthBucket"];
|
|
42034
|
+
/** @internal */
|
|
40951
42035
|
OIService.DEFAULT_SERVICE_REQUEST_BODY = {
|
|
40952
42036
|
"time": DateTime.now().toMillis(),
|
|
40953
42037
|
"filters": [],
|
|
@@ -40959,6 +42043,7 @@ var OIService;
|
|
|
40959
42043
|
"projectionFilter": OIService.DEFAULT_SERVICE_REQUEST_PROJECTION_FILTER,
|
|
40960
42044
|
"showAlarms": true,
|
|
40961
42045
|
};
|
|
42046
|
+
/** @internal */
|
|
40962
42047
|
OIService.PARENT_SERVICE_REQUEST_BODY = {
|
|
40963
42048
|
"time": DateTime.now().toMillis(),
|
|
40964
42049
|
"filters": [],
|
|
@@ -40970,6 +42055,7 @@ var OIService;
|
|
|
40970
42055
|
"projectionFilter": OIService.TYPICAL_SERVICE_REQUEST_PROJECTION_FILTER,
|
|
40971
42056
|
"showSituations": true,
|
|
40972
42057
|
};
|
|
42058
|
+
/** @internal */
|
|
40973
42059
|
OIService.sampleServices = {
|
|
40974
42060
|
"services": [{
|
|
40975
42061
|
"name": "ACME NetOps Salisbury DC - NetOps-O2",
|
|
@@ -41180,6 +42266,7 @@ var OIService;
|
|
|
41180
42266
|
};
|
|
41181
42267
|
})(OIService || (OIService = {}));
|
|
41182
42268
|
|
|
42269
|
+
/** @internal */
|
|
41183
42270
|
function createPostmanRequest(request) {
|
|
41184
42271
|
function createPostmanHeaders(request) {
|
|
41185
42272
|
const headersToReturn = new Array();
|
|
@@ -41285,6 +42372,7 @@ class SimpleHTTPError extends Error {
|
|
|
41285
42372
|
}
|
|
41286
42373
|
}
|
|
41287
42374
|
|
|
42375
|
+
/** @internal */
|
|
41288
42376
|
const sampleServiceDetailRequestBody = {
|
|
41289
42377
|
timeFrom: 1772843076673,
|
|
41290
42378
|
timeTo: 1772929476673,
|
|
@@ -41293,6 +42381,7 @@ const sampleServiceDetailRequestBody = {
|
|
|
41293
42381
|
userTimeZone: 'America/Los_Angeles',
|
|
41294
42382
|
metrics: ['x6d-CE-H9B-1nQf0I0B', 'd_b-AE-H9B-3azifJ0B'],
|
|
41295
42383
|
};
|
|
42384
|
+
/** @internal */
|
|
41296
42385
|
const serviceDetailResponseBody = {
|
|
41297
42386
|
service_name: 'SiteMinder PROD',
|
|
41298
42387
|
id: 'SA:AA0725E0-0402-4320-A2B7-407025E9D673:41669409-e352-4ae5-af58-ba0da8989cd6',
|
|
@@ -43055,9 +44144,11 @@ var Situations;
|
|
|
43055
44144
|
|
|
43056
44145
|
var TAS;
|
|
43057
44146
|
(function (TAS) {
|
|
44147
|
+
/** @internal */
|
|
43058
44148
|
TAS.ALL_QUERY = {
|
|
43059
44149
|
filter: { op: 'ALL' },
|
|
43060
44150
|
};
|
|
44151
|
+
/** @internal */
|
|
43061
44152
|
TAS.GUENTER_AGENT_EDGE_QUERY = {
|
|
43062
44153
|
filter: {
|
|
43063
44154
|
op: 'TAKE_EDGES',
|
|
@@ -43074,6 +44165,7 @@ var TAS;
|
|
|
43074
44165
|
],
|
|
43075
44166
|
},
|
|
43076
44167
|
};
|
|
44168
|
+
/** @internal */
|
|
43077
44169
|
TAS.AGENT_QUERY = {
|
|
43078
44170
|
filter: {
|
|
43079
44171
|
op: 'ATTRIBUTE',
|
|
@@ -43304,6 +44396,7 @@ var MatchType;
|
|
|
43304
44396
|
MatchType["ATTRIBUTE_PREFIX_IGNORE_CASE"] = "ATTRIBUTE_PREFIX_IGNORE_CASE";
|
|
43305
44397
|
MatchType["ATTRIBUTE_CONTAINS"] = "ATTRIBUTE_CONTAINS";
|
|
43306
44398
|
})(MatchType || (MatchType = {}));
|
|
44399
|
+
/** @internal */
|
|
43307
44400
|
const excludedAttributes = [
|
|
43308
44401
|
"agent",
|
|
43309
44402
|
"product",
|
|
@@ -55658,6 +56751,7 @@ class AgentService {
|
|
|
55658
56751
|
this.dxSaaSService = dxSaaSService;
|
|
55659
56752
|
this.log = log ?? new Logging.NullSimpleLog();
|
|
55660
56753
|
}
|
|
56754
|
+
/** Queries agent sources whose name matches the given regex pattern. */
|
|
55661
56755
|
queryAgentsByRegex(pattern) {
|
|
55662
56756
|
const requestBody = {
|
|
55663
56757
|
authorizationView: null,
|
|
@@ -55673,6 +56767,7 @@ class AgentService {
|
|
|
55673
56767
|
};
|
|
55674
56768
|
return this.dxSaaSService.tenantPost('/atc/views/querySource', requestBody);
|
|
55675
56769
|
}
|
|
56770
|
+
/** Queries agent sources by exact full name (prepends `SuperDomain|` if missing). */
|
|
55676
56771
|
queryAgentsByExactName(name) {
|
|
55677
56772
|
const sName = name.startsWith('SuperDomain|')
|
|
55678
56773
|
? name
|
|
@@ -55691,12 +56786,14 @@ class AgentService {
|
|
|
55691
56786
|
};
|
|
55692
56787
|
return this.dxSaaSService.tenantPost('/atc/views/querySource', requestBody);
|
|
55693
56788
|
}
|
|
56789
|
+
/** Retrieves all agent names, retrying once on failure. */
|
|
55694
56790
|
retrieveAgentsWithRetry() {
|
|
55695
56791
|
return this.retrieveAgents().catch((reason) => {
|
|
55696
56792
|
this.log.warn('Error on first attempt (expected): ' + reason);
|
|
55697
56793
|
return this.retrieveAgents();
|
|
55698
56794
|
});
|
|
55699
56795
|
}
|
|
56796
|
+
/** Generates a configurable license report grouping agents by the provided licensing configuration rules. */
|
|
55700
56797
|
async configurableLicenseReport(licenseConfiguration) {
|
|
55701
56798
|
const agentNames = await this.retrieveAgentsWithRetry();
|
|
55702
56799
|
this.log.debug(`AgentNames: ${agentNames.length}`);
|
|
@@ -55817,6 +56914,7 @@ class AgentService {
|
|
|
55817
56914
|
regexMatches(agentNameRegex, agentName) {
|
|
55818
56915
|
return new RegExp(agentNameRegex, 'i').test(agentName);
|
|
55819
56916
|
}
|
|
56917
|
+
/** Generates a default license report categorizing agents into Java, Node, Python, .NET, Infra, etc. */
|
|
55820
56918
|
licenseReport() {
|
|
55821
56919
|
return this.retrieveAgents().then((agentNames) => {
|
|
55822
56920
|
const agentDescriptors = new Array();
|
|
@@ -55934,12 +57032,14 @@ class AgentService {
|
|
|
55934
57032
|
return agentDescriptor.agentName.startsWith('Kubernetes Agent');
|
|
55935
57033
|
}
|
|
55936
57034
|
// /apm/atc/api/private/trace/detail
|
|
57035
|
+
/** Returns the full trace detail for a given trace ID. */
|
|
55937
57036
|
getTrace(traceId) {
|
|
55938
57037
|
const traceRequestBody = {
|
|
55939
57038
|
traceIds: [traceId],
|
|
55940
57039
|
};
|
|
55941
57040
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/trace/detail', traceRequestBody);
|
|
55942
57041
|
}
|
|
57042
|
+
/** Returns trace summaries for a specific agent within a time range. */
|
|
55943
57043
|
getTraceSummaries(startTime, endTime, agentName, index, limit, errorsOnly) {
|
|
55944
57044
|
const traceSummaryRequestBody = {
|
|
55945
57045
|
endTime: endTime.toISO(),
|
|
@@ -55952,6 +57052,7 @@ class AgentService {
|
|
|
55952
57052
|
};
|
|
55953
57053
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/trace/summary', traceSummaryRequestBody);
|
|
55954
57054
|
}
|
|
57055
|
+
/** Starts a trace session on one or more agents with optional filters. */
|
|
55955
57056
|
startAgentTrace(agents, minTXDuration, sessionDuration, parameterName, operationType, parameterNotSign, parameterValue, errorFilterValue) {
|
|
55956
57057
|
let body = {
|
|
55957
57058
|
agentList: agents,
|
|
@@ -55972,6 +57073,7 @@ class AgentService {
|
|
|
55972
57073
|
}
|
|
55973
57074
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/agentlist/starttrace', body);
|
|
55974
57075
|
}
|
|
57076
|
+
/** Returns all agent statuses (deduped by processURL), optionally scoped to a universe or query. */
|
|
55975
57077
|
async retrieveAllAgentStatuses(universeId, query) {
|
|
55976
57078
|
const params = {
|
|
55977
57079
|
page: 0,
|
|
@@ -55995,6 +57097,7 @@ class AgentService {
|
|
|
55995
57097
|
this.log.debug(`retrieved ${statuses.items.length ?? 0} statuses`);
|
|
55996
57098
|
return Array.from(statusMap.values());
|
|
55997
57099
|
}
|
|
57100
|
+
/** Returns a single page of agent statuses with explicit page/size control. */
|
|
55998
57101
|
retrieveAgentStatuses(page, size, universeId, query) {
|
|
55999
57102
|
return this.dxSaaSService
|
|
56000
57103
|
.tenantGet('/apm/atc/api/private/agentlist', { page, size, universeId, q: query ?? 'latest:true' })
|
|
@@ -56002,6 +57105,7 @@ class AgentService {
|
|
|
56002
57105
|
return agentStatusList.items;
|
|
56003
57106
|
});
|
|
56004
57107
|
}
|
|
57108
|
+
/** Returns agent names active within a time window (defaults to last 12 hours). */
|
|
56005
57109
|
retrieveAgents(startTime, endTime) {
|
|
56006
57110
|
if (!endTime) {
|
|
56007
57111
|
endTime = Date.now();
|
|
@@ -56018,12 +57122,14 @@ class AgentService {
|
|
|
56018
57122
|
return agentNameList.items ?? [];
|
|
56019
57123
|
});
|
|
56020
57124
|
}
|
|
57125
|
+
/** Returns agents matching a universe's NASS filter specifier. */
|
|
56021
57126
|
retrieveAgentsForUniverseNASSFilter(universeNASSFilter) {
|
|
56022
57127
|
return this.dxSaaSService.tenantPost('/atc/views/querySource', {
|
|
56023
57128
|
authorizationView: null,
|
|
56024
57129
|
specifier: universeNASSFilter,
|
|
56025
57130
|
});
|
|
56026
57131
|
}
|
|
57132
|
+
/** Returns agent names active within a time window for a specific universe. */
|
|
56027
57133
|
retrieveUniverseAgents(universeId, startTime, endTime) {
|
|
56028
57134
|
if (!endTime) {
|
|
56029
57135
|
endTime = Date.now();
|
|
@@ -56072,6 +57178,7 @@ class AgentService {
|
|
|
56072
57178
|
}
|
|
56073
57179
|
}
|
|
56074
57180
|
}
|
|
57181
|
+
/** Returns the previously collected thread dump data for a given thread dump ID. */
|
|
56075
57182
|
async getThreadDump(threadDumpId) {
|
|
56076
57183
|
const threadDumpBody = {
|
|
56077
57184
|
id: threadDumpId,
|
|
@@ -56082,6 +57189,7 @@ class AgentService {
|
|
|
56082
57189
|
return response;
|
|
56083
57190
|
});
|
|
56084
57191
|
}
|
|
57192
|
+
/** Triggers a thread dump collection for the specified agent. */
|
|
56085
57193
|
async collectThreadDump(fullAgentName) {
|
|
56086
57194
|
if (!fullAgentName.startsWith('SuperDomain|')) {
|
|
56087
57195
|
fullAgentName = 'SuperDomain|' + fullAgentName;
|
|
@@ -56097,6 +57205,7 @@ class AgentService {
|
|
|
56097
57205
|
return response;
|
|
56098
57206
|
});
|
|
56099
57207
|
}
|
|
57208
|
+
/** Returns existing thread dump records for the specified agent. */
|
|
56100
57209
|
async queryThreadDumps(fullAgentName) {
|
|
56101
57210
|
if (!fullAgentName.startsWith('SuperDomain|')) {
|
|
56102
57211
|
fullAgentName = 'SuperDomain|' + fullAgentName;
|
|
@@ -56110,6 +57219,7 @@ class AgentService {
|
|
|
56110
57219
|
return response;
|
|
56111
57220
|
});
|
|
56112
57221
|
}
|
|
57222
|
+
/** Returns whether the specified agent supports thread dump collection. */
|
|
56113
57223
|
async threadDumpCapable(fullAgentName) {
|
|
56114
57224
|
if (!fullAgentName.startsWith('SuperDomain|')) {
|
|
56115
57225
|
fullAgentName = 'SuperDomain|' + fullAgentName;
|
|
@@ -56141,11 +57251,13 @@ class AlarmService {
|
|
|
56141
57251
|
this.dxSaaSService = dxSaaSService;
|
|
56142
57252
|
this.simpleLog = simpleLog;
|
|
56143
57253
|
}
|
|
57254
|
+
/** Returns a single alarm by its ID using the GET endpoint. */
|
|
56144
57255
|
async getAlarm(alarmId) {
|
|
56145
57256
|
return this.dxSaaSService.oiGet('oi/v2/api/alarms/_search', {
|
|
56146
57257
|
alarmId: alarmId,
|
|
56147
57258
|
});
|
|
56148
57259
|
}
|
|
57260
|
+
/** Returns the overview (first alarm in a custom-filter search) for an alarm ID. */
|
|
56149
57261
|
async getAlarmOverview(alarmId) {
|
|
56150
57262
|
const singleAlarmQuery = await this.dxSaaSService.oiPost('oi/v2/api/alarms/_search', {
|
|
56151
57263
|
deviceNames: [],
|
|
@@ -56192,6 +57304,7 @@ class AlarmService {
|
|
|
56192
57304
|
throw new Error('Bad Alarm Query');
|
|
56193
57305
|
}
|
|
56194
57306
|
}
|
|
57307
|
+
/** Sends a notification for an alarm to the specified channel with optional template/locale. */
|
|
56195
57308
|
async triggerNotification(alarmId, notificationChannelName, template = '', locale = 'en-US') {
|
|
56196
57309
|
const alarm = await this.getAlarmOverview(alarmId);
|
|
56197
57310
|
const triggerBody = {
|
|
@@ -56206,6 +57319,7 @@ class AlarmService {
|
|
|
56206
57319
|
this.simpleLog.debug(JSON.stringify(triggerBody, null, 2));
|
|
56207
57320
|
return this.dxSaaSService.oiPost('oi/v2/api/alarmactions/channel', triggerBody);
|
|
56208
57321
|
}
|
|
57322
|
+
/** Assigns an alarm to a user by their user ID. */
|
|
56209
57323
|
async assign(alarmId, userId) {
|
|
56210
57324
|
const alarm = await this.getAlarm(alarmId);
|
|
56211
57325
|
this.simpleLog.debug('original alarm:', JSON.stringify(alarm, null, 2));
|
|
@@ -56226,6 +57340,7 @@ class AlarmService {
|
|
|
56226
57340
|
};
|
|
56227
57341
|
return this.dxSaaSService.tenantPost('oi/v2/api/alarmactions/assign', body);
|
|
56228
57342
|
}
|
|
57343
|
+
/** Clears (closes) an alarm. */
|
|
56229
57344
|
async clear(alarmId) {
|
|
56230
57345
|
const alarm = await this.getAlarm(alarmId);
|
|
56231
57346
|
this.simpleLog.debug('original alarm:', JSON.stringify(alarm, null, 2));
|
|
@@ -56246,6 +57361,7 @@ class AlarmService {
|
|
|
56246
57361
|
};
|
|
56247
57362
|
return this.dxSaaSService.tenantPost('oi/v2/api/alarmactions/clear', body);
|
|
56248
57363
|
}
|
|
57364
|
+
/** Acknowledges or unacknowledges an alarm. */
|
|
56249
57365
|
async acknowledge(alarmId, unacknowledge = false) {
|
|
56250
57366
|
const alarm = await this.getAlarm(alarmId);
|
|
56251
57367
|
this.simpleLog.debug('original alarm:', JSON.stringify(alarm, null, 2));
|
|
@@ -56266,6 +57382,7 @@ class AlarmService {
|
|
|
56266
57382
|
};
|
|
56267
57383
|
return this.dxSaaSService.tenantPost('oi/v2/api/alarmactions/ack', body);
|
|
56268
57384
|
}
|
|
57385
|
+
/** Updates a single field on an alarm document via the Jarvis ingestion API. */
|
|
56269
57386
|
async updateAlarmField(alarmId, field, value) {
|
|
56270
57387
|
const alarm = await this.getAlarm(alarmId);
|
|
56271
57388
|
this.simpleLog.debug('original alarm:', JSON.stringify(alarm, null, 2));
|
|
@@ -56302,6 +57419,7 @@ class AlarmService {
|
|
|
56302
57419
|
this.simpleLog.debug('update request body', JSON.stringify(body, null, 2));
|
|
56303
57420
|
return this.dxSaaSService.tenantPost('jarvis/v2/ingestion', body, {}, headers);
|
|
56304
57421
|
}
|
|
57422
|
+
/** Returns the lifecycle event history for a given alarm ID. */
|
|
56305
57423
|
async getAlarmLifeCycle(alarmId) {
|
|
56306
57424
|
const alarmLifeCycleRequestBody = {
|
|
56307
57425
|
alarmId: alarmId,
|
|
@@ -56317,6 +57435,7 @@ class AlarmService {
|
|
|
56317
57435
|
};
|
|
56318
57436
|
return this.dxSaaSService.oiPost('oi/v2/api/alarms/lifecycle/_search', alarmLifeCycleRequestBody);
|
|
56319
57437
|
}
|
|
57438
|
+
/** Returns all alarms within a time range, with optional type/closed/filter params. */
|
|
56320
57439
|
async getAlarms(startTime, endTime, includedAlarmTypes = [], includeClosed = false, pageSize = 100, alarmFilter) {
|
|
56321
57440
|
const alarmRequestBody = DEFAULT_ALARMS_REQUEST_BODY$1;
|
|
56322
57441
|
alarmRequestBody.timeFrom = startTime.toMillis();
|
|
@@ -56344,9 +57463,11 @@ class AlarmService {
|
|
|
56344
57463
|
mapAlarms(alarmAllPage.alarms);
|
|
56345
57464
|
return alarmIdMap;
|
|
56346
57465
|
}
|
|
57466
|
+
/** Returns all alarm enrichment rules configured for the tenant. */
|
|
56347
57467
|
async getEnrichmentRules() {
|
|
56348
57468
|
return this.dxSaaSService.oiGet('oi/v2/alarm/enrichment/rules');
|
|
56349
57469
|
}
|
|
57470
|
+
/** Lists all alarm queue (filter) configurations. */
|
|
56350
57471
|
async getAlarmQueues() {
|
|
56351
57472
|
//https://apmgw.dxi-na1.saas.broadcom.com/aa0725e004024320a2b7407025e9d673/oi/v2/api/alarmfilters/_search
|
|
56352
57473
|
// ?sortBy=filterName&alarmCategory=rawAlarm&userRoles=TA
|
|
@@ -56354,6 +57475,7 @@ class AlarmService {
|
|
|
56354
57475
|
sortBy: 'filterName',
|
|
56355
57476
|
});
|
|
56356
57477
|
}
|
|
57478
|
+
/** Returns the detail of a single alarm queue by its ID. */
|
|
56357
57479
|
async getAlarmQueueDetail(queueId) {
|
|
56358
57480
|
//https://apmgw.dxi-na1.saas.broadcom.com/aa0725e004024320a2b7407025e9d673/oi/v2/api/alarmfilters/_search
|
|
56359
57481
|
// ?id=0d8b6f6c-184e-4bba-b610-dfb07c275264&alarmCategory=rawAlarm
|
|
@@ -56369,6 +57491,7 @@ class AlarmService {
|
|
|
56369
57491
|
showClosedAlarms: true,
|
|
56370
57492
|
frequency: -1,
|
|
56371
57493
|
};
|
|
57494
|
+
/** Returns historically related alarms for a given alarm ID. */
|
|
56372
57495
|
async getRelatedAlarms(alarmId) {
|
|
56373
57496
|
const alarm = await this.getAlarm(alarmId);
|
|
56374
57497
|
return this.dxSaaSService.oiPost('oi/v2/api/inspect/historicalRef', {
|
|
@@ -57988,6 +59111,7 @@ class AlertService {
|
|
|
57988
59111
|
this.dxSaaSService = dxSaaSService;
|
|
57989
59112
|
this.log = log;
|
|
57990
59113
|
}
|
|
59114
|
+
/** Returns all alerts using the v2 internal API (up to the API limit). */
|
|
57991
59115
|
async retrieveAllAlertsV2() {
|
|
57992
59116
|
return this.dxSaaSService
|
|
57993
59117
|
.tenantPost('atc/private/internal/alert/query', AllAlertsRequestBody)
|
|
@@ -57998,6 +59122,7 @@ class AlertService {
|
|
|
57998
59122
|
return alertList;
|
|
57999
59123
|
});
|
|
58000
59124
|
}
|
|
59125
|
+
/** Returns up to the first 1000 alerts using the legacy alert API. */
|
|
58001
59126
|
async retrieveFirst1000Alerts() {
|
|
58002
59127
|
return this.dxSaaSService
|
|
58003
59128
|
.tenantPost('/apm/atc/api/private/alert/query', AllAlertsRequestBody)
|
|
@@ -58008,6 +59133,7 @@ class AlertService {
|
|
|
58008
59133
|
return alertList;
|
|
58009
59134
|
});
|
|
58010
59135
|
}
|
|
59136
|
+
/** Retrieves all alerts across multiple cursor-paginated requests (increments of 500). */
|
|
58011
59137
|
async reallyRetrieveAllAlerts() {
|
|
58012
59138
|
const increment = 500;
|
|
58013
59139
|
const alertList = await this.dxSaaSService.tenantPost('/apm/atc/api/private/alert/query', AlertService.createAlertRequestCursorRequestBody(0, increment));
|
|
@@ -58037,6 +59163,7 @@ class AlertService {
|
|
|
58037
59163
|
throw new Error('Alert list contained no data.');
|
|
58038
59164
|
}
|
|
58039
59165
|
}
|
|
59166
|
+
/** Returns all alerts for a management module using the v2 internal API. */
|
|
58040
59167
|
async retrieveManagementModuleAlertsV2(managementModuleId) {
|
|
58041
59168
|
return this.dxSaaSService
|
|
58042
59169
|
.tenantPost('atc/private/internal/alert/query', {
|
|
@@ -58052,6 +59179,7 @@ class AlertService {
|
|
|
58052
59179
|
return alertList;
|
|
58053
59180
|
});
|
|
58054
59181
|
}
|
|
59182
|
+
/** Returns alerts belonging to a management module using the legacy alert API. */
|
|
58055
59183
|
async retrieveManagementModuleAlerts(managementModuleId) {
|
|
58056
59184
|
return this.dxSaaSService
|
|
58057
59185
|
.tenantPost('/apm/atc/api/private/alert/query', AlertService.createManagementModuleAlertRequestBody(managementModuleId))
|
|
@@ -58062,6 +59190,7 @@ class AlertService {
|
|
|
58062
59190
|
return alertList;
|
|
58063
59191
|
});
|
|
58064
59192
|
}
|
|
59193
|
+
/** Returns all alerts (normal + summary) for a management module using the legacy API. */
|
|
58065
59194
|
async retrieveAllManagementModuleAlerts(managementModuleId) {
|
|
58066
59195
|
return this.dxSaaSService
|
|
58067
59196
|
.tenantPost('/apm/atc/api/private/alert/query', AlertService.createManagementModuleAllAlertRequestBody(managementModuleId))
|
|
@@ -58072,14 +59201,17 @@ class AlertService {
|
|
|
58072
59201
|
return alertList;
|
|
58073
59202
|
});
|
|
58074
59203
|
}
|
|
59204
|
+
/** Returns a single alert definition by ID using the v2 internal API. */
|
|
58075
59205
|
async retrieveAlertDefinitionV2(alertId, managementModuleId) {
|
|
58076
59206
|
return this.dxSaaSService.tenantPost(`atc/private/internal/alert/get`, { itemId: alertId, mmId: managementModuleId });
|
|
58077
59207
|
}
|
|
59208
|
+
/** Returns a single alert definition by external ID using the legacy alert API. */
|
|
58078
59209
|
async retrieveAlertDefinition(alertId) {
|
|
58079
59210
|
const params = { externalId: alertId };
|
|
58080
59211
|
const paramEncoded = lib$1.stringify(params);
|
|
58081
59212
|
return this.dxSaaSService.tenantGet(`/apm/atc/api/private/alert/query?${paramEncoded}`);
|
|
58082
59213
|
}
|
|
59214
|
+
/** Copies an alert (v2) to a target management module with a new name, optionally changing active state/description. */
|
|
58083
59215
|
async copyAlertV2(originalAlertId, originalManagementModuleId, newAlertName, targetManagementModuleId, active, description) {
|
|
58084
59216
|
return this.retrieveAlertDefinitionV2(originalAlertId, originalManagementModuleId).then((alert) => {
|
|
58085
59217
|
alert.managementModuleId = targetManagementModuleId;
|
|
@@ -58092,6 +59224,7 @@ class AlertService {
|
|
|
58092
59224
|
return this.createAlertV2(alert);
|
|
58093
59225
|
});
|
|
58094
59226
|
}
|
|
59227
|
+
/** Copies an alert (legacy) to a target management module with a new name. */
|
|
58095
59228
|
async copyAlert(originalAlertId, newAlertName, targetManagementModuleName, active, description) {
|
|
58096
59229
|
return this.retrieveAlertDefinition(originalAlertId).then((alert) => {
|
|
58097
59230
|
alert.managementModuleName = targetManagementModuleName;
|
|
@@ -58104,6 +59237,7 @@ class AlertService {
|
|
|
58104
59237
|
return this.createAlert(alert);
|
|
58105
59238
|
});
|
|
58106
59239
|
}
|
|
59240
|
+
/** Copies an alert (legacy) to a new management module and assigns a different metric grouping. */
|
|
58107
59241
|
async copyAlertWithNewMetricGrouping(originalAlertId, newAlertName, targetManagementModuleName, active, description, mgId) {
|
|
58108
59242
|
return this.retrieveAlertDefinition(originalAlertId).then((alert) => {
|
|
58109
59243
|
alert.managementModuleName = targetManagementModuleName;
|
|
@@ -58117,17 +59251,21 @@ class AlertService {
|
|
|
58117
59251
|
return this.createAlert(alert);
|
|
58118
59252
|
});
|
|
58119
59253
|
}
|
|
59254
|
+
/** Creates a new alert using the v2 internal API (strips ID before sending). */
|
|
58120
59255
|
createAlertV2(alert) {
|
|
58121
59256
|
delete alert.id;
|
|
58122
59257
|
return this.dxSaaSService.tenantPost('atc/private/internal/alert', alert);
|
|
58123
59258
|
}
|
|
59259
|
+
/** Creates a new alert using the legacy alert API (strips ID before sending). */
|
|
58124
59260
|
createAlert(alert) {
|
|
58125
59261
|
delete alert.id;
|
|
58126
59262
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/alert/', alert);
|
|
58127
59263
|
}
|
|
59264
|
+
/** Updates an existing alert using the v2 internal API. */
|
|
58128
59265
|
updateAlertV2(alert) {
|
|
58129
59266
|
return this.dxSaaSService.tenantPost('atc/private/internal/alert', alert);
|
|
58130
59267
|
}
|
|
59268
|
+
/** Updates an existing alert using the legacy alert API. */
|
|
58131
59269
|
updateAlert(alert) {
|
|
58132
59270
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/alert/', alert);
|
|
58133
59271
|
}
|
|
@@ -58165,19 +59303,24 @@ class ApmUniverseService {
|
|
|
58165
59303
|
constructor(dxSaaSService) {
|
|
58166
59304
|
this.dxSaaSService = dxSaaSService;
|
|
58167
59305
|
}
|
|
59306
|
+
/** Returns all APM universes (views) for the tenant. */
|
|
58168
59307
|
async retrieveAllUniverses() {
|
|
58169
59308
|
let universeList = await this.dxSaaSService.tenantGet('/atc/views/view', { skipCount: 'true' });
|
|
58170
59309
|
return universeList.items;
|
|
58171
59310
|
}
|
|
59311
|
+
/** Returns a single APM universe by its view ID. */
|
|
58172
59312
|
retrieveUniverse(universeId) {
|
|
58173
59313
|
return this.dxSaaSService.tenantGet(`/atc/views/view/${universeId}`);
|
|
58174
59314
|
}
|
|
59315
|
+
/** Creates a new APM universe from the given request body. */
|
|
58175
59316
|
createUniverse(universe) {
|
|
58176
59317
|
return this.dxSaaSService.tenantPost('/atc/views/view', universe);
|
|
58177
59318
|
}
|
|
59319
|
+
/** Deletes an APM universe by its view ID. */
|
|
58178
59320
|
deleteUniverse(viewId) {
|
|
58179
59321
|
return this.dxSaaSService.tenantDelete('/atc/views/view/' + viewId);
|
|
58180
59322
|
}
|
|
59323
|
+
/** Updates an existing APM universe. */
|
|
58181
59324
|
updateUniverse(universe) {
|
|
58182
59325
|
return this.dxSaaSService.tenantPut('/atc/views/view/' + universe.viewId, universe);
|
|
58183
59326
|
}
|
|
@@ -58199,6 +59342,7 @@ class AsmService {
|
|
|
58199
59342
|
this.dxSaaSService = dxSaaSService;
|
|
58200
59343
|
this.log = log;
|
|
58201
59344
|
}
|
|
59345
|
+
/** Lazily creates and returns the ASM API client, using token and base URL from configuration. */
|
|
58202
59346
|
getClient() {
|
|
58203
59347
|
if (!this.localClient) {
|
|
58204
59348
|
if (!this.dxSaaSService.dxdoConfiguration.dxConfiguration.dxASMToken) {
|
|
@@ -58221,6 +59365,7 @@ class AsmService {
|
|
|
58221
59365
|
}
|
|
58222
59366
|
return this.localClient;
|
|
58223
59367
|
}
|
|
59368
|
+
/** Lists all ASM scan folders accessible with the configured token. */
|
|
58224
59369
|
async listFolders() {
|
|
58225
59370
|
return foldersList({
|
|
58226
59371
|
client: this.getClient(),
|
|
@@ -58251,9 +59396,11 @@ class AttributeService {
|
|
|
58251
59396
|
this.dxSaaSService = dxSaaSService;
|
|
58252
59397
|
this.log = log;
|
|
58253
59398
|
}
|
|
59399
|
+
/** Returns all intellisense attributes, optionally including gathered attributes. */
|
|
58254
59400
|
async getAttributes(includeGathered) {
|
|
58255
59401
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/intellisense/attribute', { includeGathered: includeGathered });
|
|
58256
59402
|
}
|
|
59403
|
+
/** Returns a `ListMap` of layer → attribute names for all gathered attributes. */
|
|
58257
59404
|
async getAttributesAsListMap() {
|
|
58258
59405
|
const newAttributesListMap = new ListMap();
|
|
58259
59406
|
const attributesResponse = await this.getAttributes(true);
|
|
@@ -58263,6 +59410,7 @@ class AttributeService {
|
|
|
58263
59410
|
}
|
|
58264
59411
|
return newAttributesListMap;
|
|
58265
59412
|
}
|
|
59413
|
+
/** Returns `true` if an attribute with the given layer and name exists (uses cache). */
|
|
58266
59414
|
async attributeExists(layer, name) {
|
|
58267
59415
|
if (this.cachedAttributes.getMap().size == 0) {
|
|
58268
59416
|
this.cachedAttributes = await this.getAttributesAsListMap();
|
|
@@ -58287,9 +59435,11 @@ class AuthorizationService {
|
|
|
58287
59435
|
this.dxSaaSService = dxSaaSService;
|
|
58288
59436
|
this.log = log;
|
|
58289
59437
|
}
|
|
59438
|
+
/** Returns all ACA groups, up to `maxResults` entries. */
|
|
58290
59439
|
getGroups(maxResults = 200) {
|
|
58291
59440
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/aca/group', { size: maxResults - 1, groupId: '*' });
|
|
58292
59441
|
}
|
|
59442
|
+
/** Finds ACA users matching a username, up to `maxResults` entries. */
|
|
58293
59443
|
findUser(userName, maxResults = 200) {
|
|
58294
59444
|
this.log.debug('Getting user');
|
|
58295
59445
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/aca/user', {
|
|
@@ -58297,6 +59447,7 @@ class AuthorizationService {
|
|
|
58297
59447
|
userId: userName,
|
|
58298
59448
|
});
|
|
58299
59449
|
}
|
|
59450
|
+
/** Returns all OI users for the tenant. */
|
|
58300
59451
|
getUsers() {
|
|
58301
59452
|
return this.dxSaaSService.tenantGet('oi/v2/api/users');
|
|
58302
59453
|
}
|
|
@@ -58317,6 +59468,7 @@ class AxaService {
|
|
|
58317
59468
|
this.dxSaaSService = dxSaaSService;
|
|
58318
59469
|
this.log = log;
|
|
58319
59470
|
}
|
|
59471
|
+
/** Returns a paginated list of user sessions for an application within a time range. */
|
|
58320
59472
|
getSessions(applicationName, onlyWithScreenshots, startDateTime, endDateTime, cursor) {
|
|
58321
59473
|
const params = {
|
|
58322
59474
|
app_id: applicationName,
|
|
@@ -58334,6 +59486,7 @@ class AxaService {
|
|
|
58334
59486
|
}
|
|
58335
59487
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/sessions/list', false, false, undefined, params);
|
|
58336
59488
|
}
|
|
59489
|
+
/** Returns the BA extension snippet (custom or default) for a given application. */
|
|
58337
59490
|
getApplicationBAExtSnippet(applicationName, baJSType, profileId, tenantId) {
|
|
58338
59491
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/custombajs', false, false, undefined, {
|
|
58339
59492
|
app_id: applicationName,
|
|
@@ -58342,9 +59495,11 @@ class AxaService {
|
|
|
58342
59495
|
tenantId,
|
|
58343
59496
|
});
|
|
58344
59497
|
}
|
|
59498
|
+
/** Uploads a custom BA extension snippet for an application. */
|
|
58345
59499
|
setApplicationBAExtSnippet(applicationName, tenantId, formData) {
|
|
58346
59500
|
return this.dxSaaSService.axaRequest('POST', `mdo/v4/custombajs/${tenantId}/${applicationName}`, false, false, formData, undefined, formData.getHeaders());
|
|
58347
59501
|
}
|
|
59502
|
+
/** Returns aggregated crash summary data for an application over a time range. */
|
|
58348
59503
|
getCrashSummary(applicationName, startTime, endTime, aggregation) {
|
|
58349
59504
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/crashes/data', false, false, null, {
|
|
58350
59505
|
app_id: applicationName,
|
|
@@ -58353,6 +59508,7 @@ class AxaService {
|
|
|
58353
59508
|
start_date: startTime.toISO(),
|
|
58354
59509
|
});
|
|
58355
59510
|
}
|
|
59511
|
+
/** Returns total crash summary (count/rate) for an application over a time range. */
|
|
58356
59512
|
getCrashTotalSummary(applicationName, startTime, endTime, aggregation) {
|
|
58357
59513
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/crashes/total_summary', false, false, null, {
|
|
58358
59514
|
app_id: applicationName,
|
|
@@ -58361,6 +59517,7 @@ class AxaService {
|
|
|
58361
59517
|
start_date: startTime.toISO(),
|
|
58362
59518
|
});
|
|
58363
59519
|
}
|
|
59520
|
+
/** Returns crash groups for an application within a time range. */
|
|
58364
59521
|
getCrashGroups(applicationName, startTime, endTime, aggregation) {
|
|
58365
59522
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/crashes/crash_groups', false, false, null, {
|
|
58366
59523
|
app_id: applicationName,
|
|
@@ -58369,6 +59526,7 @@ class AxaService {
|
|
|
58369
59526
|
start_date: startTime.toISO(),
|
|
58370
59527
|
});
|
|
58371
59528
|
}
|
|
59529
|
+
/** Returns all crash groups for an application within a time range (alias of getCrashGroups). */
|
|
58372
59530
|
async getAllCrashGroups(applicationName, startTime, endTime, aggregation) {
|
|
58373
59531
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/crashes/crash_groups', false, false, null, {
|
|
58374
59532
|
app_id: applicationName,
|
|
@@ -58377,6 +59535,7 @@ class AxaService {
|
|
|
58377
59535
|
start_date: startTime.toISO(),
|
|
58378
59536
|
});
|
|
58379
59537
|
}
|
|
59538
|
+
/** Returns individual crash records within a specific crash group. */
|
|
58380
59539
|
getCrashesInGroup(applicationName, groupId, startTime, endTime, aggregation) {
|
|
58381
59540
|
return this.dxSaaSService.axaRequest('GET', `mdo/v4/crashes/crashlist/${groupId}`, false, false, null, {
|
|
58382
59541
|
app_id: applicationName,
|
|
@@ -58385,40 +59544,51 @@ class AxaService {
|
|
|
58385
59544
|
start_date: startTime.toISO(),
|
|
58386
59545
|
});
|
|
58387
59546
|
}
|
|
59547
|
+
/** Returns the detail payload for a single crash by its ID. */
|
|
58388
59548
|
getCrashDetails(crashId) {
|
|
58389
59549
|
return this.dxSaaSService.axaRequest('GET', `mdo/v4/crashes/crashes/${crashId}`, false, false, null);
|
|
58390
59550
|
}
|
|
59551
|
+
/** Creates a new AXA application. */
|
|
58391
59552
|
createApplication(application) {
|
|
58392
59553
|
this.log.debug('creating application using mda/v4');
|
|
58393
59554
|
return this.dxSaaSService.axaRequest('POST', 'mdo/v4/apps', false, false, application);
|
|
58394
59555
|
}
|
|
59556
|
+
/** Returns all AXA applications for the tenant. */
|
|
58395
59557
|
getApplications() {
|
|
58396
59558
|
this.log.debug('getting applications using mda/v4');
|
|
58397
59559
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/apps', false, false);
|
|
58398
59560
|
}
|
|
59561
|
+
/** Returns a single AXA application by name. */
|
|
58399
59562
|
getApplication(applicationName) {
|
|
58400
59563
|
return this.dxSaaSService.axaRequest('GET', `mdo/v4/apps/${applicationName}`, false, false);
|
|
58401
59564
|
}
|
|
59565
|
+
/** Deletes an AXA application by name. */
|
|
58402
59566
|
deleteApplication(applicationName) {
|
|
58403
59567
|
return this.dxSaaSService.axaRequest('DELETE', `mdo/v4/apps/${applicationName}`, false, false);
|
|
58404
59568
|
}
|
|
59569
|
+
/** Returns all data collection profiles for the tenant. */
|
|
58405
59570
|
getDataCollectionProfiles() {
|
|
58406
59571
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/profiles/tenant', false, false);
|
|
58407
59572
|
}
|
|
59573
|
+
/** Updates an existing data collection profile by its numeric ID. */
|
|
58408
59574
|
async updateDataCollectionProfile(profileId, updatedProfile) {
|
|
58409
59575
|
return this.dxSaaSService.axaRequest('PUT', `mdo/v4/profiles/${profileId}`, false, false, updatedProfile);
|
|
58410
59576
|
}
|
|
59577
|
+
/** Creates (imports) a data collection profile for a given cohort and application. */
|
|
58411
59578
|
async importDataCollectionProfile(cohortId, applicationName, updatedProfile) {
|
|
58412
59579
|
return this.dxSaaSService.axaRequest('POST', `mdo/v4/profiles/create/${cohortId}/${applicationName}`, false, false, updatedProfile);
|
|
58413
59580
|
}
|
|
59581
|
+
/** Returns the currently assigned data collection profile for an application. */
|
|
58414
59582
|
async getApplicationProfile(applicationName) {
|
|
58415
59583
|
return this.dxSaaSService.axaRequest('GET', `mdo/v4/profiles/${applicationName}`, false, false);
|
|
58416
59584
|
}
|
|
59585
|
+
/** Assigns a data collection profile to an application by profile ID. */
|
|
58417
59586
|
async setApplicationProfile(applicationName, profileId) {
|
|
58418
59587
|
return this.dxSaaSService.axaRequest('PUT', `mdo/v4/profiles/app/${applicationName}`, false, false, {}, {
|
|
58419
59588
|
profile_id: profileId,
|
|
58420
59589
|
});
|
|
58421
59590
|
}
|
|
59591
|
+
/** Returns user activity data for an application (last 24 hours). */
|
|
58422
59592
|
async getActivities(appName) {
|
|
58423
59593
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/user_activity/activities/', false, false, {}, {
|
|
58424
59594
|
start_date: DateTime.now().minus({ days: 1 }).toISO(),
|
|
@@ -58428,6 +59598,7 @@ class AxaService {
|
|
|
58428
59598
|
cachebuster: DateTime.now().toMillis(),
|
|
58429
59599
|
});
|
|
58430
59600
|
}
|
|
59601
|
+
/** Returns screen-level activity data for an application (last 30 days). */
|
|
58431
59602
|
async getScreens(appName) {
|
|
58432
59603
|
return this.dxSaaSService.axaRequest('GET', 'mdo/v4/user_activity/screens/', false, false, {}, {
|
|
58433
59604
|
start_date: DateTime.now().minus({ days: 30 }).toISO(),
|
|
@@ -58438,6 +59609,7 @@ class AxaService {
|
|
|
58438
59609
|
num_of_results: 100,
|
|
58439
59610
|
});
|
|
58440
59611
|
}
|
|
59612
|
+
/** Creates a new user activity record. */
|
|
58441
59613
|
async createActivity(activityCreateRequest) {
|
|
58442
59614
|
return this.dxSaaSService.axaRequest('POST', 'mdo/v4/user_activity', false, false, activityCreateRequest);
|
|
58443
59615
|
}
|
|
@@ -58458,9 +59630,11 @@ class BlobService {
|
|
|
58458
59630
|
this.dxSaaSService = dxSaaSService;
|
|
58459
59631
|
this.log = log;
|
|
58460
59632
|
}
|
|
59633
|
+
/** Returns the list of available blob schemas. */
|
|
58461
59634
|
async listSchemas() {
|
|
58462
59635
|
return this.dxSaaSService.tenantPost('/blobstorage/schema/list', {});
|
|
58463
59636
|
}
|
|
59637
|
+
/** Fetches a blob by schema, ID, and optional version; returns the raw data string. */
|
|
58464
59638
|
async fetchBlob(schema, id, version) {
|
|
58465
59639
|
return this.dxSaaSService
|
|
58466
59640
|
.tenantPost('/blobstorage/blob/fetch', {}, {
|
|
@@ -58472,6 +59646,7 @@ class BlobService {
|
|
|
58472
59646
|
return response.data;
|
|
58473
59647
|
});
|
|
58474
59648
|
}
|
|
59649
|
+
/** Returns all blobs (without content) registered under a given schema. */
|
|
58475
59650
|
async listBlobsForSchema(schema) {
|
|
58476
59651
|
this.log.debug(`requesting all blobs for schema '${schema}'`);
|
|
58477
59652
|
return this.dxSaaSService.tenantPost('/blobstorage/blob/query', {
|
|
@@ -58496,6 +59671,7 @@ class ChannelService {
|
|
|
58496
59671
|
constructor(dxSaaSService) {
|
|
58497
59672
|
this.dxSaaSService = dxSaaSService;
|
|
58498
59673
|
}
|
|
59674
|
+
/** Returns all notification channels using the new DXChannelConfiguration model. */
|
|
58499
59675
|
retrieveAllChannelsNew() {
|
|
58500
59676
|
return this.dxSaaSService
|
|
58501
59677
|
.axaRequest('get', 'dxinotify/notify/v1/channels', true, false)
|
|
@@ -58503,6 +59679,7 @@ class ChannelService {
|
|
|
58503
59679
|
return channelResponseBody.channels;
|
|
58504
59680
|
});
|
|
58505
59681
|
}
|
|
59682
|
+
/** Returns all notification channels using the legacy Channel model. */
|
|
58506
59683
|
retrieveAllChannels() {
|
|
58507
59684
|
return this.dxSaaSService
|
|
58508
59685
|
.axaRequest('get', 'dxinotify/notify/v1/channels', true, false)
|
|
@@ -58510,30 +59687,35 @@ class ChannelService {
|
|
|
58510
59687
|
return channelResponseBody.channels;
|
|
58511
59688
|
});
|
|
58512
59689
|
}
|
|
59690
|
+
/** Creates a new notification channel using the new DXChannelConfiguration model. */
|
|
58513
59691
|
async createChannelNew(channelToCreate) {
|
|
58514
59692
|
delete channelToCreate.id;
|
|
58515
59693
|
channelToCreate.orgId = await this.dxSaaSService.getTenantCN();
|
|
58516
59694
|
channelToCreate.author = 'dx-do';
|
|
58517
59695
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/channels', false, false, channelToCreate);
|
|
58518
59696
|
}
|
|
59697
|
+
/** Creates a new notification channel using the legacy Channel model. */
|
|
58519
59698
|
async createChannel(channelToCreate) {
|
|
58520
59699
|
delete channelToCreate.id;
|
|
58521
59700
|
channelToCreate.orgId = await this.dxSaaSService.getTenantCN();
|
|
58522
59701
|
channelToCreate.author = 'dx-do';
|
|
58523
59702
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/channels', false, false, channelToCreate);
|
|
58524
59703
|
}
|
|
59704
|
+
/** Updates an existing channel by ID using the new DXChannelConfiguration model. */
|
|
58525
59705
|
async updateChannelNew(existingChannelId, channelUpdate) {
|
|
58526
59706
|
channelUpdate.orgId = await this.dxSaaSService.getTenantCN();
|
|
58527
59707
|
channelUpdate.id = existingChannelId;
|
|
58528
59708
|
channelUpdate.author = 'dx-do';
|
|
58529
59709
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/channels', false, false, channelUpdate);
|
|
58530
59710
|
}
|
|
59711
|
+
/** Updates an existing channel by ID using the legacy Channel model. */
|
|
58531
59712
|
async updateChannel(existingChannelId, channelUpdate) {
|
|
58532
59713
|
channelUpdate.orgId = await this.dxSaaSService.getTenantCN();
|
|
58533
59714
|
channelUpdate.id = existingChannelId;
|
|
58534
59715
|
channelUpdate.author = 'dx-do';
|
|
58535
59716
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/channels', false, false, channelUpdate);
|
|
58536
59717
|
}
|
|
59718
|
+
/** Returns all notification templates. */
|
|
58537
59719
|
retrieveAllTemplates() {
|
|
58538
59720
|
return this.dxSaaSService
|
|
58539
59721
|
.axaRequest('get', 'dxinotify/notify/v1/templates', false, true)
|
|
@@ -58541,6 +59723,7 @@ class ChannelService {
|
|
|
58541
59723
|
return templatesResponseBody.templates;
|
|
58542
59724
|
});
|
|
58543
59725
|
}
|
|
59726
|
+
/** Returns all notification filter policies. */
|
|
58544
59727
|
retrieveAllPolicies() {
|
|
58545
59728
|
return this.dxSaaSService
|
|
58546
59729
|
.axaRequest('get', 'dxinotify/notify/v1/filters', true, false)
|
|
@@ -58548,12 +59731,15 @@ class ChannelService {
|
|
|
58548
59731
|
return policyResponse.filters;
|
|
58549
59732
|
});
|
|
58550
59733
|
}
|
|
59734
|
+
/** Updates an existing notification filter policy. */
|
|
58551
59735
|
updatePolicy(policy) {
|
|
58552
59736
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/filters', false, false, policy);
|
|
58553
59737
|
}
|
|
59738
|
+
/** Creates a new notification filter policy. */
|
|
58554
59739
|
createPolicy(policy) {
|
|
58555
59740
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/filters', false, false, policy);
|
|
58556
59741
|
}
|
|
59742
|
+
/** Creates a new notification template with text (base64-encoded) and optional metadata. */
|
|
58557
59743
|
createTemplate(templateName, templateSubject, templateText, senderNameTemplate, locale, makeDefault, author) {
|
|
58558
59744
|
return this.dxSaaSService.axaRequest('put', 'dxinotify/notify/v1/templates', false, false, {
|
|
58559
59745
|
orgId: this.dxSaaSService.getTenantCN(),
|
|
@@ -58572,6 +59758,7 @@ class ChannelService {
|
|
|
58572
59758
|
templateText: Buffer.from(templateText).toString('base64'),
|
|
58573
59759
|
});
|
|
58574
59760
|
}
|
|
59761
|
+
/** Updates fields on an existing template; any omitted fields keep their current values. */
|
|
58575
59762
|
updateTemplate(currentTemplate, newTemplateName, newTemplateSubject, newTemplateText, senderNameTemplate, locale, makeDefault, author) {
|
|
58576
59763
|
currentTemplate.oldTemplateName = currentTemplate.templateName;
|
|
58577
59764
|
currentTemplate.templateName =
|
|
@@ -58595,11 +59782,13 @@ class DashboardService {
|
|
|
58595
59782
|
constructor(dxSaaSService) {
|
|
58596
59783
|
this.dxSaaSService = dxSaaSService;
|
|
58597
59784
|
}
|
|
59785
|
+
/** Returns the current org theme setting (e.g. "light" or "dark"). */
|
|
58598
59786
|
getTheme() {
|
|
58599
59787
|
return this.dxSaaSService
|
|
58600
59788
|
.dashboardGet('api/org/preferences')
|
|
58601
59789
|
.then((preferences) => preferences.theme);
|
|
58602
59790
|
}
|
|
59791
|
+
/** Sets the org theme preference. */
|
|
58603
59792
|
setTheme(themeString) {
|
|
58604
59793
|
return this.dxSaaSService
|
|
58605
59794
|
.dashboardPut('api/org/preferences', {
|
|
@@ -58611,9 +59800,11 @@ class DashboardService {
|
|
|
58611
59800
|
return undefined;
|
|
58612
59801
|
});
|
|
58613
59802
|
}
|
|
59803
|
+
/** Lists all API keys for the org. */
|
|
58614
59804
|
listApiKeys() {
|
|
58615
59805
|
return this.dxSaaSService.dashboardGet('api/auth/keys');
|
|
58616
59806
|
}
|
|
59807
|
+
/** Creates a new dashboard in the specified folder (clears the ID before sending). */
|
|
58617
59808
|
createDashboard(folderId, dashboard, updateCommitMessage) {
|
|
58618
59809
|
dashboard.id = undefined;
|
|
58619
59810
|
return this.dxSaaSService.dashboardPost('api/dashboards/db', {
|
|
@@ -58623,6 +59814,7 @@ class DashboardService {
|
|
|
58623
59814
|
message: updateCommitMessage,
|
|
58624
59815
|
});
|
|
58625
59816
|
}
|
|
59817
|
+
/** Updates an existing dashboard by ID, optionally overwriting the current version. */
|
|
58626
59818
|
updateDashboard(id, folderId, dashboard, updateCommitMessage, overwrite) {
|
|
58627
59819
|
if (!dashboard.id || dashboard.id != id) {
|
|
58628
59820
|
dashboard.id = id;
|
|
@@ -58634,23 +59826,28 @@ class DashboardService {
|
|
|
58634
59826
|
message: updateCommitMessage,
|
|
58635
59827
|
});
|
|
58636
59828
|
}
|
|
59829
|
+
/** Returns all dashboard tags used across the org. */
|
|
58637
59830
|
getAllDashboardTags() {
|
|
58638
59831
|
return this.dxSaaSService.dashboardGet('api/dashboards/tags');
|
|
58639
59832
|
}
|
|
59833
|
+
/** Appends new tags to a dashboard (skips tags already present). */
|
|
58640
59834
|
async addDashboardTags(uid, tags) {
|
|
58641
59835
|
const currentDashboard = await this.getDashboard(uid);
|
|
58642
59836
|
const actualNewTags = tags.filter((newTag) => !currentDashboard.dashboard.tags.includes(newTag));
|
|
58643
59837
|
currentDashboard.dashboard.tags.push(...actualNewTags);
|
|
58644
59838
|
return this.updateDashboard(currentDashboard.dashboard.id, currentDashboard.meta.folderId, currentDashboard.dashboard, `Added Tags: [${actualNewTags.join(',')}]`);
|
|
58645
59839
|
}
|
|
59840
|
+
/** Replaces all existing tags on a dashboard with the provided set. */
|
|
58646
59841
|
async replaceDashboardTags(uid, newTags) {
|
|
58647
59842
|
const currentDashboard = await this.getDashboard(uid);
|
|
58648
59843
|
currentDashboard.dashboard.tags = newTags;
|
|
58649
59844
|
return this.updateDashboard(currentDashboard.dashboard.id, currentDashboard.meta.folderId, currentDashboard.dashboard, `Replaced Tags: [${newTags.join(',')}]`);
|
|
58650
59845
|
}
|
|
59846
|
+
/** Returns the full dashboard (model + meta) for a given UID. */
|
|
58651
59847
|
getDashboard(uid) {
|
|
58652
59848
|
return this.dxSaaSService.dashboardGet(`api/dashboards/uid/${uid}`);
|
|
58653
59849
|
}
|
|
59850
|
+
/** Returns all dashboards within a specific folder. */
|
|
58654
59851
|
getDashboardsInFolder(folderId) {
|
|
58655
59852
|
return this.dxSaaSService.dashboardGet('api/search', {
|
|
58656
59853
|
type: DashboardSearch.SearchType.DASHBOARD,
|
|
@@ -58658,23 +59855,28 @@ class DashboardService {
|
|
|
58658
59855
|
folderIds: folderId,
|
|
58659
59856
|
});
|
|
58660
59857
|
}
|
|
59858
|
+
/** Searches dashboards or folders by type and query string. */
|
|
58661
59859
|
search(searchType, query) {
|
|
58662
59860
|
return this.dxSaaSService.dashboardGet('api/search', {
|
|
58663
59861
|
type: searchType,
|
|
58664
59862
|
query: query,
|
|
58665
59863
|
});
|
|
58666
59864
|
}
|
|
59865
|
+
/** Returns folder metadata by numeric folder ID. */
|
|
58667
59866
|
getFolderById(folderId) {
|
|
58668
59867
|
return this.dxSaaSService.dashboardGet(`api/folders/id/${folderId}`);
|
|
58669
59868
|
}
|
|
59869
|
+
/** Returns folder metadata by UID string. */
|
|
58670
59870
|
getFolderByUid(folderUid) {
|
|
58671
59871
|
return this.dxSaaSService.dashboardGet(`api/folders/${folderUid}`);
|
|
58672
59872
|
}
|
|
59873
|
+
/** Returns the UID for a folder with the given title, or `undefined` if not found. */
|
|
58673
59874
|
getFolderUid(folderTitle) {
|
|
58674
59875
|
return this.getFoldersMapByTitle().then((folderMap) => {
|
|
58675
59876
|
return folderMap.get(folderTitle)?.uid ?? undefined;
|
|
58676
59877
|
});
|
|
58677
59878
|
}
|
|
59879
|
+
/** Returns a map of folder title → folder item for all folders. */
|
|
58678
59880
|
getFoldersMapByTitle() {
|
|
58679
59881
|
return this.getFolders().then((folders) => {
|
|
58680
59882
|
return folders.reduce(function (map, folder) {
|
|
@@ -58683,9 +59885,11 @@ class DashboardService {
|
|
|
58683
59885
|
}, new Map());
|
|
58684
59886
|
});
|
|
58685
59887
|
}
|
|
59888
|
+
/** Returns all folders for the org. */
|
|
58686
59889
|
getFolders() {
|
|
58687
59890
|
return this.dxSaaSService.dashboardGet('api/folders');
|
|
58688
59891
|
}
|
|
59892
|
+
/** Creates a new folder with the given title and optional UID. */
|
|
58689
59893
|
createFolder(folderTitle, folderUid) {
|
|
58690
59894
|
const body = {
|
|
58691
59895
|
title: folderTitle,
|
|
@@ -58695,9 +59899,11 @@ class DashboardService {
|
|
|
58695
59899
|
}
|
|
58696
59900
|
return this.dxSaaSService.dashboardPost('api/folders', body);
|
|
58697
59901
|
}
|
|
59902
|
+
/** Returns the permission list for a folder by UID. */
|
|
58698
59903
|
getFolderPermissions(folderUid) {
|
|
58699
59904
|
return this.dxSaaSService.dashboardGet(`api/folders/${folderUid}/permissions`);
|
|
58700
59905
|
}
|
|
59906
|
+
/** Adds a permission entry for a user to a folder, preserving existing permissions. */
|
|
58701
59907
|
async addFolderPermission(folderUid, userId, permissionType) {
|
|
58702
59908
|
const existingPermissions = await this.getFolderPermissions(folderUid);
|
|
58703
59909
|
const updatePermissions = new Array();
|
|
@@ -58731,6 +59937,7 @@ class DashboardService {
|
|
|
58731
59937
|
});
|
|
58732
59938
|
return this.setFolderPermissions(folderUid, updatePermissions);
|
|
58733
59939
|
}
|
|
59940
|
+
/** Issues a multi-search against the audit log datasource using a session cookie. */
|
|
58734
59941
|
mSearch(validSessionCookie, startTime, endTime) {
|
|
58735
59942
|
const body1 = {
|
|
58736
59943
|
search_type: 'query_then_fetch',
|
|
@@ -58767,13 +59974,16 @@ class DashboardService {
|
|
|
58767
59974
|
const body = JSON.stringify(body1) + '\n' + JSON.stringify(body2);
|
|
58768
59975
|
return this.dxSaaSService.dashboardCookiePost('api/datasources/proxy/29484/_msearch', body, {}, { Cookie: validSessionCookie });
|
|
58769
59976
|
}
|
|
59977
|
+
/** Replaces all permissions on a folder with the provided list. */
|
|
58770
59978
|
setFolderPermissions(folderUid, permissions) {
|
|
58771
59979
|
return this.dxSaaSService.dashboardPost(`api/folders/${folderUid}/permissions`, { items: permissions });
|
|
58772
59980
|
}
|
|
59981
|
+
/** Searches org users by a query term (useful for permission assignment). */
|
|
58773
59982
|
searchUsers(searchTerm) {
|
|
58774
59983
|
// /api/users/search?perpage=10&page=1&query=mygraf
|
|
58775
59984
|
return this.dxSaaSService.dashboardGet('api/org/users/lookup', { query: searchTerm });
|
|
58776
59985
|
}
|
|
59986
|
+
/** Looks up a single org user by email or login name. */
|
|
58777
59987
|
lookupUser(userEmail) {
|
|
58778
59988
|
return this.dxSaaSService.dashboardGet('api/org/users/lookup', {
|
|
58779
59989
|
loginOrEmail: userEmail,
|
|
@@ -64316,10 +65526,12 @@ class DxSaasService {
|
|
|
64316
65526
|
getTokenUser() {
|
|
64317
65527
|
return getUserTokenSub(this.dxdoConfiguration.dxConfiguration.userToken);
|
|
64318
65528
|
}
|
|
65529
|
+
/** Verify connectivity by fetching the ATC view list. */
|
|
64319
65530
|
ping() {
|
|
64320
65531
|
this.log.debug('Pinging DX Tenant');
|
|
64321
65532
|
return this.tenantGet('/atc/views/view', { skipCount: 'true' });
|
|
64322
65533
|
}
|
|
65534
|
+
/** Authenticate and return the current user's profile from the AXA security endpoint. */
|
|
64323
65535
|
auth() {
|
|
64324
65536
|
return this.axaRequest('GET', 'ess/security/v1/me', false, false);
|
|
64325
65537
|
}
|
|
@@ -64353,6 +65565,14 @@ class DxSaasService {
|
|
|
64353
65565
|
this.log.debug(`debug: prepared axa session host as ${gwURL.toString()}`);
|
|
64354
65566
|
return gwURL.toString();
|
|
64355
65567
|
}
|
|
65568
|
+
/**
|
|
65569
|
+
* Fetch AXA session events (APM Synthetic / AXA user sessions) from the Elasticsearch exporter.
|
|
65570
|
+
* @param startTimestamp - Start of the time window (epoch ms).
|
|
65571
|
+
* @param endTimestamp - End of the time window (epoch ms).
|
|
65572
|
+
* @param maxSessions - Maximum number of session records to return.
|
|
65573
|
+
* @param appId - AXA application ID to filter by.
|
|
65574
|
+
* @param query - Optional Lucene query string override. Defaults to `app.id:"<appId>"`.
|
|
65575
|
+
*/
|
|
64356
65576
|
async axaSessionRequest(startTimestamp, endTimestamp, maxSessions, appId, query) {
|
|
64357
65577
|
if (!query) {
|
|
64358
65578
|
query = `app.id:"${appId}"`;
|
|
@@ -64404,6 +65624,16 @@ class DxSaasService {
|
|
|
64404
65624
|
async getConnectorConfig() {
|
|
64405
65625
|
return this.axaRequest('GET', 'ess/udsconfig/v1/connectorconfig', false, false);
|
|
64406
65626
|
}
|
|
65627
|
+
/**
|
|
65628
|
+
* Issue an arbitrary HTTP request to the AXA sub-domain (Elasticsearch exporter or UDS config).
|
|
65629
|
+
* @param method - HTTP method.
|
|
65630
|
+
* @param path - Path relative to the AXA host, optionally suffixed with tenant CN.
|
|
65631
|
+
* @param appendTenantToPath - When `true`, the tenant common name is appended to `path`.
|
|
65632
|
+
* @param appendOrgIdToParams - When `true`, `orgid` query param is added automatically.
|
|
65633
|
+
* @param body - Request body (non-GET only).
|
|
65634
|
+
* @param params - Query-string parameters.
|
|
65635
|
+
* @param extraHeaders - Additional request headers.
|
|
65636
|
+
*/
|
|
64407
65637
|
async axaRequest(method, path, appendTenantToPath, appendOrgIdToParams, body, params, extraHeaders) {
|
|
64408
65638
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}${appendTenantToPath ? '/' + (await this.getTenantCN()) : ''}`;
|
|
64409
65639
|
this.log.debug('retrieving axa:', url);
|
|
@@ -64440,6 +65670,11 @@ class DxSaasService {
|
|
|
64440
65670
|
}
|
|
64441
65671
|
});
|
|
64442
65672
|
}
|
|
65673
|
+
/**
|
|
65674
|
+
* Issue an HTTP PATCH to a tenant-scoped path under the DX gateway.
|
|
65675
|
+
* @param path - Relative path after the cohort segment.
|
|
65676
|
+
* @param body - Partial update payload.
|
|
65677
|
+
*/
|
|
64443
65678
|
async tenantPatch(path, body) {
|
|
64444
65679
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64445
65680
|
return this._httpClient
|
|
@@ -64456,6 +65691,13 @@ class DxSaasService {
|
|
|
64456
65691
|
}
|
|
64457
65692
|
});
|
|
64458
65693
|
}
|
|
65694
|
+
/**
|
|
65695
|
+
* Issue an HTTP POST to a tenant-scoped path under the DX gateway.
|
|
65696
|
+
* @param path - Relative path after the cohort segment (e.g. `"atc/views/view"`).
|
|
65697
|
+
* @param body - Request body (JSON-serializable). Defaults to `{}`.
|
|
65698
|
+
* @param params - Query-string parameters.
|
|
65699
|
+
* @param headers - Additional request headers merged over the auth header.
|
|
65700
|
+
*/
|
|
64459
65701
|
async tenantPost(path, body, params, headers = {}) {
|
|
64460
65702
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64461
65703
|
const requestConfig = this.createSimpleUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64475,6 +65717,12 @@ class DxSaasService {
|
|
|
64475
65717
|
}
|
|
64476
65718
|
});
|
|
64477
65719
|
}
|
|
65720
|
+
/**
|
|
65721
|
+
* Issue an HTTP PUT to a tenant-scoped path under the DX gateway.
|
|
65722
|
+
* @param path - Relative path after the cohort segment.
|
|
65723
|
+
* @param body - Request body.
|
|
65724
|
+
* @param params - Query-string parameters.
|
|
65725
|
+
*/
|
|
64478
65726
|
async tenantPut(path, body, params) {
|
|
64479
65727
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64480
65728
|
return this._httpClient
|
|
@@ -64491,6 +65739,10 @@ class DxSaasService {
|
|
|
64491
65739
|
}
|
|
64492
65740
|
});
|
|
64493
65741
|
}
|
|
65742
|
+
/**
|
|
65743
|
+
* Issue an HTTP POST to a tenant path and return the response as a Node.js stream.
|
|
65744
|
+
* Useful for large binary downloads (e.g. metric data exports).
|
|
65745
|
+
*/
|
|
64494
65746
|
async tenantPostForStream(path, body, params) {
|
|
64495
65747
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64496
65748
|
const config = this.createSimpleUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64509,6 +65761,15 @@ class DxSaasService {
|
|
|
64509
65761
|
}
|
|
64510
65762
|
});
|
|
64511
65763
|
}
|
|
65764
|
+
/**
|
|
65765
|
+
* Issue an arbitrary HTTP method to a tenant-scoped path.
|
|
65766
|
+
* Prefer the typed helpers (`tenantGet`, `tenantPost`, etc.) when the method is known.
|
|
65767
|
+
* @param method - HTTP method (GET, POST, PUT, DELETE, …).
|
|
65768
|
+
* @param path - Relative path after the cohort segment.
|
|
65769
|
+
* @param body - Request body (non-GET methods only).
|
|
65770
|
+
* @param params - Query-string parameters.
|
|
65771
|
+
* @param extraHeaders - Additional request headers.
|
|
65772
|
+
*/
|
|
64512
65773
|
async tenantRequest(method, path, body, params, extraHeaders) {
|
|
64513
65774
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64514
65775
|
if (!params) {
|
|
@@ -64540,6 +65801,12 @@ class DxSaasService {
|
|
|
64540
65801
|
}
|
|
64541
65802
|
});
|
|
64542
65803
|
}
|
|
65804
|
+
/**
|
|
65805
|
+
* Issue an HTTP GET to a tenant-scoped path under the DX gateway.
|
|
65806
|
+
* @param path - Relative path after the cohort segment.
|
|
65807
|
+
* @param params - Query-string parameters.
|
|
65808
|
+
* @param extraHeaders - Additional request headers.
|
|
65809
|
+
*/
|
|
64543
65810
|
async tenantGet(path, params, extraHeaders) {
|
|
64544
65811
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64545
65812
|
const config = this.createSimpleUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64565,6 +65832,12 @@ class DxSaasService {
|
|
|
64565
65832
|
}
|
|
64566
65833
|
});
|
|
64567
65834
|
}
|
|
65835
|
+
/**
|
|
65836
|
+
* Issue an HTTP DELETE to a tenant-scoped path under the DX gateway.
|
|
65837
|
+
* @param path - Relative path after the cohort segment.
|
|
65838
|
+
* @param params - Query-string parameters.
|
|
65839
|
+
* @param extraHeaders - Additional request headers.
|
|
65840
|
+
*/
|
|
64568
65841
|
async tenantDelete(path, params, extraHeaders) {
|
|
64569
65842
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64570
65843
|
const config = this.createSimpleUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64607,6 +65880,13 @@ class DxSaasService {
|
|
|
64607
65880
|
params: params,
|
|
64608
65881
|
};
|
|
64609
65882
|
}
|
|
65883
|
+
/**
|
|
65884
|
+
* POST to an OI (Operational Intelligence) path with `x-authorizationview: VIEWALL` header.
|
|
65885
|
+
* @param path - Relative path after the cohort segment.
|
|
65886
|
+
* @param body - Request body.
|
|
65887
|
+
* @param params - Query-string parameters.
|
|
65888
|
+
* @param extraHeaders - Additional request headers.
|
|
65889
|
+
*/
|
|
64610
65890
|
async oiPost(path, body, params, extraHeaders) {
|
|
64611
65891
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64612
65892
|
const config = this.createUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64632,6 +65912,12 @@ class DxSaasService {
|
|
|
64632
65912
|
}
|
|
64633
65913
|
});
|
|
64634
65914
|
}
|
|
65915
|
+
/**
|
|
65916
|
+
* GET from an OI (Operational Intelligence) path with `x-authorizationview: VIEWALL` header.
|
|
65917
|
+
* @param path - Relative path after the cohort segment.
|
|
65918
|
+
* @param params - Query-string parameters.
|
|
65919
|
+
* @param extraHeaders - Additional request headers.
|
|
65920
|
+
*/
|
|
64635
65921
|
async oiGet(path, params, extraHeaders) {
|
|
64636
65922
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
64637
65923
|
const config = this.createUserAuthorizedRequestConfig(params ?? {});
|
|
@@ -64657,6 +65943,12 @@ class DxSaasService {
|
|
|
64657
65943
|
}
|
|
64658
65944
|
});
|
|
64659
65945
|
}
|
|
65946
|
+
/**
|
|
65947
|
+
* GET from an ACC path, returning the response as a Node.js readable stream.
|
|
65948
|
+
* @param path - Path segment appended after `.../acc/`.
|
|
65949
|
+
* @param params - Query-string parameters.
|
|
65950
|
+
* @param extraHeaders - Additional request headers.
|
|
65951
|
+
*/
|
|
64660
65952
|
async accStream(path, params, extraHeaders) {
|
|
64661
65953
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path}`;
|
|
64662
65954
|
const aheaders = this.createUserAuthorizedRequestConfig(params);
|
|
@@ -64687,6 +65979,12 @@ class DxSaasService {
|
|
|
64687
65979
|
}
|
|
64688
65980
|
});
|
|
64689
65981
|
}
|
|
65982
|
+
/**
|
|
65983
|
+
* GET from an ACC path.
|
|
65984
|
+
* @param path - Path segment appended after `.../acc/`.
|
|
65985
|
+
* @param params - Query-string parameters.
|
|
65986
|
+
* @param extraHeaders - Additional request headers.
|
|
65987
|
+
*/
|
|
64690
65988
|
async accGet(path, params, extraHeaders) {
|
|
64691
65989
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path}`;
|
|
64692
65990
|
const aheaders = this.createUserAuthorizedRequestConfig({});
|
|
@@ -64716,6 +66014,13 @@ class DxSaasService {
|
|
|
64716
66014
|
}
|
|
64717
66015
|
});
|
|
64718
66016
|
}
|
|
66017
|
+
/**
|
|
66018
|
+
* PATCH to an ACC path.
|
|
66019
|
+
* @param path - Path segment appended after `.../acc/`.
|
|
66020
|
+
* @param body - Partial update payload.
|
|
66021
|
+
* @param params - Query-string parameters.
|
|
66022
|
+
* @param extraHeaders - Additional request headers.
|
|
66023
|
+
*/
|
|
64719
66024
|
async accPatch(path, body, params, extraHeaders) {
|
|
64720
66025
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path}`;
|
|
64721
66026
|
const headers = this.createUserAuthorizedRequestConfig({}).headers;
|
|
@@ -64745,6 +66050,13 @@ class DxSaasService {
|
|
|
64745
66050
|
}
|
|
64746
66051
|
});
|
|
64747
66052
|
}
|
|
66053
|
+
/**
|
|
66054
|
+
* POST a file to an ACC path using `multipart/form-data`.
|
|
66055
|
+
* @param urlpath - Path segment appended after `.../acc/`.
|
|
66056
|
+
* @param filepath - Absolute path on disk to the file to upload.
|
|
66057
|
+
* @param params - Query-string parameters.
|
|
66058
|
+
* @param extraHeaders - Additional request headers.
|
|
66059
|
+
*/
|
|
64748
66060
|
async accPostFile(urlpath, filepath, params, extraHeaders) {
|
|
64749
66061
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path$1}`;
|
|
64750
66062
|
const headers = this.createUserAuthorizedRequestConfig({}).headers;
|
|
@@ -64784,6 +66096,13 @@ class DxSaasService {
|
|
|
64784
66096
|
}
|
|
64785
66097
|
});
|
|
64786
66098
|
}
|
|
66099
|
+
/**
|
|
66100
|
+
* POST to an ACC path.
|
|
66101
|
+
* @param path - Path segment appended after `.../acc/`.
|
|
66102
|
+
* @param body - Request body.
|
|
66103
|
+
* @param params - Query-string parameters.
|
|
66104
|
+
* @param extraHeaders - Additional request headers.
|
|
66105
|
+
*/
|
|
64787
66106
|
async accPost(path, body, params, extraHeaders) {
|
|
64788
66107
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/acc/${path}`;
|
|
64789
66108
|
const headers = this.createUserAuthorizedRequestConfig({}).headers;
|
|
@@ -64823,6 +66142,12 @@ class DxSaasService {
|
|
|
64823
66142
|
return {};
|
|
64824
66143
|
}
|
|
64825
66144
|
}
|
|
66145
|
+
/**
|
|
66146
|
+
* GET from a Dashboard (Grafana) path under `.../dxd/`.
|
|
66147
|
+
* @param path - Path segment appended after `.../dxd/`.
|
|
66148
|
+
* @param params - Query-string parameters.
|
|
66149
|
+
* @param extraHeaders - Additional request headers.
|
|
66150
|
+
*/
|
|
64826
66151
|
async dashboardGet(path, params, extraHeaders) {
|
|
64827
66152
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/dxd/${path}`;
|
|
64828
66153
|
const headers = this.createDashboardAuthorizedRequestHeaders();
|
|
@@ -64852,6 +66177,12 @@ class DxSaasService {
|
|
|
64852
66177
|
}
|
|
64853
66178
|
});
|
|
64854
66179
|
}
|
|
66180
|
+
/**
|
|
66181
|
+
* DELETE from a Dashboard (Grafana) path under `.../dxd/`.
|
|
66182
|
+
* @param path - Path segment appended after `.../dxd/`.
|
|
66183
|
+
* @param params - Query-string parameters.
|
|
66184
|
+
* @param extraHeaders - Additional request headers.
|
|
66185
|
+
*/
|
|
64855
66186
|
async dashboardDelete(path, params, extraHeaders) {
|
|
64856
66187
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/dxd/${path}`;
|
|
64857
66188
|
const headers = this.createDashboardAuthorizedRequestHeaders();
|
|
@@ -64881,6 +66212,10 @@ class DxSaasService {
|
|
|
64881
66212
|
}
|
|
64882
66213
|
});
|
|
64883
66214
|
}
|
|
66215
|
+
/**
|
|
66216
|
+
* POST to a Dashboard path using cookie-based (anonymous) auth instead of the bearer token.
|
|
66217
|
+
* Used for Grafana endpoints that authenticate via session cookies.
|
|
66218
|
+
*/
|
|
64884
66219
|
async dashboardCookiePost(path, body, params, extraHeaders) {
|
|
64885
66220
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/dxd/${path}`;
|
|
64886
66221
|
const headers = {};
|
|
@@ -64912,6 +66247,13 @@ class DxSaasService {
|
|
|
64912
66247
|
}
|
|
64913
66248
|
});
|
|
64914
66249
|
}
|
|
66250
|
+
/**
|
|
66251
|
+
* POST to a Dashboard (Grafana) path under `.../dxd/`.
|
|
66252
|
+
* @param path - Path segment appended after `.../dxd/`.
|
|
66253
|
+
* @param body - Request body.
|
|
66254
|
+
* @param params - Query-string parameters.
|
|
66255
|
+
* @param extraHeaders - Additional request headers.
|
|
66256
|
+
*/
|
|
64915
66257
|
async dashboardPost(path, body, params, extraHeaders) {
|
|
64916
66258
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/dxd/${path}`;
|
|
64917
66259
|
const headers = this.createDashboardAuthorizedRequestHeaders();
|
|
@@ -64942,6 +66284,13 @@ class DxSaasService {
|
|
|
64942
66284
|
}
|
|
64943
66285
|
});
|
|
64944
66286
|
}
|
|
66287
|
+
/**
|
|
66288
|
+
* PUT to a Dashboard (Grafana) path under `.../dxd/`.
|
|
66289
|
+
* @param path - Path segment appended after `.../dxd/`.
|
|
66290
|
+
* @param body - Request body.
|
|
66291
|
+
* @param params - Query-string parameters.
|
|
66292
|
+
* @param extraHeaders - Additional request headers.
|
|
66293
|
+
*/
|
|
64945
66294
|
async dashboardPut(path, body, params, extraHeaders) {
|
|
64946
66295
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/dxd/${path}`;
|
|
64947
66296
|
const headers = this.createDashboardAuthorizedRequestHeaders();
|
|
@@ -65056,26 +66405,31 @@ class DxoiService {
|
|
|
65056
66405
|
constructor(dxSaaSService) {
|
|
65057
66406
|
this.dxSaaSService = dxSaaSService;
|
|
65058
66407
|
}
|
|
66408
|
+
/** Returns top-level OI services using the default service request body. */
|
|
65059
66409
|
getServices() {
|
|
65060
66410
|
const filterBody = OIService.DEFAULT_SERVICE_REQUEST_BODY;
|
|
65061
66411
|
return this.dxSaaSService.oiPost('oi/v2/servicerepo/services', filterBody);
|
|
65062
66412
|
}
|
|
66413
|
+
/** Returns cluster alarms (situations) within the given time range. */
|
|
65063
66414
|
async getSituations(startTime, endTime) {
|
|
65064
66415
|
const alarmRequestBody = DEFAULT_SITUATIONS_REQUEST_BODY;
|
|
65065
66416
|
alarmRequestBody.timeFrom = startTime.toMillis();
|
|
65066
66417
|
alarmRequestBody.timeTo = endTime.toMillis();
|
|
65067
66418
|
return this.dxSaaSService.oiPost('oi/v2/api/clusteralarms/_search', alarmRequestBody);
|
|
65068
66419
|
}
|
|
66420
|
+
/** Returns the entity-detail attributes for a given entity external ID. */
|
|
65069
66421
|
async getEntityAttributes(entityExternalId) {
|
|
65070
66422
|
return this.dxSaaSService.oiPost('oi/v3/api/inventory/entity-details', {
|
|
65071
66423
|
externalId: entityExternalId,
|
|
65072
66424
|
});
|
|
65073
66425
|
}
|
|
66426
|
+
/** Returns a single alarm by its ID. */
|
|
65074
66427
|
async getAlarm(alarmId) {
|
|
65075
66428
|
return this.dxSaaSService.oiGet('oi/v2/api/alarms/_search', {
|
|
65076
66429
|
alarmId: alarmId,
|
|
65077
66430
|
});
|
|
65078
66431
|
}
|
|
66432
|
+
/** Returns the lifecycle event history for a given alarm ID. */
|
|
65079
66433
|
async getAlarmLifeCycle(alarmId) {
|
|
65080
66434
|
const alarmLifeCycleRequestBody = {
|
|
65081
66435
|
alarmId: alarmId,
|
|
@@ -65091,6 +66445,7 @@ class DxoiService {
|
|
|
65091
66445
|
};
|
|
65092
66446
|
return this.dxSaaSService.oiPost('oi/v2/api/alarms/lifecycle/_search', alarmLifeCycleRequestBody);
|
|
65093
66447
|
}
|
|
66448
|
+
/** Returns all alarms in a time range, paginating until the full count is fetched. */
|
|
65094
66449
|
async getAlarms(startTime, endTime) {
|
|
65095
66450
|
const alarmRequestBody = DEFAULT_ALARMS_REQUEST_BODY;
|
|
65096
66451
|
alarmRequestBody.timeFrom = startTime.toMillis();
|
|
@@ -65132,6 +66487,7 @@ class EventService {
|
|
|
65132
66487
|
this.dxSaaSService = dxSaaSService;
|
|
65133
66488
|
this.log = log;
|
|
65134
66489
|
}
|
|
66490
|
+
/** Ingests a custom alarm event via the Jarvis ingestion API. */
|
|
65135
66491
|
createAlarm(alarmEvent) {
|
|
65136
66492
|
const ingestionBody = {
|
|
65137
66493
|
documents: [
|
|
@@ -65152,6 +66508,7 @@ class EventService {
|
|
|
65152
66508
|
index_name: 'ao_itoa_alarms_custom_1',
|
|
65153
66509
|
});
|
|
65154
66510
|
}
|
|
66511
|
+
/** Ingests a custom event (non-change) via the Jarvis ingestion API. */
|
|
65155
66512
|
createEvent(changeEvent) {
|
|
65156
66513
|
const ingestionBody = {
|
|
65157
66514
|
documents: [
|
|
@@ -65172,6 +66529,7 @@ class EventService {
|
|
|
65172
66529
|
index_name: 'ao_itoa_events_custom_1',
|
|
65173
66530
|
});
|
|
65174
66531
|
}
|
|
66532
|
+
/** Ingests a custom change event via the Jarvis ingestion API. */
|
|
65175
66533
|
createChangeEvent(changeEvent) {
|
|
65176
66534
|
const ingestionBody = {
|
|
65177
66535
|
documents: [
|
|
@@ -65192,6 +66550,7 @@ class EventService {
|
|
|
65192
66550
|
index_name: 'ao_itoa_events_change_custom_1',
|
|
65193
66551
|
});
|
|
65194
66552
|
}
|
|
66553
|
+
/** Queries change events using a Lucene query string within a time range. */
|
|
65195
66554
|
queryChangeEvents(luceneQuery, startTime, endTime, from = 0, size = 100) {
|
|
65196
66555
|
return this.dxSaaSService.oiGet('oi/v2/aoanalytics/events/events_change_custom/_search', {
|
|
65197
66556
|
q: luceneQuery,
|
|
@@ -65218,6 +66577,7 @@ class ExperienceService {
|
|
|
65218
66577
|
this.dxSaaSService = dxSaaSService;
|
|
65219
66578
|
this.log = log;
|
|
65220
66579
|
}
|
|
66580
|
+
/** Returns a map of experience name → latest experience settings (one entry per name). */
|
|
65221
66581
|
async getLatestExperienceSettings() {
|
|
65222
66582
|
const experienceSettings = await this.getExperienceSettings();
|
|
65223
66583
|
const nameExperienceSettingsMap = new Map();
|
|
@@ -65228,6 +66588,7 @@ class ExperienceService {
|
|
|
65228
66588
|
});
|
|
65229
66589
|
return nameExperienceSettingsMap;
|
|
65230
66590
|
}
|
|
66591
|
+
/** Returns a map of experience ID → latest experience settings (one entry per ID). */
|
|
65231
66592
|
async getLatestExperienceSettingsById() {
|
|
65232
66593
|
const experienceSettings = await this.getExperienceSettings();
|
|
65233
66594
|
const idExperienceSettingsMap = new Map();
|
|
@@ -65238,9 +66599,11 @@ class ExperienceService {
|
|
|
65238
66599
|
});
|
|
65239
66600
|
return idExperienceSettingsMap;
|
|
65240
66601
|
}
|
|
66602
|
+
/** Returns all raw experience settings items from the API. */
|
|
65241
66603
|
async getExperienceSettings() {
|
|
65242
66604
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/settings/experience');
|
|
65243
66605
|
}
|
|
66606
|
+
/** Returns a single experience settings record by its ID; throws if not found. */
|
|
65244
66607
|
async getExperienceSettingsById(experienceId) {
|
|
65245
66608
|
const experiencesById = await this.getLatestExperienceSettingsById();
|
|
65246
66609
|
if (experiencesById.has(experienceId)) {
|
|
@@ -65250,6 +66613,7 @@ class ExperienceService {
|
|
|
65250
66613
|
throw new Error(`Experience ${experienceId} not found.`);
|
|
65251
66614
|
}
|
|
65252
66615
|
}
|
|
66616
|
+
/** Returns top-level experience data for all configured experiences in a time range. */
|
|
65253
66617
|
async getTopLevelExperiences(startTime, endTime) {
|
|
65254
66618
|
const latestExperienceSettings = await this.getLatestExperienceSettings();
|
|
65255
66619
|
const dashboardExperienceRequestItems = new Array();
|
|
@@ -65270,10 +66634,12 @@ class ExperienceService {
|
|
|
65270
66634
|
};
|
|
65271
66635
|
return this.dxSaaSService.tenantPost('/atc/dashboard/experience', request);
|
|
65272
66636
|
}
|
|
66637
|
+
/** Returns drilldown experience data filtered by the given attribute values. */
|
|
65273
66638
|
async getDrilldownExperiences(experienceId, drilldown, startTime, endTime) {
|
|
65274
66639
|
const experienceSettings = await this.getExperienceSettingsById(experienceId);
|
|
65275
66640
|
return this.dxSaaSService.tenantPost('/atc/dashboard/application', this.createDrilldownExperienceRequestBody(experienceSettings, drilldown, startTime, endTime));
|
|
65276
66641
|
}
|
|
66642
|
+
/** Returns experience data for a single experience ID in a time range. */
|
|
65277
66643
|
async getExperiences(experienceId, startTime, endTime) {
|
|
65278
66644
|
const experienceSettings = await this.getExperienceSettingsById(experienceId);
|
|
65279
66645
|
return this.dxSaaSService.tenantPost('/atc/dashboard/application', this.createExperienceRequestBody(experienceSettings, startTime, endTime));
|
|
@@ -65313,9 +66679,11 @@ class ExperienceService {
|
|
|
65313
66679
|
throw new Error('drilldown has more layers than experience has groupings');
|
|
65314
66680
|
}
|
|
65315
66681
|
}
|
|
66682
|
+
/** Imports (creates) an experience settings record from a partial payload. */
|
|
65316
66683
|
async importExperience(experience) {
|
|
65317
66684
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/settings/experience', experience);
|
|
65318
66685
|
}
|
|
66686
|
+
/** Creates a new experience settings definition with the given name, universe, and group attributes. */
|
|
65319
66687
|
async createExperience(experienceName, universeId, groupAttributes, graphType, owner) {
|
|
65320
66688
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/settings/experience', {
|
|
65321
66689
|
type: 'experience',
|
|
@@ -65329,6 +66697,7 @@ class ExperienceService {
|
|
|
65329
66697
|
},
|
|
65330
66698
|
});
|
|
65331
66699
|
}
|
|
66700
|
+
/** Deletes an experience settings definition by its ID. */
|
|
65332
66701
|
async deleteExperience(experienceId) {
|
|
65333
66702
|
return this.dxSaaSService.tenantDelete(`/apm/atc/api/private/settings/experience/${experienceId}`);
|
|
65334
66703
|
}
|
|
@@ -67985,9 +69354,11 @@ class GraphService {
|
|
|
67985
69354
|
constructor(dxSaaSService) {
|
|
67986
69355
|
this.dxSaaSService = dxSaaSService;
|
|
67987
69356
|
}
|
|
69357
|
+
/** Stores a graph (vertices and edges) using the appmap ATS graph store endpoint. */
|
|
67988
69358
|
async storeGraph(graphBody) {
|
|
67989
69359
|
return this.dxSaaSService.tenantPost('/apm/appmap/ats/graph/store', graphBody);
|
|
67990
69360
|
}
|
|
69361
|
+
/** Returns an HTTP stream of the graph range (diff between two times) for a universe. */
|
|
67991
69362
|
retrieveGraphRangeStream(universeId, startDateTime, endDateTime, layer = GraphLayer$1.INFRASTRUCTURE) {
|
|
67992
69363
|
const graphRangeRequestParams = {
|
|
67993
69364
|
endTime: endDateTime.toISO(),
|
|
@@ -68004,6 +69375,7 @@ class GraphService {
|
|
|
68004
69375
|
};
|
|
68005
69376
|
return this.dxSaaSService.tenantPostForStream('/apm/atc/api/private/graph/range', graphRangeRequestBody, graphRangeRequestParams);
|
|
68006
69377
|
}
|
|
69378
|
+
/** Returns an HTTP stream of the full graph for a universe and layer. */
|
|
68007
69379
|
retrieveGraphStream(universeId, layer = GraphLayer$1.ATC) {
|
|
68008
69380
|
const graphRequestBody = {
|
|
68009
69381
|
includedVertices: [],
|
|
@@ -68014,6 +69386,7 @@ class GraphService {
|
|
|
68014
69386
|
};
|
|
68015
69387
|
return this.dxSaaSService.tenantPostForStream('/apm/atc/api/private/graph/', graphRequestBody, { universeId: universeId, layer: 'ATC' });
|
|
68016
69388
|
}
|
|
69389
|
+
/** Collects all edges and vertices from a graph stream into a `GraphElements` result. */
|
|
68017
69390
|
async getGraphElementsFromStream(graphStream) {
|
|
68018
69391
|
const graphElementMaps = await this.getGraphElementMapsFromStream(graphStream);
|
|
68019
69392
|
return {
|
|
@@ -68021,6 +69394,7 @@ class GraphService {
|
|
|
68021
69394
|
vertices: Array.from(graphElementMaps.vertices.values()),
|
|
68022
69395
|
};
|
|
68023
69396
|
}
|
|
69397
|
+
/** Collects all edges and vertices from a graph stream into keyed maps. */
|
|
68024
69398
|
async getGraphElementMapsFromStream(graphStream) {
|
|
68025
69399
|
const edges = new Map();
|
|
68026
69400
|
const nodes = new Map();
|
|
@@ -68033,6 +69407,7 @@ class GraphService {
|
|
|
68033
69407
|
await this.processGraphStreamWithHandlers(graphStream, r1EdgeHandler, r1NodeHandler);
|
|
68034
69408
|
return { edges: edges, vertices: nodes };
|
|
68035
69409
|
}
|
|
69410
|
+
/** Processes a graph stream, dispatching each edge/vertex to the provided handler callbacks. */
|
|
68036
69411
|
processGraphStreamWithHandlers(graphStream, edgeHandler, vertexHandler) {
|
|
68037
69412
|
const edgePipeline = chain$1([
|
|
68038
69413
|
graphStream,
|
|
@@ -68068,6 +69443,7 @@ class GraphService {
|
|
|
68068
69443
|
edgePipeline.on('error', (error) => reject(error));
|
|
68069
69444
|
});
|
|
68070
69445
|
}
|
|
69446
|
+
/** Processes a graph stream, emitting each edge/vertex to the provided RxJS subjects. */
|
|
68071
69447
|
processGraphStream(graphStream, edgeSubject, vertexSubject, layer = GraphLayer$1.ATC) {
|
|
68072
69448
|
const edgePipeline = chain$1([
|
|
68073
69449
|
graphStream,
|
|
@@ -68096,8 +69472,8 @@ class GraphService {
|
|
|
68096
69472
|
}
|
|
68097
69473
|
|
|
68098
69474
|
/**
|
|
68099
|
-
* Service for
|
|
68100
|
-
*
|
|
69475
|
+
* Service for entity inventory: search, lookup, inventorize configuration
|
|
69476
|
+
* management, and related metric retrieval across the OI topology.
|
|
68101
69477
|
*/
|
|
68102
69478
|
class InventoryService {
|
|
68103
69479
|
dxSaaSService;
|
|
@@ -68115,16 +69491,19 @@ class InventoryService {
|
|
|
68115
69491
|
this.dxTASService = dxTASService;
|
|
68116
69492
|
this.log = log;
|
|
68117
69493
|
}
|
|
69494
|
+
/** Lists all inventorize (topology creator) rule configurations. */
|
|
68118
69495
|
async listInventorizeConfigurations() {
|
|
68119
69496
|
return this.dxSaaSService
|
|
68120
69497
|
.oiGet('oi/v2/topologycreator/rules/list')
|
|
68121
69498
|
.then((response) => response.config);
|
|
68122
69499
|
}
|
|
69500
|
+
/** Creates (saves) a new inventorize rule configuration. */
|
|
68123
69501
|
async createInventorizeConfiguration(inventorizeConfiguration) {
|
|
68124
69502
|
return this.dxSaaSService.oiPost('oi/v2/topologycreator/rules/save', {
|
|
68125
69503
|
config: [inventorizeConfiguration],
|
|
68126
69504
|
});
|
|
68127
69505
|
}
|
|
69506
|
+
/** Previews the entities that would be created by an inventorize configuration. */
|
|
68128
69507
|
async previewInventorizeConfiguration(inventorizeConfiguration) {
|
|
68129
69508
|
const body = {
|
|
68130
69509
|
config: [inventorizeConfiguration],
|
|
@@ -68132,14 +69511,17 @@ class InventoryService {
|
|
|
68132
69511
|
console.log(JSON.stringify(body, null, 2));
|
|
68133
69512
|
return this.dxSaaSService.oiPost('oi/v2/topologycreator/rules/preview', body);
|
|
68134
69513
|
}
|
|
69514
|
+
/** Deletes an existing inventorize rule configuration. */
|
|
68135
69515
|
async deleteInventorizeConfiguration(inventorizeConfiguration) {
|
|
68136
69516
|
return this.dxSaaSService.oiPost('oi/v2/topologycreator/rules/delete', {
|
|
68137
69517
|
config: [inventorizeConfiguration],
|
|
68138
69518
|
});
|
|
68139
69519
|
}
|
|
69520
|
+
/** Performs an inventory lookup using a structured lookup request. */
|
|
68140
69521
|
async lookupInventory(lookupRequest) {
|
|
68141
69522
|
return this.dxSaaSService.oiPost('oi/v2/api/maintenance/inventory/_search', lookupRequest);
|
|
68142
69523
|
}
|
|
69524
|
+
/** Returns the distinct list of `product` attribute values present in the topology. */
|
|
68143
69525
|
async listInventorySources() {
|
|
68144
69526
|
const productAttributeTASQuery = {
|
|
68145
69527
|
filter: {
|
|
@@ -68158,13 +69540,16 @@ class InventoryService {
|
|
|
68158
69540
|
const tasQueryResult = await this.dxTASService.executeQuery(productAttributeTASQuery);
|
|
68159
69541
|
return tasQueryResult.analytics[0].values.map((value) => value.attribValue);
|
|
68160
69542
|
}
|
|
69543
|
+
/** Searches the OI v3 inventory using a structured search request body. */
|
|
68161
69544
|
async searchInventory(inventorySearchRequestBody) {
|
|
68162
69545
|
this.log.debug('searching inventory');
|
|
68163
69546
|
return this.dxSaaSService.oiPost('oi/v3/api/inventory/_search', inventorySearchRequestBody);
|
|
68164
69547
|
}
|
|
69548
|
+
/** Returns available attribute names for a given inventory attribute request. */
|
|
68165
69549
|
async getAttributes(attributeRequest) {
|
|
68166
69550
|
return this.dxSaaSService.oiPost('oi/v3/queryTas/attributeNames', attributeRequest);
|
|
68167
69551
|
}
|
|
69552
|
+
/** Returns a map of externalId → registered metrics for the given entity IDs. */
|
|
68168
69553
|
async getRelatedMetrics(externalIds) {
|
|
68169
69554
|
const topoMetadataResults = (await this.dxNASSService.query({
|
|
68170
69555
|
query: [
|
|
@@ -68236,9 +69621,11 @@ class JsExtensionService {
|
|
|
68236
69621
|
this.dxSaaSService = dxSaaSService;
|
|
68237
69622
|
this.log = log;
|
|
68238
69623
|
}
|
|
69624
|
+
/** Returns all JavaScript extensions registered for the tenant. */
|
|
68239
69625
|
getJSExtensions() {
|
|
68240
69626
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/em/extensions');
|
|
68241
69627
|
}
|
|
69628
|
+
/** Disables a JavaScript extension by name and file size. */
|
|
68242
69629
|
disableJSExtension(name, size) {
|
|
68243
69630
|
const base64name = Buffer.from(name).toString('base64');
|
|
68244
69631
|
const disableBody = {
|
|
@@ -68251,6 +69638,7 @@ class JsExtensionService {
|
|
|
68251
69638
|
this.log.debug(`disabling js extension ${name}`);
|
|
68252
69639
|
return this.dxSaaSService.tenantPut(`/apm/atc/api/private/em/extensions/${base64name}`, disableBody);
|
|
68253
69640
|
}
|
|
69641
|
+
/** Enables a previously disabled JavaScript extension by name and file size. */
|
|
68254
69642
|
enableJSExtension(name, size) {
|
|
68255
69643
|
const base64name = Buffer.from(name).toString('base64');
|
|
68256
69644
|
const enableBody = {
|
|
@@ -68262,12 +69650,14 @@ class JsExtensionService {
|
|
|
68262
69650
|
};
|
|
68263
69651
|
return this.dxSaaSService.tenantPut(`/apm/atc/api/private/em/extensions/${base64name}`, enableBody);
|
|
68264
69652
|
}
|
|
69653
|
+
/** Deletes a JavaScript extension by name. */
|
|
68265
69654
|
deleteJSExtension(name) {
|
|
68266
69655
|
const base64name = Buffer.from(name).toString('base64');
|
|
68267
69656
|
return (this.dxSaaSService.tenantDelete(`/apm/atc/api/private/em/extensions/${base64name}`, {
|
|
68268
69657
|
extensionDisabled: false,
|
|
68269
69658
|
}));
|
|
68270
69659
|
}
|
|
69660
|
+
/** Uploads and creates a new JavaScript extension from a local source file. */
|
|
68271
69661
|
createJSExtension(scriptName, sourcefile) {
|
|
68272
69662
|
const fsize = fs$1.statSync(sourcefile).size;
|
|
68273
69663
|
const jsStream = fs$1.createReadStream(sourcefile);
|
|
@@ -68290,6 +69680,7 @@ class LogsService {
|
|
|
68290
69680
|
constructor(dxSaasService) {
|
|
68291
69681
|
this.dxSaasService = dxSaasService;
|
|
68292
69682
|
}
|
|
69683
|
+
/** Executes a log query against the OI log analytics filter API. */
|
|
68293
69684
|
queryLogs(logQueryBody) {
|
|
68294
69685
|
return this.dxSaasService.oiPost('oi/loganalytics/v1/api/logs/filter', logQueryBody);
|
|
68295
69686
|
}
|
|
@@ -68305,6 +69696,7 @@ class ManagementModuleService {
|
|
|
68305
69696
|
constructor(dxSaaSService) {
|
|
68306
69697
|
this.dxSaaSService = dxSaaSService;
|
|
68307
69698
|
}
|
|
69699
|
+
/** Returns all management modules for the tenant (up to 500). */
|
|
68308
69700
|
retrieveManagementModules() {
|
|
68309
69701
|
return this.dxSaaSService.tenantPost('atc/private/internal/module/query', ManagementModuleService.createManagementModuleListRequestBody());
|
|
68310
69702
|
}
|
|
@@ -68314,6 +69706,7 @@ class ManagementModuleService {
|
|
|
68314
69706
|
offset: offset ?? 0,
|
|
68315
69707
|
};
|
|
68316
69708
|
}
|
|
69709
|
+
/** Returns all calculators associated with a management module. */
|
|
68317
69710
|
getManagementModuleCalculators(managementModuleId) {
|
|
68318
69711
|
return this.dxSaaSService
|
|
68319
69712
|
.tenantPost('atc/private/internal/calculator/query', {
|
|
@@ -68325,25 +69718,30 @@ class ManagementModuleService {
|
|
|
68325
69718
|
return response.items || [];
|
|
68326
69719
|
});
|
|
68327
69720
|
}
|
|
69721
|
+
/** Creates a new calculator (strips ID if present before sending). */
|
|
68328
69722
|
createCalculator(calculator) {
|
|
68329
69723
|
if (calculator.id) {
|
|
68330
69724
|
delete calculator.id;
|
|
68331
69725
|
}
|
|
68332
69726
|
return this.dxSaaSService.tenantPost('atc/private/internal/calculator', calculator);
|
|
68333
69727
|
}
|
|
69728
|
+
/** Finds a management module by its exact ID; returns `undefined` if not found. */
|
|
68334
69729
|
getManagementModuleById(id) {
|
|
68335
69730
|
return this.retrieveManagementModules().then((managementModulesList) => {
|
|
68336
69731
|
return managementModulesList.items.find((mgmtModule) => mgmtModule.id === id);
|
|
68337
69732
|
});
|
|
68338
69733
|
}
|
|
69734
|
+
/** Imports an existing management module object (creates it on the target tenant). */
|
|
68339
69735
|
importManagementModule(managementModule) {
|
|
68340
69736
|
return this.dxSaaSService.tenantPost('atc/private/internal/module', managementModule);
|
|
68341
69737
|
}
|
|
69738
|
+
/** Deletes a management module by its ID. */
|
|
68342
69739
|
deleteManagementModule(managementModuleId) {
|
|
68343
69740
|
return this.dxSaaSService.tenantPost('atc/private/internal/module/delete', {
|
|
68344
69741
|
itemId: managementModuleId,
|
|
68345
69742
|
});
|
|
68346
69743
|
}
|
|
69744
|
+
/** Creates a new management module with the given name, description, active flag, and agent expressions. */
|
|
68347
69745
|
createManagementModule(name, description, active, agentExpressions) {
|
|
68348
69746
|
return this.dxSaaSService.tenantPost('atc/private/internal/module', ManagementModuleService.createManagementModuleCreateRequestBody(name, description, active, agentExpressions));
|
|
68349
69747
|
}
|
|
@@ -68355,6 +69753,7 @@ class ManagementModuleService {
|
|
|
68355
69753
|
agentExpressions: agentExpressions,
|
|
68356
69754
|
};
|
|
68357
69755
|
}
|
|
69756
|
+
/** Copies an existing management module to a new one with an optional new name/description/active state. */
|
|
68358
69757
|
copyManagementModule(targetManagementModuleId, newManagementModuleName, description, active) {
|
|
68359
69758
|
return this.getManagementModuleById(targetManagementModuleId).then((mgmtModule) => {
|
|
68360
69759
|
if (!mgmtModule) {
|
|
@@ -68363,6 +69762,7 @@ class ManagementModuleService {
|
|
|
68363
69762
|
return this.createManagementModule(newManagementModuleName, description ? description : mgmtModule.description, active == null ? mgmtModule.active : active, mgmtModule.agentExpressions);
|
|
68364
69763
|
});
|
|
68365
69764
|
}
|
|
69765
|
+
/** Updates fields on an existing management module; `null` values leave the field unchanged. */
|
|
68366
69766
|
updateManagementModule(id, managementModuleName, description, active, agentExpressions) {
|
|
68367
69767
|
return this.getManagementModuleById(id).then((mgmtModule) => {
|
|
68368
69768
|
if (!mgmtModule) {
|
|
@@ -68371,6 +69771,7 @@ class ManagementModuleService {
|
|
|
68371
69771
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/module', this.createManagementModuleUpdateRequestBody(mgmtModule, id, managementModuleName, description, active, agentExpressions));
|
|
68372
69772
|
});
|
|
68373
69773
|
}
|
|
69774
|
+
/** Builds an update request body by applying changed fields to the existing module. */
|
|
68374
69775
|
createManagementModuleUpdateRequestBody(originalMgmtModule, id, name, description, active, agentExpressions) {
|
|
68375
69776
|
if (active !== null) {
|
|
68376
69777
|
originalMgmtModule['active'] = active;
|
|
@@ -68406,12 +69807,15 @@ class MetricBatchService {
|
|
|
68406
69807
|
this.log = log;
|
|
68407
69808
|
MetricBatchService.staticLog = this.log;
|
|
68408
69809
|
}
|
|
69810
|
+
/** Retrieves a metric batch using a metric grouping and management module agent expressions. */
|
|
68409
69811
|
retrieveMetricsBatch(metricGrouping, managementModule) {
|
|
68410
69812
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/metric/batch', MetricBatchService.createMetricBatchRequestRequestBody(metricGrouping, managementModule));
|
|
68411
69813
|
}
|
|
69814
|
+
/** Retrieves a metric batch using explicit time range and frequency parameters. */
|
|
68412
69815
|
retrieveSimpleMetricsBatch(metricGrouping, endTime, range, frequency) {
|
|
68413
69816
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/metric/batch', MetricBatchService.createSimpleMetricBatchRequestRequestBody(metricGrouping, endTime, range, frequency));
|
|
68414
69817
|
}
|
|
69818
|
+
/** Returns the metric attributes for a full metric path (must start with `SuperDomain` and include `:metricName`). */
|
|
68415
69819
|
getMetricAttributesForFullMetricPath(fullMetricPath, metricUniverse) {
|
|
68416
69820
|
if (fullMetricPath.indexOf(':') < 0 ||
|
|
68417
69821
|
!fullMetricPath.startsWith('SuperDomain')) {
|
|
@@ -68439,16 +69843,20 @@ class MetricBatchService {
|
|
|
68439
69843
|
}
|
|
68440
69844
|
});
|
|
68441
69845
|
}
|
|
69846
|
+
/** Executes a vertex metric query for a given time range. */
|
|
68442
69847
|
async executeVertexMetricQuery(metricQueryReq, startTime, endTime) {
|
|
68443
69848
|
// metricQueryReq.queryRange = InputTimeParsing.getVertexMetricQueryTimeParameters(startTime.toMillis(), endTime.toMillis());
|
|
68444
69849
|
return this.dxSaaSService.tenantPost('/atc/private/internal/metrics/queryMetric', metricQueryReq, { ignoreUniverse: true });
|
|
68445
69850
|
}
|
|
69851
|
+
/** @deprecated No-op placeholder; returns `this`. */
|
|
68446
69852
|
getMetricIdForPathNew() {
|
|
68447
69853
|
return this;
|
|
68448
69854
|
}
|
|
69855
|
+
/** Returns the metric tree for a given metric resource path and universe. */
|
|
68449
69856
|
getMetricIdForPath(metricResourcePath, universeId) {
|
|
68450
69857
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/metrictree/query', MetricBatchService.createMetricTreeRequestBody(metricResourcePath, universeId));
|
|
68451
69858
|
}
|
|
69859
|
+
/** Returns metric attributes and their values for a metric tree ID over a time window. */
|
|
68452
69860
|
getMetricAttributesAndValues(metricTreeId, endTime, frequency, rangeSize) {
|
|
68453
69861
|
return this.dxSaaSService
|
|
68454
69862
|
.tenantPost('/metrics/queryMetric', MetricBatchService.getMetricAttributeQueryBody(metricTreeId, endTime, frequency, rangeSize))
|
|
@@ -68462,6 +69870,7 @@ class MetricBatchService {
|
|
|
68462
69870
|
}
|
|
68463
69871
|
});
|
|
68464
69872
|
}
|
|
69873
|
+
/** Returns only the metric attribute keys (no values) for a metric tree ID. */
|
|
68465
69874
|
getMetricAttributes(metricTreeId) {
|
|
68466
69875
|
return this.dxSaaSService
|
|
68467
69876
|
.tenantPost('/metrics/queryMetric', MetricBatchService.getMetricAttributeQueryBody(metricTreeId))
|
|
@@ -68619,9 +70028,11 @@ class MetricGroupingService {
|
|
|
68619
70028
|
this.log = log;
|
|
68620
70029
|
MetricGroupingService.staticLog = this.log;
|
|
68621
70030
|
}
|
|
70031
|
+
/** Creates a new metric grouping using the v2 internal API. */
|
|
68622
70032
|
async createMetricGroupingV2(metricGrouping) {
|
|
68623
70033
|
return await this.dxSaaSService.tenantPost('atc/private/internal/grouping', metricGrouping);
|
|
68624
70034
|
}
|
|
70035
|
+
/** Creates a new metric grouping using the legacy API, resolving the management module first. */
|
|
68625
70036
|
async createMetricGrouping(managementModuleId, metricGroupingName, metricGroupingExpressions, description, useManagementModuleAgentExpression, active, editable) {
|
|
68626
70037
|
const managementModule = await this.managementModuleService.getManagementModuleById(managementModuleId);
|
|
68627
70038
|
if (!managementModule) {
|
|
@@ -68637,6 +70048,7 @@ class MetricGroupingService {
|
|
|
68637
70048
|
editable: editable,
|
|
68638
70049
|
});
|
|
68639
70050
|
}
|
|
70051
|
+
/** Returns a single metric grouping by full ID (resolves management module from ID prefix). */
|
|
68640
70052
|
retrieveMetricGrouping(metricGroupingId) {
|
|
68641
70053
|
const mgParts = metricGroupingId.split(':');
|
|
68642
70054
|
const mgmtModuleId = mgParts[0] + ':' + mgParts[1];
|
|
@@ -68653,12 +70065,14 @@ class MetricGroupingService {
|
|
|
68653
70065
|
}
|
|
68654
70066
|
});
|
|
68655
70067
|
}
|
|
70068
|
+
/** Returns a single metric grouping (v2) by ID with usage info. */
|
|
68656
70069
|
async getMetricGroupingV2(metricGroupingId, managementModuleId) {
|
|
68657
70070
|
return this.dxSaaSService.tenantPost('atc/private/internal/grouping/get', {
|
|
68658
70071
|
mmId: managementModuleId,
|
|
68659
70072
|
itemId: metricGroupingId,
|
|
68660
70073
|
}, { includeUsage: true });
|
|
68661
70074
|
}
|
|
70075
|
+
/** Returns all metric groupings (v2) for a management module with usage info. */
|
|
68662
70076
|
async retrieveMetricGroupingsV2(managementModuleId) {
|
|
68663
70077
|
const managementModule = await this.managementModuleService.getManagementModuleById(managementModuleId);
|
|
68664
70078
|
if (!managementModule) {
|
|
@@ -68671,6 +70085,7 @@ class MetricGroupingService {
|
|
|
68671
70085
|
includeUsage: true,
|
|
68672
70086
|
});
|
|
68673
70087
|
}
|
|
70088
|
+
/** Returns all metric groupings for a management module using the legacy API. */
|
|
68674
70089
|
retrieveMetricGroupings(managementModuleId, offset) {
|
|
68675
70090
|
return this.managementModuleService
|
|
68676
70091
|
.getManagementModuleById(managementModuleId)
|
|
@@ -68714,6 +70129,7 @@ class NASSService {
|
|
|
68714
70129
|
this.dxSaaSService = dxSaaSService;
|
|
68715
70130
|
this.log = log;
|
|
68716
70131
|
}
|
|
70132
|
+
/** Registers one or more metrics in the NASS metadata store. */
|
|
68717
70133
|
async registerMetrics(metricRegistrations) {
|
|
68718
70134
|
const metricRegistrationBody = {
|
|
68719
70135
|
metrics: metricRegistrations,
|
|
@@ -68734,6 +70150,7 @@ class NASSService {
|
|
|
68734
70150
|
};
|
|
68735
70151
|
}
|
|
68736
70152
|
}
|
|
70153
|
+
/** Returns metric metadata for a list of metric IDs. */
|
|
68737
70154
|
async queryMetadataByIDs(ids) {
|
|
68738
70155
|
const metadataQuery = {
|
|
68739
70156
|
specifier: {
|
|
@@ -68743,6 +70160,7 @@ class NASSService {
|
|
|
68743
70160
|
};
|
|
68744
70161
|
return this.dxSaaSService.tenantPost('/metadata/queryMetric', metadataQuery);
|
|
68745
70162
|
}
|
|
70163
|
+
/** Queries metric time-series data for a source/attribute specifier over a time range. */
|
|
68746
70164
|
async queryMetricData(sourceName, sourceOpType, attributeName, attributeOpType, endTimeEpochSeconds, rangeInSeconds, frequency, clampSize = 500) {
|
|
68747
70165
|
const metricDataQuery = {
|
|
68748
70166
|
querySpecifier: {
|
|
@@ -68760,6 +70178,7 @@ class NASSService {
|
|
|
68760
70178
|
this.log.debug(JSON.stringify(metricDataQuery, null, 2));
|
|
68761
70179
|
return this.dxSaaSService.tenantPost('/metrics/queryMetric', metricDataQuery);
|
|
68762
70180
|
}
|
|
70181
|
+
/** Queries metric metadata by source and attribute name specifiers. */
|
|
68763
70182
|
async queryMetadata(sourceName, sourceOpType, attributeName, attributeOpType) {
|
|
68764
70183
|
const metadataQuery = {
|
|
68765
70184
|
specifier: {
|
|
@@ -68770,6 +70189,7 @@ class NASSService {
|
|
|
68770
70189
|
};
|
|
68771
70190
|
return this.dxSaaSService.tenantPost('/metadata/queryMetric', metadataQuery);
|
|
68772
70191
|
}
|
|
70192
|
+
/** Registers a single metric with the given source/attribute name, type, and custom attributes. */
|
|
68773
70193
|
async registerMetric(sourceName, attributeName, metricType, attributes) {
|
|
68774
70194
|
const metricRegistrationBody = {
|
|
68775
70195
|
metrics: [
|
|
@@ -68783,6 +70203,7 @@ class NASSService {
|
|
|
68783
70203
|
};
|
|
68784
70204
|
return this.dxSaaSService.tenantPost('/metadata/registerMetric', metricRegistrationBody);
|
|
68785
70205
|
}
|
|
70206
|
+
/** Stores one or more metric values in the NASS metric value store. */
|
|
68786
70207
|
async storeMetricValue(metricValues) {
|
|
68787
70208
|
const metricStoreBody = { values: new Array() };
|
|
68788
70209
|
metricValues.forEach((metricValue) => metricStoreBody.values.push([
|
|
@@ -68796,6 +70217,7 @@ class NASSService {
|
|
|
68796
70217
|
]));
|
|
68797
70218
|
return this.dxSaaSService.tenantPost('/nass/metricValue/store', metricStoreBody);
|
|
68798
70219
|
}
|
|
70220
|
+
/** Executes a raw NASS pipeline query (e.g. FROM_TOPOLOGY + JOIN_METADATA). */
|
|
68799
70221
|
async query(nassQuery) {
|
|
68800
70222
|
return this.dxSaaSService.tenantPost('/atc/private/internal/metrics/nassQuery', nassQuery);
|
|
68801
70223
|
}
|
|
@@ -68810,6 +70232,7 @@ class NotificationService {
|
|
|
68810
70232
|
constructor(dxSaaSService) {
|
|
68811
70233
|
this.dxSaaSService = dxSaaSService;
|
|
68812
70234
|
}
|
|
70235
|
+
/** Returns all configured event notification services for the tenant. */
|
|
68813
70236
|
retrieveNotificationServices() {
|
|
68814
70237
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/eventnotification', {}, {});
|
|
68815
70238
|
}
|
|
@@ -68824,6 +70247,7 @@ class O2NotificationService {
|
|
|
68824
70247
|
constructor(dxSaaSService) {
|
|
68825
70248
|
this.dxSaaSService = dxSaaSService;
|
|
68826
70249
|
}
|
|
70250
|
+
/** Fetches all configured notification channels from the O2 notify API. */
|
|
68827
70251
|
retrieveNotificationChannels() {
|
|
68828
70252
|
return this.dxSaaSService.axaRequest('GET', 'notify/notify/v1/channels', true, false, {}, {});
|
|
68829
70253
|
}
|
|
@@ -68847,6 +70271,7 @@ class O2UniverseService {
|
|
|
68847
70271
|
this.dxTASService = dxTASService;
|
|
68848
70272
|
this.simpleLog = simpleLog;
|
|
68849
70273
|
}
|
|
70274
|
+
/** Returns all O2 universes (views owned by OI), including inactive ones. */
|
|
68850
70275
|
retrieveAllUniverses() {
|
|
68851
70276
|
return this.dxSaaSService
|
|
68852
70277
|
.tenantPost('views/queryView', {
|
|
@@ -68861,6 +70286,7 @@ class O2UniverseService {
|
|
|
68861
70286
|
return universeList.views;
|
|
68862
70287
|
});
|
|
68863
70288
|
}
|
|
70289
|
+
/** Returns a map of service name → universe labels it belongs to. */
|
|
68864
70290
|
async getServiceNameToUniverseLabelMap() {
|
|
68865
70291
|
const serviceUniverseNameMap = new SetMap();
|
|
68866
70292
|
const universeNameServiceMap = await this.getUniverseLabelToServiceNameMap();
|
|
@@ -68871,6 +70297,7 @@ class O2UniverseService {
|
|
|
68871
70297
|
});
|
|
68872
70298
|
return serviceUniverseNameMap;
|
|
68873
70299
|
}
|
|
70300
|
+
/** Returns a map of universe label → set of service names via TAS queries on each universe's TAS views. */
|
|
68874
70301
|
async getUniverseLabelToServiceNameMap() {
|
|
68875
70302
|
const universeServiceNameMap = new SetMap();
|
|
68876
70303
|
const allUniverses = await this.retrieveAllUniverses();
|
|
@@ -68911,6 +70338,7 @@ class O2UniverseService {
|
|
|
68911
70338
|
});
|
|
68912
70339
|
return universeServiceNameMap;
|
|
68913
70340
|
}
|
|
70341
|
+
/** Returns a single O2 universe by its view ID; throws if not exactly one result. */
|
|
68914
70342
|
retrieveUniverseByViewId(viewId) {
|
|
68915
70343
|
return this.dxSaaSService
|
|
68916
70344
|
.tenantPost('views/queryView', {
|
|
@@ -68924,9 +70352,11 @@ class O2UniverseService {
|
|
|
68924
70352
|
return universeList.views[0];
|
|
68925
70353
|
});
|
|
68926
70354
|
}
|
|
70355
|
+
/** Creates a new O2 universe from the given request body. */
|
|
68927
70356
|
createUniverse(universe) {
|
|
68928
70357
|
return this.dxSaaSService.tenantPost('/views/view', universe);
|
|
68929
70358
|
}
|
|
70359
|
+
/** Builds a group access permission object for use in universe creation. */
|
|
68930
70360
|
createGroupAccessBody(groupName, canManage) {
|
|
68931
70361
|
return {
|
|
68932
70362
|
name: groupName,
|
|
@@ -68936,6 +70366,7 @@ class O2UniverseService {
|
|
|
68936
70366
|
attributeInclude: [],
|
|
68937
70367
|
};
|
|
68938
70368
|
}
|
|
70369
|
+
/** Builds a user access permission object for use in universe creation. */
|
|
68939
70370
|
createUserAccessBody(userName, canManage) {
|
|
68940
70371
|
return {
|
|
68941
70372
|
name: userName,
|
|
@@ -68945,6 +70376,7 @@ class O2UniverseService {
|
|
|
68945
70376
|
attributeInclude: [],
|
|
68946
70377
|
};
|
|
68947
70378
|
}
|
|
70379
|
+
/** Generates a full create-universe request body with TAS and NASS filters for the given services. */
|
|
68948
70380
|
generateCreateUniverseRequestBody(name, description, serviceNames) {
|
|
68949
70381
|
const tasAllFilter = {
|
|
68950
70382
|
op: 'ALL',
|
|
@@ -69002,19 +70434,122 @@ class PerspectiveService {
|
|
|
69002
70434
|
this.log = log;
|
|
69003
70435
|
this.log = log ?? new NullSimpleLog$1();
|
|
69004
70436
|
}
|
|
70437
|
+
/** Returns all perspectives (groupings) for the tenant. */
|
|
69005
70438
|
getPerspectives() {
|
|
69006
70439
|
this.log.debug('getting perspectives');
|
|
69007
70440
|
return this.dxSaaSService.tenantGet('/apm/atc/api/private/grouping');
|
|
69008
70441
|
}
|
|
70442
|
+
/** Creates a new perspective (grouping). */
|
|
69009
70443
|
createPerspective(perspective) {
|
|
69010
70444
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/grouping', perspective);
|
|
69011
70445
|
}
|
|
70446
|
+
/** Deletes a perspective by its ID. */
|
|
69012
70447
|
async deletePerspective(id) {
|
|
69013
70448
|
const result = await this.dxSaaSService.tenantDelete(`/apm/atc/api/private/grouping/${id}`);
|
|
69014
70449
|
this.log.debug('deletion result', result);
|
|
69015
70450
|
}
|
|
69016
70451
|
}
|
|
69017
70452
|
|
|
70453
|
+
/**
|
|
70454
|
+
* Service for platform (o2/v2) alert specs: search, save, and retrieve
|
|
70455
|
+
* available message template fields.
|
|
70456
|
+
*
|
|
70457
|
+
* These operate against the `/oi/v2/alert/spec/` endpoints and are distinct
|
|
70458
|
+
* from the legacy ATC alert API. The UI refers to these as "alarms" but they
|
|
70459
|
+
* are modeled here as "alerts" for consistency; `alarmType` is preserved as-is
|
|
70460
|
+
* since it refers to the type of alarm generated when a threshold is crossed.
|
|
70461
|
+
*/
|
|
70462
|
+
class PlatformAlertService {
|
|
70463
|
+
dxSaaSService;
|
|
70464
|
+
constructor(dxSaaSService) {
|
|
70465
|
+
this.dxSaaSService = dxSaaSService;
|
|
70466
|
+
}
|
|
70467
|
+
/** Searches for alert specs, optionally filtered by management module ID. */
|
|
70468
|
+
async search(mmId) {
|
|
70469
|
+
const body = mmId ? { mmId } : {};
|
|
70470
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/spec/search', body);
|
|
70471
|
+
}
|
|
70472
|
+
/** Creates or updates a platform alert spec. */
|
|
70473
|
+
async save(request) {
|
|
70474
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/spec/save', request);
|
|
70475
|
+
}
|
|
70476
|
+
/** Deletes an alert spec by its specId (component, id, managementModuleId). */
|
|
70477
|
+
async delete(specId) {
|
|
70478
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/spec/delete', specId);
|
|
70479
|
+
}
|
|
70480
|
+
/** Returns the set of available message template field names (e.g. alertName, severity, hostname). */
|
|
70481
|
+
async getMessageFields() {
|
|
70482
|
+
return this.dxSaaSService.tenantGet('oi/v2/alert/spec/message/fields');
|
|
70483
|
+
}
|
|
70484
|
+
}
|
|
70485
|
+
|
|
70486
|
+
/**
|
|
70487
|
+
* Service for platform (o2/v2) management modules: query, export, save, and delete.
|
|
70488
|
+
*
|
|
70489
|
+
* These operate against the `/oi/v2/managementmodule/` endpoints and are distinct
|
|
70490
|
+
* from the legacy ATC management module API.
|
|
70491
|
+
*/
|
|
70492
|
+
class PlatformManagementModuleService {
|
|
70493
|
+
dxSaaSService;
|
|
70494
|
+
constructor(dxSaaSService) {
|
|
70495
|
+
this.dxSaaSService = dxSaaSService;
|
|
70496
|
+
}
|
|
70497
|
+
/** Lists all platform management modules. */
|
|
70498
|
+
async query() {
|
|
70499
|
+
return this.dxSaaSService.tenantPost('oi/v2/managementmodule/query', {});
|
|
70500
|
+
}
|
|
70501
|
+
/** Exports a single management module with its full detail (metricGroups, metricSpecs). */
|
|
70502
|
+
async exportModule(name) {
|
|
70503
|
+
return this.dxSaaSService.tenantPost('oi/v2/managementmodule/export', { id: { name } });
|
|
70504
|
+
}
|
|
70505
|
+
/** Creates or updates a platform management module. */
|
|
70506
|
+
async save(request) {
|
|
70507
|
+
return this.dxSaaSService.tenantPost('oi/v2/managementmodule/save', request);
|
|
70508
|
+
}
|
|
70509
|
+
/** Deletes a platform management module and its associated entities. */
|
|
70510
|
+
async delete(name) {
|
|
70511
|
+
return this.dxSaaSService.tenantPost('oi/v2/managementmodule/delete', { name });
|
|
70512
|
+
}
|
|
70513
|
+
}
|
|
70514
|
+
|
|
70515
|
+
/**
|
|
70516
|
+
* Service for platform (o2/v2) metric groupings: search, save, preview metrics,
|
|
70517
|
+
* and retrieve available metric filter fields.
|
|
70518
|
+
*
|
|
70519
|
+
* These operate against the `/oi/v2/alert/metricgroup/` and `/oi/v2/alert/metric/`
|
|
70520
|
+
* endpoints and are distinct from the legacy ATC metric grouping API.
|
|
70521
|
+
*/
|
|
70522
|
+
class PlatformMetricGroupingService {
|
|
70523
|
+
dxSaaSService;
|
|
70524
|
+
constructor(dxSaaSService) {
|
|
70525
|
+
this.dxSaaSService = dxSaaSService;
|
|
70526
|
+
}
|
|
70527
|
+
/** Searches for metric groupings, optionally filtered by management module ID. */
|
|
70528
|
+
async search(mmId) {
|
|
70529
|
+
const body = mmId ? { mmId } : {};
|
|
70530
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/metricgroup/search', body);
|
|
70531
|
+
}
|
|
70532
|
+
/** Creates or updates a platform metric grouping. */
|
|
70533
|
+
async save(request) {
|
|
70534
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/metricgroup/save', request);
|
|
70535
|
+
}
|
|
70536
|
+
/** Retrieves live metrics matching a metric grouping and/or custom filter. */
|
|
70537
|
+
async getMetrics(request) {
|
|
70538
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/metricgroup/metrics', request);
|
|
70539
|
+
}
|
|
70540
|
+
/** Deletes a metric grouping by ID (and optionally management module ID). */
|
|
70541
|
+
async delete(id, managementModuleId) {
|
|
70542
|
+
const body = managementModuleId
|
|
70543
|
+
? { id, managementModuleId: { name: managementModuleId } }
|
|
70544
|
+
: { id };
|
|
70545
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/metricgroup/delete', body);
|
|
70546
|
+
}
|
|
70547
|
+
/** Returns the set of available metric filter fields (source, metric, metadata). */
|
|
70548
|
+
async getMetricFields() {
|
|
70549
|
+
return this.dxSaaSService.tenantPost('oi/v2/alert/metric/fields', {});
|
|
70550
|
+
}
|
|
70551
|
+
}
|
|
70552
|
+
|
|
69018
70553
|
var FilterOperation;
|
|
69019
70554
|
(function (FilterOperation) {
|
|
69020
70555
|
FilterOperation["EQUALS"] = "eq";
|
|
@@ -69159,6 +70694,7 @@ class VertexService {
|
|
|
69159
70694
|
this.dxSaaSService = dxSaaSService;
|
|
69160
70695
|
this.log = log;
|
|
69161
70696
|
}
|
|
70697
|
+
/** Returns attribute value groups for a given attribute name in a universe, optionally filtered by layer. */
|
|
69162
70698
|
async getAttributeValues(universeId, attributeName, layer) {
|
|
69163
70699
|
const fq = {
|
|
69164
70700
|
filter: {
|
|
@@ -69191,6 +70727,7 @@ class VertexService {
|
|
|
69191
70727
|
return attributeValuesResponse.items;
|
|
69192
70728
|
});
|
|
69193
70729
|
}
|
|
70730
|
+
/** Returns all intellisense attributes (including gathered) from the ATC API. */
|
|
69194
70731
|
async listAllAttributes() {
|
|
69195
70732
|
return this.dxSaaSService
|
|
69196
70733
|
.tenantGet('/apm/atc/api/private/intellisense/attribute', { includeGathered: true })
|
|
@@ -69198,6 +70735,7 @@ class VertexService {
|
|
|
69198
70735
|
return attributeResponseBody.items;
|
|
69199
70736
|
});
|
|
69200
70737
|
}
|
|
70738
|
+
/** Returns the state (attributes) of a vertex by its ID. */
|
|
69201
70739
|
retrieveVertexState(vertexId) {
|
|
69202
70740
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/attributes/retrieve', { vertexIds: [vertexId] });
|
|
69203
70741
|
}
|
|
@@ -69208,9 +70746,11 @@ class VertexService {
|
|
|
69208
70746
|
// throw new Error("Unimplemented.")
|
|
69209
70747
|
// }
|
|
69210
70748
|
// public retrieveUniverseStatusChanges(universeId: string, startTime: number, endTime: number ) {}
|
|
70749
|
+
/** Returns a vertex by its ID from the ATC vertex REST endpoint. */
|
|
69211
70750
|
retrieveVertex(vertexId) {
|
|
69212
70751
|
return this.dxSaaSService.tenantGet('/apm/atc/api/vertex/' + vertexId);
|
|
69213
70752
|
}
|
|
70753
|
+
/** Returns a flat key→value map of attributes for the single agent vertex matching `fullAgentName`. */
|
|
69214
70754
|
async retrieveFlattenedAgentVertexAttributes(fullAgentName) {
|
|
69215
70755
|
return this.retrieveAgentVertex(fullAgentName).then((vertexResponse) => {
|
|
69216
70756
|
if (vertexResponse._embedded.vertex.length == 1) {
|
|
@@ -69224,6 +70764,7 @@ class VertexService {
|
|
|
69224
70764
|
}
|
|
69225
70765
|
});
|
|
69226
70766
|
}
|
|
70767
|
+
/** Returns all vertices that have an `agent` attribute matching `fullAgentName`. */
|
|
69227
70768
|
async retrieveAllVerticesForAgent(fullAgentName) {
|
|
69228
70769
|
return this.dxSaaSService
|
|
69229
70770
|
.tenantPost('/apm/atc/api/graph/vertex', VertexService.getAllVerticesForHostnameRequestBody(fullAgentName))
|
|
@@ -69231,6 +70772,7 @@ class VertexService {
|
|
|
69231
70772
|
return response._embedded.vertex;
|
|
69232
70773
|
});
|
|
69233
70774
|
}
|
|
70775
|
+
/** Returns the AGENT-type vertex for the given fully-qualified agent name. */
|
|
69234
70776
|
retrieveAgentVertex(fullAgentName) {
|
|
69235
70777
|
return this.dxSaaSService.tenantPost('/apm/atc/api/graph/vertex', VertexService.getAgentVertexRequestBody(fullAgentName));
|
|
69236
70778
|
}
|
|
@@ -69245,6 +70787,7 @@ class VertexService {
|
|
|
69245
70787
|
});
|
|
69246
70788
|
return r;
|
|
69247
70789
|
}
|
|
70790
|
+
/** Patches a vertex's attributes; pass `null` values to delete an attribute. */
|
|
69248
70791
|
patchVertex(vertexId, attributes) {
|
|
69249
70792
|
const patchAttributes = {};
|
|
69250
70793
|
Object.entries(attributes).forEach(([key, value]) => {
|
|
@@ -69257,21 +70800,26 @@ class VertexService {
|
|
|
69257
70800
|
});
|
|
69258
70801
|
return this.dxSaaSService.tenantPatch('/apm/atc/api/graph/vertex/' + vertexId, { attributes: patchAttributes });
|
|
69259
70802
|
}
|
|
70803
|
+
/** Returns vertices matching a set of AND attribute filter items. */
|
|
69260
70804
|
getVertices(andItems) {
|
|
69261
70805
|
return this.dxSaaSService.tenantPost('/apm/atc/api/graph/vertex', VertexService.getBulkVertexRequestBody(andItems));
|
|
69262
70806
|
}
|
|
69263
70807
|
vertexMappingConfigurationCached = null;
|
|
70808
|
+
/** Saves a vertex definition extension configuration. */
|
|
69264
70809
|
async setVertexDefinition(vertexDefinition) {
|
|
69265
70810
|
return this.dxSaaSService.tenantPost('/apm/appmap/ats/extension/configure', vertexDefinition);
|
|
69266
70811
|
}
|
|
70812
|
+
/** Returns all vertex type definitions for the tenant. */
|
|
69267
70813
|
async getVertexDefinitions() {
|
|
69268
70814
|
return this.dxSaaSService.tenantGet('/atc/vertexdefinition');
|
|
69269
70815
|
}
|
|
70816
|
+
/** Returns vertex definitions filtered to a specific vertex type. */
|
|
69270
70817
|
async getVertexDefinition(vertexType) {
|
|
69271
70818
|
return this.dxSaaSService.tenantGet('/atc/vertexdefinition', {
|
|
69272
70819
|
vertexType: vertexType,
|
|
69273
70820
|
});
|
|
69274
70821
|
}
|
|
70822
|
+
/** Returns the vertex metric mapping configuration (parsed from static config), optionally cached. */
|
|
69275
70823
|
async getVertexMappingConfiguration(useCache = true, allowOverride = true) {
|
|
69276
70824
|
if (useCache && this.vertexMappingConfigurationCached != null) {
|
|
69277
70825
|
return this.vertexMappingConfigurationCached;
|
|
@@ -69372,6 +70920,7 @@ class VertexService {
|
|
|
69372
70920
|
],
|
|
69373
70921
|
};
|
|
69374
70922
|
}
|
|
70923
|
+
/** Returns trace summaries for a set of vertex IDs within a time window. */
|
|
69375
70924
|
async getTraceSummaries(startTime, endTime, vertexIds, index, limit, errorsOnly) {
|
|
69376
70925
|
const traceSummaryRequestBody = {
|
|
69377
70926
|
endTime: endTime.toISO(),
|
|
@@ -69383,6 +70932,7 @@ class VertexService {
|
|
|
69383
70932
|
};
|
|
69384
70933
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/trace/summary', traceSummaryRequestBody);
|
|
69385
70934
|
}
|
|
70935
|
+
/** Builds metric query request bodies for a vertex ID using its mapped performance specifiers. */
|
|
69386
70936
|
async getVertexMappedMetricQueryRequestBody(vertexId) {
|
|
69387
70937
|
const vertexMapping = await this.getVertexMappingConfiguration();
|
|
69388
70938
|
vertexMapping.vertexMetricMap.forEach((specArray, key) => {
|
|
@@ -69458,6 +71008,7 @@ class VertexService {
|
|
|
69458
71008
|
});
|
|
69459
71009
|
return metricQueryBodyArray;
|
|
69460
71010
|
}
|
|
71011
|
+
/** Returns true if the vertex matches all filter conditions in the specifier. */
|
|
69461
71012
|
matchesFilter(spec, vertex) {
|
|
69462
71013
|
if (!spec.filter) {
|
|
69463
71014
|
return true;
|
|
@@ -69475,6 +71026,7 @@ class VertexService {
|
|
|
69475
71026
|
return filterMatches.every((match) => match);
|
|
69476
71027
|
}
|
|
69477
71028
|
}
|
|
71029
|
+
/** Replaces `<attributeName>` placeholders in a specifier format string with vertex attribute values. */
|
|
69478
71030
|
materializeSpecifier(specifier, vertex, escapeAttributeValue = false) {
|
|
69479
71031
|
this.getAllReplacementAttributes(specifier).forEach((attribute) => {
|
|
69480
71032
|
const vaValue = getVertexAttributeValue(vertex, attribute);
|
|
@@ -69484,6 +71036,7 @@ class VertexService {
|
|
|
69484
71036
|
});
|
|
69485
71037
|
return specifier;
|
|
69486
71038
|
}
|
|
71039
|
+
/** Extracts all `<attributeName>` placeholder names from a specifier format string. */
|
|
69487
71040
|
getAllReplacementAttributes(specifierFormat) {
|
|
69488
71041
|
const replacementAttributes = new Array();
|
|
69489
71042
|
let index = 0;
|
|
@@ -69500,12 +71053,14 @@ class VertexService {
|
|
|
69500
71053
|
this.log.debug(`found replacement attributes: ${replacementAttributes} in ${specifierFormat}`);
|
|
69501
71054
|
return replacementAttributes;
|
|
69502
71055
|
}
|
|
71056
|
+
/** Returns true if the vertex has all attributes required by the specifier's format strings. */
|
|
69503
71057
|
hasAllAttributes(specifier, vertex) {
|
|
69504
71058
|
const hasASReplacementAttributes = this.getAllReplacementAttributes(specifier.agentSpecifier.format).every((attribute) => hasVertexAttribute(vertex, attribute));
|
|
69505
71059
|
const hasMSReplacementAttributes = this.getAllReplacementAttributes(specifier.metricSpecifier.format).every((attribute) => hasVertexAttribute(vertex, attribute));
|
|
69506
71060
|
this.log.debug(`has replacements: ${hasASReplacementAttributes}/${hasMSReplacementAttributes}`);
|
|
69507
71061
|
return hasASReplacementAttributes && hasMSReplacementAttributes;
|
|
69508
71062
|
}
|
|
71063
|
+
/** Returns an empty metric query body skeleton with default range/frequency values. */
|
|
69509
71064
|
getEmptyMetricQueryBody() {
|
|
69510
71065
|
return {
|
|
69511
71066
|
querySpecifier: {
|
|
@@ -69523,6 +71078,7 @@ class VertexService {
|
|
|
69523
71078
|
authorizationView: null,
|
|
69524
71079
|
};
|
|
69525
71080
|
}
|
|
71081
|
+
/** Returns the directory path where vertex mapping override JSON files are stored. */
|
|
69526
71082
|
getVertexMappingOverrideLocation() {
|
|
69527
71083
|
let overrideLocation = null;
|
|
69528
71084
|
if (process.env.DXDO_VERTEX_MAPPING_OVERRIDE_LOCATION) {
|
|
@@ -69564,14 +71120,17 @@ class VertexService {
|
|
|
69564
71120
|
return overrideLocation;
|
|
69565
71121
|
}
|
|
69566
71122
|
}
|
|
71123
|
+
/** Returns true if an override file exists for the given vertex type and mapping type. */
|
|
69567
71124
|
vertexMappingOverrideFileExists(type, mappingType) {
|
|
69568
71125
|
return fs$1.existsSync(this.getVertexMappingLocation(type, mappingType));
|
|
69569
71126
|
}
|
|
71127
|
+
/** Parses and returns the contents of a vertex mapping override JSON file. */
|
|
69570
71128
|
getVertexMappingOverrideContents(type, mappingType) {
|
|
69571
71129
|
return JSON.parse(fs$1
|
|
69572
71130
|
.readFileSync(this.getVertexMappingLocation(type, mappingType))
|
|
69573
71131
|
.toString());
|
|
69574
71132
|
}
|
|
71133
|
+
/** Returns the `.original` backup path for a vertex mapping override; throws if it already exists. */
|
|
69575
71134
|
getTemporaryVertexMappingOverrideLocation(type, mappingType) {
|
|
69576
71135
|
const tempPath = path$1.join(this.getVertexMappingOverrideLocation(), `${type}.${mappingType}.json.original`);
|
|
69577
71136
|
if (fs$1.existsSync(tempPath)) {
|
|
@@ -69580,6 +71139,7 @@ class VertexService {
|
|
|
69580
71139
|
else
|
|
69581
71140
|
return tempPath;
|
|
69582
71141
|
}
|
|
71142
|
+
/** Returns the file path for a vertex mapping override JSON file. */
|
|
69583
71143
|
getVertexMappingLocation(type, mappingType) {
|
|
69584
71144
|
return path$1.join(this.getVertexMappingOverrideLocation(), `${type}.${mappingType}.json`);
|
|
69585
71145
|
}
|
|
@@ -69594,6 +71154,7 @@ class SQLService {
|
|
|
69594
71154
|
constructor(dxSaaSService) {
|
|
69595
71155
|
this.dxSaaSService = dxSaaSService;
|
|
69596
71156
|
}
|
|
71157
|
+
/** Executes a SQL-style APM data query and returns the response body. */
|
|
69597
71158
|
executeQuery(query) {
|
|
69598
71159
|
return this.dxSaaSService
|
|
69599
71160
|
.tenantPost('/apm/atc/api/apmData/query', { query: query })
|
|
@@ -69617,6 +71178,7 @@ class SessionService {
|
|
|
69617
71178
|
this.dxSaaSService = dxSaaSService;
|
|
69618
71179
|
this.log = log;
|
|
69619
71180
|
}
|
|
71181
|
+
/** Placeholder session verification; currently logs a warning and resolves immediately. */
|
|
69620
71182
|
test() {
|
|
69621
71183
|
this.log.warn(`Not able to verify session for ${this.dxSaaSService.getTenantCN()}`);
|
|
69622
71184
|
return Promise.resolve();
|
|
@@ -69637,10 +71199,12 @@ class TASService {
|
|
|
69637
71199
|
this.dxSaaSService = dxSaaSService;
|
|
69638
71200
|
this.log = log;
|
|
69639
71201
|
}
|
|
71202
|
+
/** Stores a graph (vertices and edges) in the TAS topology store. */
|
|
69640
71203
|
async storeGraph(graphBody) {
|
|
69641
71204
|
this.log.debug('storing');
|
|
69642
71205
|
return this.dxSaaSService.tenantPost('/tas/graph/store', graphBody);
|
|
69643
71206
|
}
|
|
71207
|
+
/** Executes a TAS graph query and returns the result body. */
|
|
69644
71208
|
async executeQuery(query) {
|
|
69645
71209
|
return this.dxSaaSService.tenantPost('/tas/graph/query', query);
|
|
69646
71210
|
}
|
|
@@ -69662,9 +71226,11 @@ class ServiceService {
|
|
|
69662
71226
|
this.dxSaaSService = dxSaaSService;
|
|
69663
71227
|
this.log = log;
|
|
69664
71228
|
}
|
|
71229
|
+
/** Returns the TAS topology dependency graph for a named service. */
|
|
69665
71230
|
async getServiceDependencyGraph(serviceName) {
|
|
69666
71231
|
return this.dxSaaSService.oiPost('oi/v2/sa/saTopologyGraph', { serviceName: serviceName, startTime: Date.now(), endTime: Date.now() });
|
|
69667
71232
|
}
|
|
71233
|
+
/** Returns metric time-series for each metric ID associated with a service. */
|
|
69668
71234
|
async getServiceDetailMetrics(serviceName, startTime, endTime, ianaTimeZone = 'Europe/London') {
|
|
69669
71235
|
const serviceOverview = await this.getServiceOverview(serviceName);
|
|
69670
71236
|
const serviceDetailRequest = {
|
|
@@ -69684,11 +71250,13 @@ class ServiceService {
|
|
|
69684
71250
|
};
|
|
69685
71251
|
});
|
|
69686
71252
|
}
|
|
71253
|
+
/** Searches services using a structured search request body. */
|
|
69687
71254
|
async searchServices(searchRequest) {
|
|
69688
71255
|
return this.dxSaaSService.oiPost('oi/v2/api/maintenance/inventory/_search', searchRequest, {
|
|
69689
71256
|
services: true,
|
|
69690
71257
|
});
|
|
69691
71258
|
}
|
|
71259
|
+
/** Returns SLI metrics for a specific service within a time range. */
|
|
69692
71260
|
async getServiceSLIs(serviceId, serviceName, startTime, endTime) {
|
|
69693
71261
|
const requestBody = {
|
|
69694
71262
|
serviceId,
|
|
@@ -69699,6 +71267,7 @@ class ServiceService {
|
|
|
69699
71267
|
};
|
|
69700
71268
|
return this.dxSaaSService.oiPost('oi/v2/servicerepo/slis', requestBody);
|
|
69701
71269
|
}
|
|
71270
|
+
/** Returns the full service detail (metrics with values) for a named service. */
|
|
69702
71271
|
async getServiceDetail(serviceName, startTime, endTime, ianaTimeZone = 'Europe/London') {
|
|
69703
71272
|
const serviceOverview = await this.getServiceOverview(serviceName);
|
|
69704
71273
|
const serviceDetailRequest = {
|
|
@@ -69711,6 +71280,7 @@ class ServiceService {
|
|
|
69711
71280
|
};
|
|
69712
71281
|
return this.dxSaaSService.oiPost('oi/v2/sa/serviceDetails', serviceDetailRequest);
|
|
69713
71282
|
}
|
|
71283
|
+
/** Returns the overview vertex for a named service; throws if not found. */
|
|
69714
71284
|
async getServiceOverview(serviceName) {
|
|
69715
71285
|
return this.dxSaaSService
|
|
69716
71286
|
.oiGet(`oi/v2/sa/services/${serviceName}`, {
|
|
@@ -69724,6 +71294,7 @@ class ServiceService {
|
|
|
69724
71294
|
throw new Error(`No Service with name '${serviceName}' Found`);
|
|
69725
71295
|
});
|
|
69726
71296
|
}
|
|
71297
|
+
/** Returns paginated top-level (grouped) services up to `maxRequests` pages. */
|
|
69727
71298
|
async getTopLevelServices(pageSize = 100, maxRequests = 20) {
|
|
69728
71299
|
const returnServices = new Array();
|
|
69729
71300
|
let totalRequests = 0;
|
|
@@ -69748,6 +71319,7 @@ class ServiceService {
|
|
|
69748
71319
|
return returnServices;
|
|
69749
71320
|
});
|
|
69750
71321
|
}
|
|
71322
|
+
/** Returns all services (ungrouped) paginating up to `maxRequests` pages. */
|
|
69751
71323
|
async getAllServices(pageSize = 100, maxRequests = 10) {
|
|
69752
71324
|
const returnServices = new Array();
|
|
69753
71325
|
let totalRequests = 0;
|
|
@@ -69772,6 +71344,7 @@ class ServiceService {
|
|
|
69772
71344
|
return returnServices;
|
|
69773
71345
|
});
|
|
69774
71346
|
}
|
|
71347
|
+
/** Builds a services request body scoped to parent (top-level) services. */
|
|
69775
71348
|
createParentServiceRequestBody(pageSize) {
|
|
69776
71349
|
return {
|
|
69777
71350
|
...OIService.PARENT_SERVICE_REQUEST_BODY,
|
|
@@ -69779,6 +71352,7 @@ class ServiceService {
|
|
|
69779
71352
|
pageSize: pageSize,
|
|
69780
71353
|
};
|
|
69781
71354
|
}
|
|
71355
|
+
/** Builds a services request body that includes all services (no grouping). */
|
|
69782
71356
|
createAllServiceRequestBody(pageSize) {
|
|
69783
71357
|
return {
|
|
69784
71358
|
...OIService.PARENT_SERVICE_REQUEST_BODY,
|
|
@@ -69787,6 +71361,7 @@ class ServiceService {
|
|
|
69787
71361
|
groupServices: false,
|
|
69788
71362
|
};
|
|
69789
71363
|
}
|
|
71364
|
+
/** Returns inventory records for entities belonging to the named service. */
|
|
69790
71365
|
async getServiceInventory(serviceName) {
|
|
69791
71366
|
const initialRequestBody = this.createServiceInventoryRequestBody(serviceName);
|
|
69792
71367
|
return this.dxSaaSService
|
|
@@ -69807,14 +71382,17 @@ class ServiceService {
|
|
|
69807
71382
|
sirb.customFilter.and.expressions[0].or.expressions[0].value = serviceName;
|
|
69808
71383
|
return sirb;
|
|
69809
71384
|
}
|
|
71385
|
+
/** Creates a new service from the given body; replaces any existing service with the same name. */
|
|
69810
71386
|
async createService(createServiceBody) {
|
|
69811
71387
|
return this.dxSaaSService.tenantPost('/oi/v2/sa/save', createServiceBody, {
|
|
69812
71388
|
replace: true,
|
|
69813
71389
|
});
|
|
69814
71390
|
}
|
|
71391
|
+
/** Deletes a service by name; optionally deletes child services recursively. */
|
|
69815
71392
|
async deleteService(serviceName, recursive = false) {
|
|
69816
71393
|
return this.dxSaaSService.tenantPost('/oi/v2/sa/service/status', { name: serviceName, action: 'delete' }, { recursive });
|
|
69817
71394
|
}
|
|
71395
|
+
/** Builds a `ServiceContent` query fragment for a single attribute filter. */
|
|
69818
71396
|
generateServiceContent(attributeName, attributeValue, operator = 'IN', followTransactions = false) {
|
|
69819
71397
|
return {
|
|
69820
71398
|
query: [
|
|
@@ -69829,6 +71407,7 @@ class ServiceService {
|
|
|
69829
71407
|
},
|
|
69830
71408
|
};
|
|
69831
71409
|
}
|
|
71410
|
+
/** Builds an empty (no-content) service vertex payload ready to be populated. */
|
|
69832
71411
|
generateEmptyServiceVertex(serviceName, serviceDescription, situationsIncludeChildServices, tags = [], customProperties = []) {
|
|
69833
71412
|
return {
|
|
69834
71413
|
attributes: {
|
|
@@ -69849,6 +71428,7 @@ class ServiceService {
|
|
|
69849
71428
|
externalId: `SERVICE:${serviceName}`,
|
|
69850
71429
|
};
|
|
69851
71430
|
}
|
|
71431
|
+
/** Returns an empty `CreateSimpleServiceBody` with no vertices or edges. */
|
|
69852
71432
|
generateCreateServiceBody() {
|
|
69853
71433
|
return {
|
|
69854
71434
|
edges: [],
|
|
@@ -69872,6 +71452,7 @@ class SituationService {
|
|
|
69872
71452
|
this.dxSaaSService = dxSaaSService;
|
|
69873
71453
|
this.log = log;
|
|
69874
71454
|
}
|
|
71455
|
+
/** Sends a notification for a situation to the specified channel with optional template/locale. */
|
|
69875
71456
|
async triggerNotification(alarmId, notificationChannelName, template = '', locale = 'en-US') {
|
|
69876
71457
|
const situationDetail = JSON.parse((await this.getSituationOverview(alarmId)).alarmData);
|
|
69877
71458
|
situationDetail.alarmType = 'situation';
|
|
@@ -69886,6 +71467,7 @@ class SituationService {
|
|
|
69886
71467
|
};
|
|
69887
71468
|
return this.dxSaaSService.oiPost('oi/v2/api/alarmactions/channel', body);
|
|
69888
71469
|
}
|
|
71470
|
+
/** Searches cluster alarms (situations) within a time range using a filter operation. */
|
|
69889
71471
|
async getSituations(searchOperation, startTime, endTime, includeClosed = false, pageSize = 50) {
|
|
69890
71472
|
return this.dxSaaSService.oiPost('oi/v2/api/clusteralarms/_search', this.getSituationRequestBody(searchOperation, startTime, endTime, includeClosed, pageSize));
|
|
69891
71473
|
}
|
|
@@ -69911,9 +71493,11 @@ class SituationService {
|
|
|
69911
71493
|
customFilter: searchOperation,
|
|
69912
71494
|
};
|
|
69913
71495
|
}
|
|
71496
|
+
/** Returns the overview record for a situation by its alarm ID. */
|
|
69914
71497
|
async getSituationOverview(situationId) {
|
|
69915
71498
|
return this.dxSaaSService.oiGet(`oi/v2/api/groupalarms/_search/${situationId}/overview`, { type: 'cluster' });
|
|
69916
71499
|
}
|
|
71500
|
+
/** Returns lifecycle (state change) events for a situation. */
|
|
69917
71501
|
async getSituationLifecycleEvents(situationId) {
|
|
69918
71502
|
return this.dxSaaSService.oiPost('oi/v2/api/alarms/lifecycle/_search', {
|
|
69919
71503
|
alarmId: situationId,
|
|
@@ -69923,6 +71507,7 @@ class SituationService {
|
|
|
69923
71507
|
lifeCycleType: 'SITUATION',
|
|
69924
71508
|
});
|
|
69925
71509
|
}
|
|
71510
|
+
/** Returns the inspector inspection result for a situation (related alarms, topology). */
|
|
69926
71511
|
async getSituationInspection(situationId) {
|
|
69927
71512
|
return this.dxSaaSService.oiPost('oi/v2/api/inspect/situation', {
|
|
69928
71513
|
backwardHopCount: 1,
|
|
@@ -69931,6 +71516,7 @@ class SituationService {
|
|
|
69931
71516
|
tenantId: this.dxSaaSService.dxdoConfiguration.dxConfiguration.cohortId,
|
|
69932
71517
|
});
|
|
69933
71518
|
}
|
|
71519
|
+
/** Returns all alarms belonging to a situation in a time window. */
|
|
69934
71520
|
async getSituationAlarms(situationId, startTime, endTime, pageSize = 50) {
|
|
69935
71521
|
this.log.debug(`getting situations with pagesize ${pageSize}`);
|
|
69936
71522
|
return this.dxSaaSService.oiPost('oi/v2/api/clusteralarms/_search', {
|
|
@@ -69955,6 +71541,7 @@ class SituationService {
|
|
|
69955
71541
|
clusterAlarmId: situationId,
|
|
69956
71542
|
});
|
|
69957
71543
|
}
|
|
71544
|
+
/** Generates a GenAI inspector summary for a situation in the given timezone. */
|
|
69958
71545
|
async getSituationSummary(situationId, timezoneTimeZoneIANA) {
|
|
69959
71546
|
const situationInspection = await this.getSituationInspection(situationId);
|
|
69960
71547
|
const relatedAlarms = Object.values(situationInspection.relatedAlarmsDetails.relatedAlarms).map((relatedAlarm) => {
|
|
@@ -70032,6 +71619,9 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
|
|
|
70032
71619
|
dxO2UniverseService: new O2UniverseService(dxSaaSService, dxTASService, log),
|
|
70033
71620
|
dxOIService: new DxoiService(dxSaaSService),
|
|
70034
71621
|
dxPerspectiveService: new PerspectiveService(dxSaaSService),
|
|
71622
|
+
dxPlatformAlertService: new PlatformAlertService(dxSaaSService),
|
|
71623
|
+
dxPlatformManagementModuleService: new PlatformManagementModuleService(dxSaaSService),
|
|
71624
|
+
dxPlatformMetricGroupingService: new PlatformMetricGroupingService(dxSaaSService),
|
|
70035
71625
|
dxSaaSService,
|
|
70036
71626
|
dxServiceService: new ServiceService(dxSaaSService, log),
|
|
70037
71627
|
dxSessionService: new SessionService(dxSaaSService),
|
|
@@ -70042,5 +71632,133 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
|
|
|
70042
71632
|
};
|
|
70043
71633
|
}
|
|
70044
71634
|
|
|
70045
|
-
|
|
71635
|
+
/**
|
|
71636
|
+
* Service for issuing metric metadata queries against the DX SaaS DataStore
|
|
71637
|
+
* API (`/metadata/queryMetric`).
|
|
71638
|
+
*
|
|
71639
|
+
* Requests are validated against {@link MetadataMetricQuerySchema}; responses
|
|
71640
|
+
* are validated against {@link MetadataMetricQueryResponseV2Schema}.
|
|
71641
|
+
* Validation failures on the response side are logged as warnings, not thrown.
|
|
71642
|
+
*/
|
|
71643
|
+
class DataStoreMetricsMetadataService {
|
|
71644
|
+
dxSaasService;
|
|
71645
|
+
log;
|
|
71646
|
+
constructor(dxSaasService, log) {
|
|
71647
|
+
this.dxSaasService = dxSaasService;
|
|
71648
|
+
this.log = log;
|
|
71649
|
+
}
|
|
71650
|
+
/**
|
|
71651
|
+
* POSTs a metadata query to `/metadata/queryMetric` and returns the matching
|
|
71652
|
+
* metric / folder records.
|
|
71653
|
+
*
|
|
71654
|
+
* @throws ZodError if the request fails schema validation.
|
|
71655
|
+
*/
|
|
71656
|
+
async queryMetric(query) {
|
|
71657
|
+
MetadataMetricQuerySchema.parse(query);
|
|
71658
|
+
const raw = await this.dxSaasService.tenantPost('metadata/queryMetric', query);
|
|
71659
|
+
const result = MetadataMetricQueryResponseV2Schema.safeParse(raw);
|
|
71660
|
+
if (!result.success) {
|
|
71661
|
+
this.log.warn('MetadataMetricQueryResponseV2 validation warning:', result.error.message);
|
|
71662
|
+
}
|
|
71663
|
+
return raw;
|
|
71664
|
+
}
|
|
71665
|
+
}
|
|
71666
|
+
|
|
71667
|
+
/**
|
|
71668
|
+
* Service for issuing NASSQL queries against the DX SaaS DataStore API
|
|
71669
|
+
* (`/metrics/nassQuery`).
|
|
71670
|
+
*
|
|
71671
|
+
* NASSQL is a pipeline query language that composes operations across
|
|
71672
|
+
* topology, metric metadata, and metric data sources. The response is a
|
|
71673
|
+
* tabular array where the first row is the column header and subsequent
|
|
71674
|
+
* rows are data; use {@link splitResult} or {@link resultAsRecords} to
|
|
71675
|
+
* work with the data conveniently.
|
|
71676
|
+
*
|
|
71677
|
+
* Requests are validated against {@link QueryRequestSchema}; responses are
|
|
71678
|
+
* validated against {@link QueryResultSchema}. Validation failures on the
|
|
71679
|
+
* response side are logged as warnings, not thrown.
|
|
71680
|
+
*/
|
|
71681
|
+
class DataStoreNASSQLService {
|
|
71682
|
+
dxSaasService;
|
|
71683
|
+
log;
|
|
71684
|
+
constructor(dxSaasService, log) {
|
|
71685
|
+
this.dxSaasService = dxSaasService;
|
|
71686
|
+
this.log = log;
|
|
71687
|
+
}
|
|
71688
|
+
/**
|
|
71689
|
+
* POSTs a NASSQL query to `/metrics/nassQuery` and returns the raw tabular
|
|
71690
|
+
* result (header row followed by data rows).
|
|
71691
|
+
*
|
|
71692
|
+
* @throws ZodError if the request fails schema validation.
|
|
71693
|
+
*/
|
|
71694
|
+
async query(request) {
|
|
71695
|
+
QueryRequestSchema.parse(request);
|
|
71696
|
+
const raw = await this.dxSaasService.tenantPost('metrics/nassQuery', request);
|
|
71697
|
+
const result = QueryResultSchema.safeParse(raw);
|
|
71698
|
+
if (!result.success) {
|
|
71699
|
+
this.log.warn('QueryResult validation warning:', result.error.message);
|
|
71700
|
+
}
|
|
71701
|
+
return raw;
|
|
71702
|
+
}
|
|
71703
|
+
/**
|
|
71704
|
+
* Splits a NASSQL query result into its header row and data rows.
|
|
71705
|
+
* Assumes the first row is always the header.
|
|
71706
|
+
*/
|
|
71707
|
+
splitResult(result) {
|
|
71708
|
+
if (result.length === 0) {
|
|
71709
|
+
return { header: [], data: [] };
|
|
71710
|
+
}
|
|
71711
|
+
const header = result[0];
|
|
71712
|
+
const data = result.slice(1);
|
|
71713
|
+
return { header, data };
|
|
71714
|
+
}
|
|
71715
|
+
/**
|
|
71716
|
+
* Converts a NASSQL query result into an array of objects (Records),
|
|
71717
|
+
* where each object's keys are the column names from the header row.
|
|
71718
|
+
*/
|
|
71719
|
+
resultAsRecords(result) {
|
|
71720
|
+
const { header, data } = this.splitResult(result);
|
|
71721
|
+
return data.map((row) => {
|
|
71722
|
+
const record = {};
|
|
71723
|
+
header.forEach((colName, index) => {
|
|
71724
|
+
record[colName] = row[index];
|
|
71725
|
+
});
|
|
71726
|
+
return record;
|
|
71727
|
+
});
|
|
71728
|
+
}
|
|
71729
|
+
}
|
|
71730
|
+
|
|
71731
|
+
/**
|
|
71732
|
+
* Service for issuing Topological Attribute Store (TAS) graph queries
|
|
71733
|
+
* against the DX SaaS DataStore API (`/tas/graph/query`).
|
|
71734
|
+
*
|
|
71735
|
+
* Requests are validated against {@link TasQuerySchema}; responses are
|
|
71736
|
+
* validated against {@link TasGraphSchema}. Validation failures on the
|
|
71737
|
+
* response side are logged as warnings, not thrown.
|
|
71738
|
+
*/
|
|
71739
|
+
class DataStoreTASService {
|
|
71740
|
+
dxSaasService;
|
|
71741
|
+
log;
|
|
71742
|
+
constructor(dxSaasService, log) {
|
|
71743
|
+
this.dxSaasService = dxSaasService;
|
|
71744
|
+
this.log = log;
|
|
71745
|
+
}
|
|
71746
|
+
/**
|
|
71747
|
+
* POSTs a TAS graph query to `/tas/graph/query` and returns the resulting
|
|
71748
|
+
* graph (vertices, edges, states).
|
|
71749
|
+
*
|
|
71750
|
+
* @throws ZodError if the request fails schema validation.
|
|
71751
|
+
*/
|
|
71752
|
+
async executeQuery(query) {
|
|
71753
|
+
TasQuerySchema.parse(query);
|
|
71754
|
+
const raw = await this.dxSaasService.tenantPost('tas/graph/query', query);
|
|
71755
|
+
const result = TasGraphSchema.safeParse(raw);
|
|
71756
|
+
if (!result.success) {
|
|
71757
|
+
this.log.warn('TasGraph response validation warning:', result.error.message);
|
|
71758
|
+
}
|
|
71759
|
+
return raw;
|
|
71760
|
+
}
|
|
71761
|
+
}
|
|
71762
|
+
|
|
71763
|
+
export { AXAActivities, AccService, AgentService, AgentTrace, AlarmEnrichment, AlarmEnrichmentFilter, AlarmService, AlertDefinitionResponse, AlertResponse, AlertResponseV2, AlertService, AlignmentSchema, ApmUniverseService, AsmService, AttributeExpressionComparatorSchema, AttributeExpressionOperatorSchema, AttributeExpressionSchema, AttributeFilterOperator, AttributeNameAllSpecifierSchema, AttributeNameAndSpecifierSchema, AttributeNameAnyNumericSpecifierSchema, AttributeNameAttributeSpecifierSchema, AttributeNameChildrenSpecifierSchema, AttributeNameExactSpecifierSchema, AttributeNameFolderSpecifierSchema, AttributeNameNoneSpecifierSchema, AttributeNameNotSpecifierSchema, AttributeNameOperatorSpecifierSchema, AttributeNameOrSpecifierSchema, AttributeNameRegExSpecifierSchema, AttributeNameSpecifierSchema, AttributeNameTypeSpecifierSchema, AttributeService, AttributeValueAsFieldSchema, AuthorizationService, AxaService, BlobService, CalendarIntervalSchema, ChannelService, DEFAULT_EXPERIENCE_REQUEST_BODY, DXChannel, DashboardPermissionsUpdateRequest, DashboardSearch, DashboardService, DataStoreMetricsMetadataService, DataStoreNASSQLService, DataStoreTASService, DxSaasService, DxoiService, EdgeNumericIdSchema, EventService, ExperienceService, FillModeSchema, FilterOperation, FolderNameAllSpecifierSchema, FolderNameAndSpecifierSchema, FolderNameChildrenSpecifierSchema, FolderNameExactSpecifierSchema, FolderNameNoneSpecifierSchema, FolderNameNotSpecifierSchema, FolderNameOrSpecifierSchema, FolderNameRegExSpecifierSchema, FolderNameSpecifierSchema, GraphResponse, GraphService, Inventory, InventoryAttributes, InventoryService, JoinTypeSchema, JsExtensionService, LogQuery, LogsService, MServe, ManagementModuleIdSchema, ManagementModuleService, MatchType, MetadataMetricQueryResponseV2Schema, MetadataMetricQuerySchema, MetricAttributeSchema, MetricBatchService, MetricFolderSchema, MetricGroupingService, NASS, NASSService, NassValueTypeSchema, NotificationService, NumericOperatorSchema, O2NotificationService, O2UniverseService, OIAlarm, OIService, OperatorSchema, PerspectiveService, PlatformAlertService, PlatformFilters, PlatformManagementModuleService, PlatformMetricGroupingService, QuantileMethodSchema, QueryAllSpecifierSchema, QueryAndSpecifierSchema, QueryAttributeExpressionSchema, QueryAttributeSpecifierSchema, QueryColumnTypeSpecSchema, QueryFilterPredicateSpecSchema, QueryFunctionSpecSchema, QueryHintForceRangeSchema, QueryHintSchema, QueryIdSpecifierSchema, QueryMetricGroupSpecifierSchema, QueryMetricIdSchema, QueryNoneSpecifierSchema, QueryNotSpecifierSchema, QueryOrSpecifierSchema, QueryRangeSpecSchema, QueryRequestSchema, QueryResultSchema, QuerySpecSpecifierSchema, QuerySpecifierSchema, SQLService, ServiceFilterSpecifierSchema, ServiceService, SessionService, SimpleHTTPError, SituationLifecycle, SituationService, Situations, SourceNameAllSpecifierSchema, SourceNameAndSpecifierSchema, SourceNameExactSpecifierSchema, SourceNameNoneSpecifierSchema, SourceNameNotSpecifierSchema, SourceNameOrSpecifierSchema, SourceNamePartOperatorSpecifierSchema, SourceNameRegExSpecifierSchema, SourceNameSpecifierSchema, TAS, TASGraph, TASService, TasAddFlowsFilterSchema, TasAddTransitioningEdgesFilterSchema, TasAddWireContextFilterSchema, TasAddWiresFilterSchema, TasAllFilterSchema, TasAnalyticResultSchema, TasAndFilterSchema, TasAttributeFilterModeSchema, TasAttributeFilterSchema, TasAttributeTypeSchema, TasCollectAttributeNamesFilterSchema, TasCollectAttributesFilterSchema, TasCollectCardInfoFilterSchema, TasCollectCardInfoTierSchema, TasCollectCountsFilterSchema, TasCollectExperienceAttributesFilterSchema, TasCollectExperienceSelectorSchema, TasCollectGroupingInfoFilterSchema, TasCollectVertexIdFilterSchema, TasCoverageFilterSchema, TasEdgeSchema, TasEmptyFilterSchema, TasExternalIdSchema, TasFilterSchema, TasFollowPathFilterSchema, TasFollowPathFlowFilterSchema, TasFollowPathTypeSchema, TasGraphSchema, TasGroupingItemSchema, TasJoinFilterSchema, TasJoinTypeSchema, TasLayerFilterSchema, TasLegacyFilterSchema, TasLuceneFilterSchema, TasNotFilterSchema, TasOrFilterSchema, TasOrderSchema, TasProjectionFilterSchema, TasQuerySchema, TasServiceFilterSchema, TasStatusFilterSchema, TasTakeEdgesFilterSchema, TasTakeFlowsFilterSchema, TasTakeVerticesFilterSchema, TasTraverseFilterSchema, TasVariableFilterSchema, TasVariableSchema, TasVertexIdFilterSchema, TasVertexSchema, TasViewSchema, Trace, TraversalEdgeFilterSchema, TraversalVertexFilterSchema, TraverseCollectSchema, TraverseDirectionSchema, TraverseSchema, VertexMappingConfigurationModule, VertexService, VertexStateExternalIdSchema, VertexStateFilterSchema, VertexStateNumericIdSchema, VertexStateSchema, VertexStatusChanges, ags, agsresponse, apiTokenCreate, apiTokenDelete, apiTokenGet, apiTokenList, apiTokenUpdate, checkGet, contactActivate, contactDelete, contactTestSend, contactsBlockDelete, contactsBlockPut, contactsConfirm, contactsCreate, contactsGet, contactsGetDetail, contactsReplaceNotificationsWith, contactsRequestConfirmationCode, contactsUpdate, convertLegacyConfiguration, createPostmanRequest, createServiceMonolith, escapeRegExp, example, excludedAttributes, folderAccessGet, folderDelete, folderGet, folderPost, folderUpdate, foldersList, getUserTokenSub, getUserTokenTid, getVertexAttributeValue, getVertexAttributeValueOrNull, hasVertexAttribute, inventorizePreview, inventorizeResponse, inventorySearchRequestBodyExample, inventorySearchResponseBody, isTenantToken, isUserToken, locationsCreate, locationsDelete, locationsGet, locationsGetAll, locationsGetByType, locationsLeafGetFilter, locationsPost, logGet, logGetEvent, maintenanceDelete, maintenanceDeleteWindows, maintenanceGet, maintenanceGetDetail, maintenanceGetWindows, maintenanceGetWindowsDetail, maintenanceUpdateWindowsDetail, maintenancesCreate, maintenancesImmediateDelete, maintenancesImmediatePut, maintenancesPostWindows, maintenancesUpdate, messageGet, messagesList, monitorActivate, monitorCreate, monitorDeactivate, monitorDelete, monitorGet, monitorGetAll, monitorUpdate, oauthClientTokensCreate, oauthClientTokensDelete, oauthClientTokensGet, oauthClientTokensList, oauthClientTokensUpdate, oauthCreateToken, oauthGetRefreshTokenList, oauthGetTokenList, oauthRefreshTokenDeleteId, oauthTokenCognateDelete, oauthTokenCognateDeleteCurrent, oauthTokenDelete, oauthTokenDeleteCurrent, parseFilter, sampleServiceDetailRequestBody, searchUniverse, serviceDetailResponseBody, settingsGet, settingsGetDetail, settingsUpdate, stationDelete, stationsAgentType, stationsCreate, stationsDeleteMaintenance, stationsGet, stationsGetAgents, stationsLatest, stationsList, stationsOnpremiseConnected, stationsOnpremiseConnectedAll, stationsOnpremiseList, stationsPutMaintenance, stationsUpdate, statistic, tagsGetAll, timezonesList, userBlockDelete, userBlockPut, userDelete, userGet, userLockDelete, userPut, userSubaccountsGet, userSubaccountsPost, verifyAndDumpLegacyConfiguration, verifyAndDumpVersion3Configuration, verifyAndDumpVersion4Configuration, vertexMatchesFilters };
|
|
70046
71764
|
//# sourceMappingURL=index.esm.js.map
|