@dx-do/client 6.0.4 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +285 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +279 -27
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts +4 -0
- package/dist/src/lib/model/config/DXSaaSConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/index.d.ts +1 -0
- package/dist/src/lib/model/datastore/index.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/metrics-metadata/index.d.ts +1 -0
- package/dist/src/lib/model/datastore/metrics-metadata/index.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/metrics-metadata/register.d.ts +49 -0
- package/dist/src/lib/model/datastore/metrics-metadata/register.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nass/index.d.ts +2 -0
- package/dist/src/lib/model/datastore/nass/index.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/nass/store.d.ts +41 -0
- package/dist/src/lib/model/datastore/nass/store.d.ts.map +1 -0
- package/dist/src/lib/model/datastore/tas/index.d.ts +1 -0
- package/dist/src/lib/model/datastore/tas/index.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/tas/store.d.ts +330 -0
- package/dist/src/lib/model/datastore/tas/store.d.ts.map +1 -0
- package/dist/src/lib/model/log/ingest.d.ts +32 -0
- package/dist/src/lib/model/log/ingest.d.ts.map +1 -0
- package/dist/src/lib/model/log/query-body.d.ts.map +1 -1
- package/dist/src/lib/model/trace/TraceInject.d.ts +44 -0
- package/dist/src/lib/model/trace/TraceInject.d.ts.map +1 -0
- package/dist/src/lib/services/agent.service.d.ts +5 -0
- package/dist/src/lib/services/agent.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +13 -1
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts +42 -0
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts.map +1 -0
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts +12 -1
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts.map +1 -1
- package/dist/src/lib/services/dx-saas.service.d.ts +6 -0
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/logs.service.d.ts +18 -2
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/nass.service.d.ts +13 -3
- package/dist/src/lib/services/nass.service.d.ts.map +1 -1
- package/dist/src/lib/services/service-monolith.d.ts +2 -0
- package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
- package/dist/src/lib/services/tas.service.d.ts +5 -1
- package/dist/src/lib/services/tas.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -13,7 +13,7 @@ import require$$0$6 from 'net';
|
|
|
13
13
|
import require$$1$3 from 'tls';
|
|
14
14
|
import require$$3 from 'assert';
|
|
15
15
|
import require$$1$2 from 'tty';
|
|
16
|
-
import require$$0$4 from 'os';
|
|
16
|
+
import require$$0$4, { hostname, networkInterfaces } from 'os';
|
|
17
17
|
import require$$0$5, { EventEmitter as EventEmitter$1 } from 'events';
|
|
18
18
|
import http2 from 'http2';
|
|
19
19
|
import zlib from 'zlib';
|
|
@@ -28261,6 +28261,37 @@ const TasGraphSchema = z.looseObject({
|
|
|
28261
28261
|
totalEdges: z.number().optional(),
|
|
28262
28262
|
});
|
|
28263
28263
|
|
|
28264
|
+
const TasStoreGraphInputSchema = z.looseObject({
|
|
28265
|
+
includeSuccessResult: z.boolean().optional(),
|
|
28266
|
+
ttl: z.number().optional(),
|
|
28267
|
+
endTimeAllowedThreshold: z.number().optional(),
|
|
28268
|
+
storeType: TasAttributeTypeSchema.optional(),
|
|
28269
|
+
graph: TasGraphSchema,
|
|
28270
|
+
});
|
|
28271
|
+
const TasStoreChangeSchema = z.looseObject({
|
|
28272
|
+
changeType: z.string().optional(),
|
|
28273
|
+
id: z.unknown().optional(),
|
|
28274
|
+
});
|
|
28275
|
+
const TasStoreGraphResponseSchema = z.looseObject({
|
|
28276
|
+
graph: TasGraphSchema.optional(),
|
|
28277
|
+
failedVertices: z
|
|
28278
|
+
.array(z.looseObject({
|
|
28279
|
+
object: TasVertexSchema,
|
|
28280
|
+
code: z.string().optional(),
|
|
28281
|
+
message: z.string().optional(),
|
|
28282
|
+
}))
|
|
28283
|
+
.optional(),
|
|
28284
|
+
failedEdges: z
|
|
28285
|
+
.array(z.looseObject({
|
|
28286
|
+
object: TasEdgeSchema,
|
|
28287
|
+
code: z.string().optional(),
|
|
28288
|
+
message: z.string().optional(),
|
|
28289
|
+
}))
|
|
28290
|
+
.optional(),
|
|
28291
|
+
edgeChanges: z.array(TasStoreChangeSchema).optional(),
|
|
28292
|
+
vertexChanges: z.array(TasStoreChangeSchema).optional(),
|
|
28293
|
+
});
|
|
28294
|
+
|
|
28264
28295
|
/**
|
|
28265
28296
|
* Comparison operators used in the `PART` specifier for comparing
|
|
28266
28297
|
* dot-separated source-name segments numerically or lexically.
|
|
@@ -28890,6 +28921,29 @@ const MetadataMetricQuerySchema = z.looseObject({
|
|
|
28890
28921
|
.describe('Optional server hints; currently supports `ForceRange`'),
|
|
28891
28922
|
});
|
|
28892
28923
|
|
|
28924
|
+
const MetricRegisterSchema = z.looseObject({
|
|
28925
|
+
id: z.string().optional(),
|
|
28926
|
+
sourceName: z.string(),
|
|
28927
|
+
attributeName: z.string(),
|
|
28928
|
+
type: z.number().optional(),
|
|
28929
|
+
typeEnum: z.array(z.string()).optional(),
|
|
28930
|
+
attributes: z.record(z.string(), z.unknown()).optional(),
|
|
28931
|
+
firstSeen: z.number().optional(),
|
|
28932
|
+
lastSeen: z.number().optional(),
|
|
28933
|
+
});
|
|
28934
|
+
const MetricRegisterRequestSchema = z.looseObject({
|
|
28935
|
+
sync: z.boolean().optional(),
|
|
28936
|
+
metrics: z.array(MetricRegisterSchema),
|
|
28937
|
+
});
|
|
28938
|
+
const MetricRegisterSourceSchema = z.looseObject({
|
|
28939
|
+
sourceId: z.string().optional(),
|
|
28940
|
+
name: z.string().optional(),
|
|
28941
|
+
});
|
|
28942
|
+
const MetricRegisterResponseSchema = z.looseObject({
|
|
28943
|
+
metrics: z.array(MetricRegisterSchema).optional(),
|
|
28944
|
+
sources: z.array(MetricRegisterSourceSchema).optional(),
|
|
28945
|
+
});
|
|
28946
|
+
|
|
28893
28947
|
const MetricAttributeSchema = z.looseObject({
|
|
28894
28948
|
id: z.string().optional(),
|
|
28895
28949
|
sourceName: z.string().optional(),
|
|
@@ -45490,36 +45544,35 @@ var LogQuery;
|
|
|
45490
45544
|
};
|
|
45491
45545
|
}
|
|
45492
45546
|
LogQuery.createOr = createOr;
|
|
45493
|
-
function createLogQueryRequestBody(range, ors, severities = [
|
|
45547
|
+
function createLogQueryRequestBody(range, ors, severities = [], includes = [
|
|
45494
45548
|
'_id',
|
|
45495
45549
|
'host',
|
|
45496
45550
|
'logseverity',
|
|
45497
|
-
'
|
|
45551
|
+
'logtype',
|
|
45498
45552
|
'timestamp',
|
|
45499
45553
|
'file',
|
|
45500
45554
|
'message',
|
|
45501
45555
|
], size = 1000, sort = [{ sortKey: 'timestamp', sortOrder: 'Asc' }]) {
|
|
45556
|
+
const nonEmptySeverities = severities.filter((s) => s.length > 0);
|
|
45557
|
+
const severityClause = nonEmptySeverities.length > 0
|
|
45558
|
+
? [
|
|
45559
|
+
{
|
|
45560
|
+
or: {
|
|
45561
|
+
expressions: nonEmptySeverities.map((severity) => ({
|
|
45562
|
+
fieldDescription: 'Log Severity',
|
|
45563
|
+
field: 'logseverity',
|
|
45564
|
+
value: severity,
|
|
45565
|
+
condition: 'equals',
|
|
45566
|
+
})),
|
|
45567
|
+
},
|
|
45568
|
+
},
|
|
45569
|
+
]
|
|
45570
|
+
: [];
|
|
45502
45571
|
return {
|
|
45503
45572
|
size,
|
|
45504
45573
|
query: {
|
|
45505
45574
|
and: {
|
|
45506
|
-
expressions: [
|
|
45507
|
-
{
|
|
45508
|
-
or: {
|
|
45509
|
-
expressions: [
|
|
45510
|
-
...severities.map((severity) => {
|
|
45511
|
-
return {
|
|
45512
|
-
fieldDescription: 'Log Severity',
|
|
45513
|
-
field: 'logseverity',
|
|
45514
|
-
value: severity,
|
|
45515
|
-
condition: 'equals',
|
|
45516
|
-
};
|
|
45517
|
-
}),
|
|
45518
|
-
],
|
|
45519
|
-
},
|
|
45520
|
-
},
|
|
45521
|
-
...ors,
|
|
45522
|
-
],
|
|
45575
|
+
expressions: [...severityClause, ...ors],
|
|
45523
45576
|
},
|
|
45524
45577
|
},
|
|
45525
45578
|
includes,
|
|
@@ -61083,6 +61136,15 @@ class AgentService {
|
|
|
61083
61136
|
};
|
|
61084
61137
|
return this.dxSaaSService.tenantPost('/apm/atc/api/private/trace/summary', traceSummaryRequestBody);
|
|
61085
61138
|
}
|
|
61139
|
+
/** Posts a synthetic transaction trace to the tracestore ingestion endpoint. */
|
|
61140
|
+
injectTrace(trace) {
|
|
61141
|
+
return this.injectTraces([trace]);
|
|
61142
|
+
}
|
|
61143
|
+
/** Posts one or more synthetic transaction traces to the tracestore ingestion endpoint. */
|
|
61144
|
+
injectTraces(traces) {
|
|
61145
|
+
const body = { values: traces };
|
|
61146
|
+
return this.dxSaaSService.tenantPost('/tracestore/process', body);
|
|
61147
|
+
}
|
|
61086
61148
|
/** Starts a trace session on one or more agents with optional filters. */
|
|
61087
61149
|
startAgentTrace(agents, minTXDuration, sessionDuration, parameterName, operationType, parameterNotSign, parameterValue, errorFilterValue) {
|
|
61088
61150
|
let body = {
|
|
@@ -69508,6 +69570,30 @@ class DxSaasService {
|
|
|
69508
69570
|
}
|
|
69509
69571
|
});
|
|
69510
69572
|
}
|
|
69573
|
+
/**
|
|
69574
|
+
* POST to the log ingestion gateway (`dxLogIngestionURL`) without a cohort path segment.
|
|
69575
|
+
* Auth uses the same `Bearer {userToken}` as other tenant methods.
|
|
69576
|
+
* Throws if `dxLogIngestionURL` is not set in config.
|
|
69577
|
+
*/
|
|
69578
|
+
async logPost(path, body) {
|
|
69579
|
+
const logBase = this.dxdoConfiguration.dxConfiguration.dxLogIngestionURL;
|
|
69580
|
+
if (!logBase) {
|
|
69581
|
+
throw new Error('dxLogIngestionURL is not set in config — add it to your .dxo2.config.json (e.g. "https://logs-gateway.dxi-na1.saas.broadcom.com")');
|
|
69582
|
+
}
|
|
69583
|
+
const url = `${logBase}/${path}`;
|
|
69584
|
+
this.log.debug(`log posting to: ${url}`);
|
|
69585
|
+
return this._httpClient
|
|
69586
|
+
.post(url, body ?? {}, this.createSimpleUserAuthorizedRequestConfig(undefined))
|
|
69587
|
+
.then((response) => response.data)
|
|
69588
|
+
.catch((reason) => {
|
|
69589
|
+
if (reason.response || reason.request) {
|
|
69590
|
+
throw DxSaasService.handleAxiosError(reason);
|
|
69591
|
+
}
|
|
69592
|
+
else {
|
|
69593
|
+
throw new Error(reason);
|
|
69594
|
+
}
|
|
69595
|
+
});
|
|
69596
|
+
}
|
|
69511
69597
|
/**
|
|
69512
69598
|
* GET from an ACC path, returning the response as a Node.js readable stream.
|
|
69513
69599
|
* @param path - Path segment appended after `.../acc/`.
|
|
@@ -73312,12 +73398,25 @@ class JsExtensionService {
|
|
|
73312
73398
|
}
|
|
73313
73399
|
}
|
|
73314
73400
|
|
|
73401
|
+
function detectIPv4() {
|
|
73402
|
+
const nets = networkInterfaces();
|
|
73403
|
+
for (const iface of Object.values(nets)) {
|
|
73404
|
+
if (!iface)
|
|
73405
|
+
continue;
|
|
73406
|
+
for (const net of iface) {
|
|
73407
|
+
if (net.family === 'IPv4' && !net.internal) {
|
|
73408
|
+
return net.address;
|
|
73409
|
+
}
|
|
73410
|
+
}
|
|
73411
|
+
}
|
|
73412
|
+
return '127.0.0.1';
|
|
73413
|
+
}
|
|
73315
73414
|
/**
|
|
73316
|
-
* Service for querying
|
|
73415
|
+
* Service for querying and ingesting log analytics data.
|
|
73317
73416
|
*/
|
|
73318
73417
|
class LogsService {
|
|
73319
73418
|
dxSaasService;
|
|
73320
|
-
/** @param dxSaasService - DX SaaS HTTP client
|
|
73419
|
+
/** @param dxSaasService - DX SaaS HTTP client */
|
|
73321
73420
|
constructor(dxSaasService) {
|
|
73322
73421
|
this.dxSaasService = dxSaasService;
|
|
73323
73422
|
}
|
|
@@ -73325,6 +73424,55 @@ class LogsService {
|
|
|
73325
73424
|
queryLogs(logQueryBody) {
|
|
73326
73425
|
return this.dxSaasService.oiPost('oi/loganalytics/v1/api/logs/filter', logQueryBody);
|
|
73327
73426
|
}
|
|
73427
|
+
/**
|
|
73428
|
+
* Builds the enriched payload object for a single log entry.
|
|
73429
|
+
*
|
|
73430
|
+
* @param options - Known log entry fields (all optional with sensible defaults).
|
|
73431
|
+
* @param additionalFields - Arbitrary extra fields to include in the indexed document.
|
|
73432
|
+
* @returns The payload object ready to POST to the uim_logs ingestion endpoint.
|
|
73433
|
+
*/
|
|
73434
|
+
buildLogPayload(options, additionalFields) {
|
|
73435
|
+
const cohortId = this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId;
|
|
73436
|
+
const tenantIdUpper = cohortId.toUpperCase();
|
|
73437
|
+
const logtype = options.logtype ?? 'generic';
|
|
73438
|
+
const host = options.host ?? hostname();
|
|
73439
|
+
const ip = options.ip ?? detectIPv4();
|
|
73440
|
+
const agentInstance = options.agentInstance ?? 'dx-do';
|
|
73441
|
+
const agentName = options.agentName ?? 'Logs Collector';
|
|
73442
|
+
const containerId = options.containerId ?? host;
|
|
73443
|
+
const containerName = options.containerName ?? agentInstance;
|
|
73444
|
+
const file = options.file ?? 'dx-do.cli';
|
|
73445
|
+
const tag = `${logtype} logs`;
|
|
73446
|
+
// temp_fields must have exactly 9 space-separated components before the message
|
|
73447
|
+
// is appended by the SaaS filter (agentbase_msg = temp_fields + " " + message).
|
|
73448
|
+
// The Kafka consumer parses positionally: [0]=tenant [1]=logtype [2]=host
|
|
73449
|
+
// [3]=container_id [4]=container_name [5]=ip [6-7]=tags [8]=source_file [9+]=message.
|
|
73450
|
+
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag} ${file}`;
|
|
73451
|
+
return {
|
|
73452
|
+
'@timestamp': options.timestamp ?? new Date().toISOString(),
|
|
73453
|
+
// logtype must be top-level: the SaaS filter does `update => ["type", "%{logtype}"]`
|
|
73454
|
+
// which drives Kafka consumer index routing — without it type stays as "ingestionapi"
|
|
73455
|
+
logtype,
|
|
73456
|
+
message: options.message,
|
|
73457
|
+
host: { name: host, hostname: host },
|
|
73458
|
+
tenant_id: tenantIdUpper,
|
|
73459
|
+
temp_fields,
|
|
73460
|
+
tags: [tag],
|
|
73461
|
+
__agent_name: agentName,
|
|
73462
|
+
__agent_instance: agentInstance,
|
|
73463
|
+
container_id: containerId,
|
|
73464
|
+
container_name: containerName,
|
|
73465
|
+
...additionalFields,
|
|
73466
|
+
};
|
|
73467
|
+
}
|
|
73468
|
+
/** Ingests a single log entry into the log gateway. */
|
|
73469
|
+
ingestLog(options, additionalFields) {
|
|
73470
|
+
return this.dxSaasService.logPost('mdo/v2/aoanalytics/ingestion/uim_logs', [this.buildLogPayload(options, additionalFields)]);
|
|
73471
|
+
}
|
|
73472
|
+
/** Ingests a batch of log entries into the log gateway. */
|
|
73473
|
+
ingestLogs(entries) {
|
|
73474
|
+
return this.dxSaasService.logPost('mdo/v2/aoanalytics/ingestion/uim_logs', entries.map((e) => this.buildLogPayload(e.options, e.additionalFields)));
|
|
73475
|
+
}
|
|
73328
73476
|
}
|
|
73329
73477
|
|
|
73330
73478
|
/**
|
|
@@ -73784,7 +73932,11 @@ class NASSService {
|
|
|
73784
73932
|
this.dxSaaSService = dxSaaSService;
|
|
73785
73933
|
this.log = log;
|
|
73786
73934
|
}
|
|
73787
|
-
/**
|
|
73935
|
+
/**
|
|
73936
|
+
* @deprecated Use {@link DataStoreMetricsMetadataService.registerMetrics} instead —
|
|
73937
|
+
* it accepts the full `MetricRegister[]` shape including `typeEnum`, `id`,
|
|
73938
|
+
* `firstSeen`, and `lastSeen`.
|
|
73939
|
+
*/
|
|
73788
73940
|
async registerMetrics(metricRegistrations) {
|
|
73789
73941
|
const metricRegistrationBody = {
|
|
73790
73942
|
metrics: metricRegistrations,
|
|
@@ -73844,7 +73996,9 @@ class NASSService {
|
|
|
73844
73996
|
};
|
|
73845
73997
|
return this.dxSaaSService.tenantPost('/metadata/queryMetric', metadataQuery);
|
|
73846
73998
|
}
|
|
73847
|
-
/**
|
|
73999
|
+
/**
|
|
74000
|
+
* @deprecated Use {@link DataStoreMetricsMetadataService.registerMetric} instead.
|
|
74001
|
+
*/
|
|
73848
74002
|
async registerMetric(sourceName, attributeName, metricType, attributes) {
|
|
73849
74003
|
const metricRegistrationBody = {
|
|
73850
74004
|
metrics: [
|
|
@@ -73858,7 +74012,11 @@ class NASSService {
|
|
|
73858
74012
|
};
|
|
73859
74013
|
return this.dxSaaSService.tenantPost('/metadata/registerMetric', metricRegistrationBody);
|
|
73860
74014
|
}
|
|
73861
|
-
/**
|
|
74015
|
+
/**
|
|
74016
|
+
* @deprecated Use {@link DataStoreNASSService.storeMetricValues} instead — it
|
|
74017
|
+
* accepts typed {@link NassDatapoint} tuples covering regular, string, and
|
|
74018
|
+
* extension metric variants, and returns a typed {@link NassStoreResponse}.
|
|
74019
|
+
*/
|
|
73862
74020
|
async storeMetricValue(metricValues) {
|
|
73863
74021
|
const metricStoreBody = { values: new Array() };
|
|
73864
74022
|
metricValues.forEach((metricValue) => metricStoreBody.values.push([
|
|
@@ -74858,7 +75016,11 @@ class TASService {
|
|
|
74858
75016
|
this.dxSaaSService = dxSaaSService;
|
|
74859
75017
|
this.log = log;
|
|
74860
75018
|
}
|
|
74861
|
-
/**
|
|
75019
|
+
/**
|
|
75020
|
+
* @deprecated Use {@link DataStoreTASService.storeGraph} instead — it accepts
|
|
75021
|
+
* the full `TasStoreGraphInput` model with all optional fields and returns a
|
|
75022
|
+
* typed `TasStoreGraphResponse` with `failedVertices`/`failedEdges`.
|
|
75023
|
+
*/
|
|
74862
75024
|
async storeGraph(graphBody) {
|
|
74863
75025
|
this.log.debug('storing');
|
|
74864
75026
|
return this.dxSaaSService.tenantPost('/tas/graph/store', graphBody);
|
|
@@ -76116,6 +76278,32 @@ class DataStoreMetricsMetadataService {
|
|
|
76116
76278
|
this.dxSaasService = dxSaasService;
|
|
76117
76279
|
this.log = log;
|
|
76118
76280
|
}
|
|
76281
|
+
/**
|
|
76282
|
+
* Registers one or more metrics via `POST /metadata/registerMetric`.
|
|
76283
|
+
*
|
|
76284
|
+
* @remarks The request is validated against {@link MetricRegisterRequestSchema}.
|
|
76285
|
+
* If the response fails schema validation, a warning is logged but the raw
|
|
76286
|
+
* API response is still returned.
|
|
76287
|
+
*
|
|
76288
|
+
* @throws ZodError if the request fails schema validation.
|
|
76289
|
+
*/
|
|
76290
|
+
async registerMetrics(metrics, sync) {
|
|
76291
|
+
const body = {
|
|
76292
|
+
metrics,
|
|
76293
|
+
...(sync !== undefined ? { sync } : {}),
|
|
76294
|
+
};
|
|
76295
|
+
MetricRegisterRequestSchema.parse(body);
|
|
76296
|
+
const raw = await this.dxSaasService.tenantPost('metadata/registerMetric', body);
|
|
76297
|
+
const result = MetricRegisterResponseSchema.safeParse(raw);
|
|
76298
|
+
if (!result.success) {
|
|
76299
|
+
this.log.warn('MetricRegisterResponse validation warning:', result.error.message);
|
|
76300
|
+
}
|
|
76301
|
+
return raw;
|
|
76302
|
+
}
|
|
76303
|
+
/** Registers a single metric. Convenience wrapper around {@link registerMetrics}. */
|
|
76304
|
+
async registerMetric(metric, sync) {
|
|
76305
|
+
return this.registerMetrics([metric], sync);
|
|
76306
|
+
}
|
|
76119
76307
|
/**
|
|
76120
76308
|
* POSTs a metadata query to `/metadata/queryMetric` and returns the matching
|
|
76121
76309
|
* metric / folder records.
|
|
@@ -76461,6 +76649,25 @@ class DataStoreTASService {
|
|
|
76461
76649
|
this.dxSaasService = dxSaasService;
|
|
76462
76650
|
this.log = log;
|
|
76463
76651
|
}
|
|
76652
|
+
/**
|
|
76653
|
+
* POSTs a graph to `/tas/graph/store` and returns the store result including
|
|
76654
|
+
* any failed vertices or edges.
|
|
76655
|
+
*
|
|
76656
|
+
* @remarks The request is validated against {@link TasStoreGraphInputSchema}.
|
|
76657
|
+
* If the response fails schema validation, a warning is logged but the raw
|
|
76658
|
+
* API response is still returned.
|
|
76659
|
+
*
|
|
76660
|
+
* @throws ZodError if the request fails schema validation.
|
|
76661
|
+
*/
|
|
76662
|
+
async storeGraph(input) {
|
|
76663
|
+
TasStoreGraphInputSchema.parse(input);
|
|
76664
|
+
const raw = await this.dxSaasService.tenantPost('tas/graph/store', input);
|
|
76665
|
+
const result = TasStoreGraphResponseSchema.safeParse(raw);
|
|
76666
|
+
if (!result.success) {
|
|
76667
|
+
this.log.warn('TasStoreGraphResponse validation warning:', result.error.message);
|
|
76668
|
+
}
|
|
76669
|
+
return raw;
|
|
76670
|
+
}
|
|
76464
76671
|
/**
|
|
76465
76672
|
* POSTs a TAS graph query to `/tas/graph/query` and returns the resulting
|
|
76466
76673
|
* graph (vertices, edges, states).
|
|
@@ -76944,6 +77151,50 @@ class DataStoreTokensService {
|
|
|
76944
77151
|
}
|
|
76945
77152
|
}
|
|
76946
77153
|
|
|
77154
|
+
/**
|
|
77155
|
+
* Service for storing metric data points in the DX SaaS DataStore NASS API
|
|
77156
|
+
* (`POST /nass/metricValue/store`).
|
|
77157
|
+
*
|
|
77158
|
+
* Metrics must be registered first via
|
|
77159
|
+
* {@link DataStoreMetricsMetadataService.registerMetric} before values can be
|
|
77160
|
+
* stored. Use the metric's `id` from the registration response as the first
|
|
77161
|
+
* element of each {@link NassDatapoint} tuple.
|
|
77162
|
+
*
|
|
77163
|
+
* Three datapoint variants are supported — see {@link NassDatapoint}:
|
|
77164
|
+
* - **Regular** numeric: `[id, time, min, max, value, count, interval?]`
|
|
77165
|
+
* - **String** metric: same shape but `min` and `max` must be `null`
|
|
77166
|
+
* - **Extension**: `[id, extensionId, time, interval, ...values]`
|
|
77167
|
+
*
|
|
77168
|
+
* @example
|
|
77169
|
+
* ```ts
|
|
77170
|
+
* const service = new DataStoreNASSService(dxSaasService, log);
|
|
77171
|
+
* const response = await service.storeMetricValues([
|
|
77172
|
+
* ['metricId', Date.now() / 1000, 0, 100, 42, 1, 15],
|
|
77173
|
+
* ['strMetricId', Date.now() / 1000, null, null, 'running', 1, 15],
|
|
77174
|
+
* ]);
|
|
77175
|
+
* // response.metricForwardFailures — count of failed forwarding (only present if > 0)
|
|
77176
|
+
* ```
|
|
77177
|
+
*/
|
|
77178
|
+
class DataStoreNASSService {
|
|
77179
|
+
dxSaasService;
|
|
77180
|
+
log;
|
|
77181
|
+
constructor(dxSaasService, log) {
|
|
77182
|
+
this.dxSaasService = dxSaasService;
|
|
77183
|
+
this.log = log;
|
|
77184
|
+
}
|
|
77185
|
+
/**
|
|
77186
|
+
* POSTs one or more metric datapoints to `/nass/metricValue/store`.
|
|
77187
|
+
*
|
|
77188
|
+
* @param values - Array of {@link NassDatapoint} tuples. Each tuple must
|
|
77189
|
+
* begin with a registered metric ID obtained from
|
|
77190
|
+
* {@link DataStoreMetricsMetadataService.registerMetric}.
|
|
77191
|
+
*/
|
|
77192
|
+
async storeMetricValues(values) {
|
|
77193
|
+
const body = { values };
|
|
77194
|
+
return this.dxSaasService.tenantPost('nass/metricValue/store', body);
|
|
77195
|
+
}
|
|
77196
|
+
}
|
|
77197
|
+
|
|
76947
77198
|
var NullSimpleLog = Logging.NullSimpleLog;
|
|
76948
77199
|
/**
|
|
76949
77200
|
* Creates and returns a container of all DX client services (ACC, alerts, alarms,
|
|
@@ -76975,6 +77226,7 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
|
|
|
76975
77226
|
dxChannelService: new ChannelService(dxSaaSService),
|
|
76976
77227
|
dxDashboardService: new DashboardService(dxSaaSService),
|
|
76977
77228
|
dxDataStoreMetricsMetadataService: new DataStoreMetricsMetadataService(dxSaaSService, log),
|
|
77229
|
+
dxDataStoreNASSService: new DataStoreNASSService(dxSaaSService, log),
|
|
76978
77230
|
dxDataStoreNASSQLService: new DataStoreNASSQLService(dxSaaSService, log),
|
|
76979
77231
|
dxDataStoreTASService: new DataStoreTASService(dxSaaSService, log),
|
|
76980
77232
|
dxEventService: new EventService(dxSaaSService, log),
|
|
@@ -77008,5 +77260,5 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
|
|
|
77008
77260
|
};
|
|
77009
77261
|
}
|
|
77010
77262
|
|
|
77011
|
-
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, DataStoreAuditService, DataStoreAuthViewsService, DataStoreBlobStorageService, DataStoreFeaturesService, DataStoreMetricsMetadataService, DataStoreNASSQLService, DataStoreStatesService, DataStoreTASService, DataStoreTokensService, 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, METRIC_TYPE_ENUM, METRIC_TYPE_ENUM_NAMES, METRIC_TYPE_REGION, MServe, ManagementModuleIdSchema, ManagementModuleService, MatchType, MetadataMetricQueryResponseV2Schema, MetadataMetricQuerySchema, MetricAttributeSchema, MetricBatchService, MetricFolderSchema, MetricGroupingService, MetricTypeEnumNameSchema, 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, TasAnalyticBaseSchema, TasAnalyticResultSchema, TasAndFilterSchema, TasAttributeAlertStatisticsSchema, TasAttributeFilterModeSchema, TasAttributeFilterSchema, TasAttributeNameSchema, TasAttributeTypeSchema, TasCollectAttributeNamesFilterSchema, TasCollectAttributeNamesResultSchema, TasCollectAttributeResultSchema, TasCollectAttributesFilterSchema, TasCollectCardInfoFilterSchema, TasCollectCardInfoResultSchema, TasCollectCardInfoTierSchema, TasCollectCountsFilterSchema, TasCollectCountsResultSchema, TasCollectExperienceAttributesFilterSchema, TasCollectExperienceSelectorSchema, TasCollectGroupingInfoFilterSchema, TasCollectGroupingInfoResultSchema, TasCollectVertexIdFilterSchema, TasCoverageFilterSchema, TasEdgeSchema, TasEmptyFilterSchema, TasExternalIdSchema, TasFilterSchema, TasFollowPathFilterSchema, TasFollowPathFlowFilterSchema, TasFollowPathTypeSchema, TasGraphSchema, TasGroupingAlertStatisticsSchema, TasGroupingInfoSchema, 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, VertexStateNumericIdSchema, VertexStateSchema, VertexStatusChanges, ags, agsresponse, apiTokenCreate, apiTokenDelete, apiTokenGet, apiTokenList, apiTokenUpdate, checkGet, composeMetricTypeBits, contactActivate, contactDelete, contactTestSend, contactsBlockDelete, contactsBlockPut, contactsConfirm, contactsCreate, contactsGet, contactsGetDetail, contactsReplaceNotificationsWith, contactsRequestConfirmationCode, contactsUpdate, convertLegacyConfiguration, createPostmanRequest, createServiceMonolith, decodeMetricTypeBits, escapeRegExp, example, excludedAttributes, folderAccessGet, folderDelete, folderGet, folderPost, folderUpdate, foldersList, getDataStoreSchema, getUserTokenSub, getUserTokenTid, getVertexAttributeValue, getVertexAttributeValueOrNull, hasVertexAttribute, inventorizePreview, inventorizeResponse, inventorySearchRequestBodyExample, inventorySearchResponseBody, isDataStoreSchemaType, isTenantToken, isUserToken, listDataStoreSchemaOps, 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, summarizeDataStoreSchema, tagsGetAll, timezonesList, userBlockDelete, userBlockPut, userDelete, userGet, userLockDelete, userPut, userSubaccountsGet, userSubaccountsPost, verifyAndDumpLegacyConfiguration, verifyAndDumpVersion3Configuration, verifyAndDumpVersion4Configuration, vertexMatchesFilters };
|
|
77263
|
+
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, DataStoreAuditService, DataStoreAuthViewsService, DataStoreBlobStorageService, DataStoreFeaturesService, DataStoreMetricsMetadataService, DataStoreNASSQLService, DataStoreNASSService, DataStoreStatesService, DataStoreTASService, DataStoreTokensService, 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, METRIC_TYPE_ENUM, METRIC_TYPE_ENUM_NAMES, METRIC_TYPE_REGION, MServe, ManagementModuleIdSchema, ManagementModuleService, MatchType, MetadataMetricQueryResponseV2Schema, MetadataMetricQuerySchema, MetricAttributeSchema, MetricBatchService, MetricFolderSchema, MetricGroupingService, MetricRegisterRequestSchema, MetricRegisterResponseSchema, MetricRegisterSchema, MetricRegisterSourceSchema, MetricTypeEnumNameSchema, 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, TasAnalyticBaseSchema, TasAnalyticResultSchema, TasAndFilterSchema, TasAttributeAlertStatisticsSchema, TasAttributeFilterModeSchema, TasAttributeFilterSchema, TasAttributeNameSchema, TasAttributeTypeSchema, TasCollectAttributeNamesFilterSchema, TasCollectAttributeNamesResultSchema, TasCollectAttributeResultSchema, TasCollectAttributesFilterSchema, TasCollectCardInfoFilterSchema, TasCollectCardInfoResultSchema, TasCollectCardInfoTierSchema, TasCollectCountsFilterSchema, TasCollectCountsResultSchema, TasCollectExperienceAttributesFilterSchema, TasCollectExperienceSelectorSchema, TasCollectGroupingInfoFilterSchema, TasCollectGroupingInfoResultSchema, TasCollectVertexIdFilterSchema, TasCoverageFilterSchema, TasEdgeSchema, TasEmptyFilterSchema, TasExternalIdSchema, TasFilterSchema, TasFollowPathFilterSchema, TasFollowPathFlowFilterSchema, TasFollowPathTypeSchema, TasGraphSchema, TasGroupingAlertStatisticsSchema, TasGroupingInfoSchema, TasGroupingItemSchema, TasJoinFilterSchema, TasJoinTypeSchema, TasLayerFilterSchema, TasLegacyFilterSchema, TasLuceneFilterSchema, TasNotFilterSchema, TasOrFilterSchema, TasOrderSchema, TasProjectionFilterSchema, TasQuerySchema, TasServiceFilterSchema, TasStatusFilterSchema, TasStoreChangeSchema, TasStoreGraphInputSchema, TasStoreGraphResponseSchema, TasTakeEdgesFilterSchema, TasTakeFlowsFilterSchema, TasTakeVerticesFilterSchema, TasTraverseFilterSchema, TasVariableFilterSchema, TasVariableSchema, TasVertexIdFilterSchema, TasVertexSchema, TasViewSchema, Trace, TraversalEdgeFilterSchema, TraversalVertexFilterSchema, TraverseCollectSchema, TraverseDirectionSchema, TraverseSchema, VertexMappingConfigurationModule, VertexService, VertexStateExternalIdSchema, VertexStateNumericIdSchema, VertexStateSchema, VertexStatusChanges, ags, agsresponse, apiTokenCreate, apiTokenDelete, apiTokenGet, apiTokenList, apiTokenUpdate, checkGet, composeMetricTypeBits, contactActivate, contactDelete, contactTestSend, contactsBlockDelete, contactsBlockPut, contactsConfirm, contactsCreate, contactsGet, contactsGetDetail, contactsReplaceNotificationsWith, contactsRequestConfirmationCode, contactsUpdate, convertLegacyConfiguration, createPostmanRequest, createServiceMonolith, decodeMetricTypeBits, escapeRegExp, example, excludedAttributes, folderAccessGet, folderDelete, folderGet, folderPost, folderUpdate, foldersList, getDataStoreSchema, getUserTokenSub, getUserTokenTid, getVertexAttributeValue, getVertexAttributeValueOrNull, hasVertexAttribute, inventorizePreview, inventorizeResponse, inventorySearchRequestBodyExample, inventorySearchResponseBody, isDataStoreSchemaType, isTenantToken, isUserToken, listDataStoreSchemaOps, 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, summarizeDataStoreSchema, tagsGetAll, timezonesList, userBlockDelete, userBlockPut, userDelete, userGet, userLockDelete, userPut, userSubaccountsGet, userSubaccountsPost, verifyAndDumpLegacyConfiguration, verifyAndDumpVersion3Configuration, verifyAndDumpVersion4Configuration, vertexMatchesFilters };
|
|
77012
77264
|
//# sourceMappingURL=index.esm.js.map
|