@dx-do/client 7.8.0 → 7.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +415 -80
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +409 -81
- package/dist/index.esm.js.map +1 -1
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts +8 -0
- package/dist/src/lib/model/config/DXDoConfiguration.d.ts.map +1 -1
- package/dist/src/lib/model/datastore/tas/store.d.ts +114 -129
- package/dist/src/lib/model/datastore/tas/store.d.ts.map +1 -1
- package/dist/src/lib/model/log/ingest.d.ts +13 -0
- package/dist/src/lib/model/log/ingest.d.ts.map +1 -1
- package/dist/src/lib/model/nass/NASS.d.ts +4 -2
- package/dist/src/lib/model/nass/NASS.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.create.d.ts +19 -0
- package/dist/src/lib/model/oi/services.create.d.ts.map +1 -1
- package/dist/src/lib/model/oi/services.transform.d.ts +20 -1
- package/dist/src/lib/model/oi/services.transform.d.ts.map +1 -1
- package/dist/src/lib/model/service/service-overview.d.ts +2 -0
- package/dist/src/lib/model/service/service-overview.d.ts.map +1 -1
- package/dist/src/lib/model/tas/TASGraph.d.ts +7 -3
- package/dist/src/lib/model/tas/TASGraph.d.ts.map +1 -1
- package/dist/src/lib/services/alarm.service.d.ts +11 -1
- package/dist/src/lib/services/alarm.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts +6 -3
- package/dist/src/lib/services/datastore/datastore-metrics-metadata.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts +6 -2
- package/dist/src/lib/services/datastore/datastore-nass.service.d.ts.map +1 -1
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts +8 -5
- package/dist/src/lib/services/datastore/datastore-tas.service.d.ts.map +1 -1
- package/dist/src/lib/services/dx-saas.service.d.ts +16 -7
- package/dist/src/lib/services/dx-saas.service.d.ts.map +1 -1
- package/dist/src/lib/services/event.service.d.ts +10 -1
- package/dist/src/lib/services/event.service.d.ts.map +1 -1
- package/dist/src/lib/services/logs.service.d.ts +40 -0
- package/dist/src/lib/services/logs.service.d.ts.map +1 -1
- package/dist/src/lib/services/service.service.d.ts +24 -2
- package/dist/src/lib/services/service.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -49397,29 +49397,114 @@ const TasGraphSchema = v4.z.looseObject({
|
|
|
49397
49397
|
totalEdges: v4.z.number().optional(),
|
|
49398
49398
|
});
|
|
49399
49399
|
|
|
49400
|
+
/**
|
|
49401
|
+
* Attribute value the TAS write interface accepts: a string or a list of
|
|
49402
|
+
* strings (`docs/data-store-doc/tas-rest.html`, "Write Interface").
|
|
49403
|
+
*/
|
|
49404
|
+
const TasStoreAttributeValueSchema = v4.z
|
|
49405
|
+
.union([v4.z.string(), v4.z.array(v4.z.string())])
|
|
49406
|
+
.describe('Attribute value: a string or an array of strings');
|
|
49407
|
+
/**
|
|
49408
|
+
* Request-side vertex for `POST /tas/graph/store`.
|
|
49409
|
+
*
|
|
49410
|
+
* Ingestion identifies a vertex by `externalId` only — a vertex being created
|
|
49411
|
+
* has no numeric id yet (`docs/data-store-doc/tas-index.html` §2.2, "ingestion
|
|
49412
|
+
* tasks should use external ID only") — so this deliberately differs from the
|
|
49413
|
+
* response-side `TasVertexSchema`, which requires `id`.
|
|
49414
|
+
*/
|
|
49415
|
+
const TasStoreVertexSchema = v4.z.looseObject({
|
|
49416
|
+
externalId: TasExternalIdSchema.describe('Ingestion identity of the vertex (`<LAYER>:<TYPE>:…`); the only id a producer supplies'),
|
|
49417
|
+
id: v4.z
|
|
49418
|
+
.number()
|
|
49419
|
+
.optional()
|
|
49420
|
+
.describe('Numeric id; only meaningful when updating a vertex the platform already holds'),
|
|
49421
|
+
startTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49422
|
+
endTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49423
|
+
attributes: v4.z
|
|
49424
|
+
.object({
|
|
49425
|
+
name: v4.z.string().describe('Display name — required by the platform'),
|
|
49426
|
+
type: v4.z
|
|
49427
|
+
.string()
|
|
49428
|
+
.describe('Vertex type, e.g. AGENT or ACTIVEMQ_DESTINATION — required by the platform'),
|
|
49429
|
+
})
|
|
49430
|
+
.catchall(TasStoreAttributeValueSchema)
|
|
49431
|
+
.describe('Complete attribute set. A GATHERED store replaces the previous attribute set wholesale, so always send every attribute'),
|
|
49432
|
+
attributesType: v4.z
|
|
49433
|
+
.record(v4.z.string(), TasAttributeTypeSchema)
|
|
49434
|
+
.optional()
|
|
49435
|
+
.describe('Per-attribute store type override (GATHERED, CUSTOM, DECORATED, HIDDEN)'),
|
|
49436
|
+
});
|
|
49437
|
+
/**
|
|
49438
|
+
* Request-side edge for `POST /tas/graph/store`: endpoints are named by
|
|
49439
|
+
* `externalId`; numeric ids are optional and only apply to edges between
|
|
49440
|
+
* vertices the platform already holds. The platform silently drops an edge
|
|
49441
|
+
* whose endpoint vertex does not exist.
|
|
49442
|
+
*/
|
|
49443
|
+
const TasStoreEdgeSchema = v4.z.looseObject({
|
|
49444
|
+
sourceExternalId: TasExternalIdSchema.describe('externalId of the source (parent) vertex'),
|
|
49445
|
+
targetExternalId: TasExternalIdSchema.describe('externalId of the target (child) vertex'),
|
|
49446
|
+
flowExternalId: TasExternalIdSchema.optional().describe('externalId of the flow vertex, when the edge belongs to a flow'),
|
|
49447
|
+
wireExternalId: TasExternalIdSchema.optional().describe('externalId of the wire vertex, when the edge belongs to a wire'),
|
|
49448
|
+
sourceId: v4.z.number().optional().describe('Numeric id of the source vertex (existing vertices only)'),
|
|
49449
|
+
targetId: v4.z.number().optional().describe('Numeric id of the target vertex (existing vertices only)'),
|
|
49450
|
+
flowId: v4.z.number().optional().describe('Numeric id of the flow vertex'),
|
|
49451
|
+
wireId: v4.z.number().optional().describe('Numeric id of the wire vertex'),
|
|
49452
|
+
startTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49453
|
+
endTime: v4.z.number().optional().describe('Epoch milliseconds'),
|
|
49454
|
+
attributes: v4.z
|
|
49455
|
+
.record(v4.z.string(), TasStoreAttributeValueSchema)
|
|
49456
|
+
.optional()
|
|
49457
|
+
.describe('Edge attributes (e.g. `semantic`)'),
|
|
49458
|
+
attributesType: v4.z
|
|
49459
|
+
.record(v4.z.string(), TasAttributeTypeSchema)
|
|
49460
|
+
.optional()
|
|
49461
|
+
.describe('Per-attribute store type override'),
|
|
49462
|
+
});
|
|
49463
|
+
/** The graph body of a store request: externalId-keyed vertices and edges. */
|
|
49464
|
+
const TasStoreGraphSchema = v4.z.looseObject({
|
|
49465
|
+
vertices: v4.z.array(TasStoreVertexSchema).optional().describe('Vertices to create or update'),
|
|
49466
|
+
edges: v4.z.array(TasStoreEdgeSchema).optional().describe('Edges to create or update'),
|
|
49467
|
+
});
|
|
49400
49468
|
const TasStoreGraphInputSchema = v4.z.looseObject({
|
|
49401
|
-
includeSuccessResult: v4.z
|
|
49402
|
-
|
|
49403
|
-
|
|
49404
|
-
|
|
49405
|
-
|
|
49469
|
+
includeSuccessResult: v4.z
|
|
49470
|
+
.boolean()
|
|
49471
|
+
.optional()
|
|
49472
|
+
.describe('Echo the stored graph back in the response'),
|
|
49473
|
+
ttl: v4.z
|
|
49474
|
+
.number()
|
|
49475
|
+
.optional()
|
|
49476
|
+
.describe('Time to live in milliseconds for every vertex in this request; omitted = the platform default (24 h). One ttl per request'),
|
|
49477
|
+
endTimeAllowedThreshold: v4.z.number().optional().describe('Platform option; see tas-rest.html'),
|
|
49478
|
+
storeType: TasAttributeTypeSchema.optional().describe('Attribute store type for the whole request (default GATHERED)'),
|
|
49479
|
+
graph: TasStoreGraphSchema,
|
|
49406
49480
|
});
|
|
49407
49481
|
const TasStoreChangeSchema = v4.z.looseObject({
|
|
49408
49482
|
changeType: v4.z.string().optional(),
|
|
49409
49483
|
id: v4.z.unknown().optional(),
|
|
49410
49484
|
});
|
|
49485
|
+
/**
|
|
49486
|
+
* A vertex or edge the platform refused, echoed back as it was sent (so it
|
|
49487
|
+
* carries the request-side externalId shape, not a numeric id).
|
|
49488
|
+
*/
|
|
49489
|
+
const TasStoreFailedObjectSchema = v4.z.looseObject({
|
|
49490
|
+
externalId: TasExternalIdSchema.optional(),
|
|
49491
|
+
sourceExternalId: TasExternalIdSchema.optional(),
|
|
49492
|
+
targetExternalId: TasExternalIdSchema.optional(),
|
|
49493
|
+
id: v4.z.number().optional(),
|
|
49494
|
+
attributes: v4.z.record(v4.z.string(), v4.z.unknown()).optional(),
|
|
49495
|
+
});
|
|
49411
49496
|
const TasStoreGraphResponseSchema = v4.z.looseObject({
|
|
49412
49497
|
graph: TasGraphSchema.optional(),
|
|
49413
49498
|
failedVertices: v4.z
|
|
49414
49499
|
.array(v4.z.looseObject({
|
|
49415
|
-
object:
|
|
49500
|
+
object: TasStoreFailedObjectSchema,
|
|
49416
49501
|
code: v4.z.string().optional(),
|
|
49417
49502
|
message: v4.z.string().optional(),
|
|
49418
49503
|
}))
|
|
49419
49504
|
.optional(),
|
|
49420
49505
|
failedEdges: v4.z
|
|
49421
49506
|
.array(v4.z.looseObject({
|
|
49422
|
-
object:
|
|
49507
|
+
object: TasStoreFailedObjectSchema,
|
|
49423
49508
|
code: v4.z.string().optional(),
|
|
49424
49509
|
message: v4.z.string().optional(),
|
|
49425
49510
|
}))
|
|
@@ -60106,6 +60191,24 @@ exports.LogIngest = void 0;
|
|
|
60106
60191
|
return LogIngest.RESERVED_ADDITIONAL_FIELDS.includes(name.toLowerCase());
|
|
60107
60192
|
}
|
|
60108
60193
|
LogIngest.isReservedLogField = isReservedLogField;
|
|
60194
|
+
/**
|
|
60195
|
+
* Thrown by `DxSaasService.resolveLogIngestionURL` when no log gateway can
|
|
60196
|
+
* be determined. `definitive` is true when the profile itself rules an
|
|
60197
|
+
* endpoint out (unparseable or on-premise gateway, Log Analytics absent or
|
|
60198
|
+
* not provisioned) and false when only the products lookup failed — a
|
|
60199
|
+
* producer keeps shipping off for the process in the first case and retries
|
|
60200
|
+
* later in the second. The message names the reason and how to set
|
|
60201
|
+
* `dxLogIngestionURL`.
|
|
60202
|
+
*/
|
|
60203
|
+
class LogIngestionEndpointError extends Error {
|
|
60204
|
+
definitive;
|
|
60205
|
+
constructor(message, definitive) {
|
|
60206
|
+
super(message);
|
|
60207
|
+
this.definitive = definitive;
|
|
60208
|
+
this.name = 'LogIngestionEndpointError';
|
|
60209
|
+
}
|
|
60210
|
+
}
|
|
60211
|
+
LogIngest.LogIngestionEndpointError = LogIngestionEndpointError;
|
|
60109
60212
|
LogIngest.LogIngestOptionsSchema = v4.z.looseObject({
|
|
60110
60213
|
logtype: v4.z
|
|
60111
60214
|
.string()
|
|
@@ -60140,7 +60243,7 @@ exports.LogIngest = void 0;
|
|
|
60140
60243
|
file: v4.z
|
|
60141
60244
|
.string()
|
|
60142
60245
|
.optional()
|
|
60143
|
-
.describe('Source file label (default: `"dx-do.cli"`)'),
|
|
60246
|
+
.describe('Source file label, typically a logger name (default: `"dx-do.cli"`). A value without a dot gets `.log` appended: the platform only parses a dotted source file, and an undotted one corrupts the stored `message`, `file` and `tags` (#620).'),
|
|
60144
60247
|
ip: v4.z
|
|
60145
60248
|
.string()
|
|
60146
60249
|
.optional()
|
|
@@ -60620,6 +60723,12 @@ exports.OIAlarm = void 0;
|
|
|
60620
60723
|
};
|
|
60621
60724
|
})(exports.OIAlarm || (exports.OIAlarm = {}));
|
|
60622
60725
|
|
|
60726
|
+
exports.CreateServices = void 0;
|
|
60727
|
+
(function (CreateServices) {
|
|
60728
|
+
/** The service kinds the platform recognises, in wire casing (`servicerepo/filters` catalog). */
|
|
60729
|
+
CreateServices.SERVICE_TYPES = ['Service', 'Application', 'Group'];
|
|
60730
|
+
})(exports.CreateServices || (exports.CreateServices = {}));
|
|
60731
|
+
|
|
60623
60732
|
/**
|
|
60624
60733
|
* The `service export` / `service export-hierarchy` file format and the
|
|
60625
60734
|
* `service import` boundary validator.
|
|
@@ -60700,6 +60809,7 @@ exports.ServiceTransform = void 0;
|
|
|
60700
60809
|
attributes: {
|
|
60701
60810
|
type: 'saService',
|
|
60702
60811
|
name: a.name,
|
|
60812
|
+
serviceType: normalizeServiceType(a.serviceType),
|
|
60703
60813
|
state: 'ACTIVE',
|
|
60704
60814
|
maintenance: a.maintenance ?? false,
|
|
60705
60815
|
situationsIncludeChildServices: a.situationsIncludeChildServices ?? false,
|
|
@@ -60715,6 +60825,80 @@ exports.ServiceTransform = void 0;
|
|
|
60715
60825
|
};
|
|
60716
60826
|
}
|
|
60717
60827
|
ServiceTransform.retrievedToServiceVertex = retrievedToServiceVertex;
|
|
60828
|
+
const SERVICE_TYPE_BY_LOWER = Object.fromEntries(exports.CreateServices.SERVICE_TYPES.map((t) => [t.toLowerCase(), t]));
|
|
60829
|
+
/**
|
|
60830
|
+
* Canonicalise a read-back `serviceType` (any casing). Missing or unknown
|
|
60831
|
+
* values map to `Service`, the server's default for records that predate
|
|
60832
|
+
* the field.
|
|
60833
|
+
*/
|
|
60834
|
+
function normalizeServiceType(value) {
|
|
60835
|
+
if (typeof value !== 'string')
|
|
60836
|
+
return 'Service';
|
|
60837
|
+
return SERVICE_TYPE_BY_LOWER[value.toLowerCase()] ?? 'Service';
|
|
60838
|
+
}
|
|
60839
|
+
ServiceTransform.normalizeServiceType = normalizeServiceType;
|
|
60840
|
+
/** Parse a user-supplied service type (`service|application|group`, any casing); throws on anything else. */
|
|
60841
|
+
function parseServiceType(input) {
|
|
60842
|
+
const t = SERVICE_TYPE_BY_LOWER[input.trim().toLowerCase()];
|
|
60843
|
+
if (!t) {
|
|
60844
|
+
throw new Error(`Unknown service type '${input}' — expected one of ${exports.CreateServices.SERVICE_TYPES.map((x) => x.toLowerCase()).join(', ')}`);
|
|
60845
|
+
}
|
|
60846
|
+
return t;
|
|
60847
|
+
}
|
|
60848
|
+
ServiceTransform.parseServiceType = parseServiceType;
|
|
60849
|
+
function list(xs) {
|
|
60850
|
+
return `[${xs.join(', ')}]`;
|
|
60851
|
+
}
|
|
60852
|
+
function sameSet(a, b) {
|
|
60853
|
+
const sa = [...a].sort();
|
|
60854
|
+
const sb = [...b].sort();
|
|
60855
|
+
return sa.length === sb.length && sa.every((x, i) => x === sb[i]);
|
|
60856
|
+
}
|
|
60857
|
+
function propPairs(ps) {
|
|
60858
|
+
return ps.map((p) => `${p.name}=${p.value}`);
|
|
60859
|
+
}
|
|
60860
|
+
/**
|
|
60861
|
+
* Apply an attribute patch to ONE vertex of a store body (in place) and return
|
|
60862
|
+
* human-readable change lines; an empty result means nothing differs. Fields
|
|
60863
|
+
* omitted from the patch keep their values; `tags` / `customProperties` are
|
|
60864
|
+
* replaced wholesale (what the UI editor sends), not merged. The name and the
|
|
60865
|
+
* `serviceType` are never touched — both are fixed at creation (the server
|
|
60866
|
+
* does not allow renames and ignores a type change on a re-save).
|
|
60867
|
+
*
|
|
60868
|
+
* @throws Error if `serviceName` is not among `body.vertices`.
|
|
60869
|
+
*/
|
|
60870
|
+
function applyServiceUpdate(body, serviceName, patch) {
|
|
60871
|
+
const target = body.vertices.find((v) => v.attributes.name === serviceName);
|
|
60872
|
+
if (!target) {
|
|
60873
|
+
throw new Error(`No service with name '${serviceName}' found`);
|
|
60874
|
+
}
|
|
60875
|
+
const a = target.attributes;
|
|
60876
|
+
const changes = [];
|
|
60877
|
+
if (patch.description !== undefined && patch.description !== a.description) {
|
|
60878
|
+
changes.push(`description: '${a.description}' -> '${patch.description}'`);
|
|
60879
|
+
a.description = patch.description;
|
|
60880
|
+
}
|
|
60881
|
+
if (patch.location !== undefined && patch.location !== a.location) {
|
|
60882
|
+
changes.push(`location: '${a.location}' -> '${patch.location}'`);
|
|
60883
|
+
a.location = patch.location;
|
|
60884
|
+
}
|
|
60885
|
+
if (patch.tags !== undefined && !sameSet(patch.tags, a.tags)) {
|
|
60886
|
+
changes.push(`tags: ${list(a.tags)} -> ${list(patch.tags)}`);
|
|
60887
|
+
a.tags = [...patch.tags];
|
|
60888
|
+
}
|
|
60889
|
+
if (patch.customProperties !== undefined &&
|
|
60890
|
+
!sameSet(propPairs(patch.customProperties), propPairs(a.customProperties))) {
|
|
60891
|
+
changes.push(`properties: ${list(propPairs(a.customProperties))} -> ${list(propPairs(patch.customProperties))}`);
|
|
60892
|
+
a.customProperties = patch.customProperties.map((p) => ({ ...p }));
|
|
60893
|
+
}
|
|
60894
|
+
if (patch.situationsIncludeChildServices !== undefined &&
|
|
60895
|
+
patch.situationsIncludeChildServices !== a.situationsIncludeChildServices) {
|
|
60896
|
+
changes.push(`includeChildServices: ${a.situationsIncludeChildServices} -> ${patch.situationsIncludeChildServices}`);
|
|
60897
|
+
a.situationsIncludeChildServices = patch.situationsIncludeChildServices;
|
|
60898
|
+
}
|
|
60899
|
+
return changes;
|
|
60900
|
+
}
|
|
60901
|
+
ServiceTransform.applyServiceUpdate = applyServiceUpdate;
|
|
60718
60902
|
/**
|
|
60719
60903
|
* Build NAME-keyed store edges from a topology graph, preserving weights +
|
|
60720
60904
|
* semantic. Endpoints are mapped from `SA:<uuid>` to service name via the
|
|
@@ -67144,6 +67328,46 @@ class AlarmService {
|
|
|
67144
67328
|
alarmId: alarmId,
|
|
67145
67329
|
});
|
|
67146
67330
|
}
|
|
67331
|
+
/**
|
|
67332
|
+
* Finds one alarm, open or closed, by its ID (for an ingested alarm, the
|
|
67333
|
+
* `alarm_unique_id` it was sent with) among alarms from the last
|
|
67334
|
+
* `lookbackMs`, through the alarm search.
|
|
67335
|
+
*
|
|
67336
|
+
* @remarks Resolves `undefined` when there is no such alarm. {@link getAlarm}
|
|
67337
|
+
* cannot tell that apart from a failure: its endpoint answers HTTP 500 for an
|
|
67338
|
+
* unknown ID.
|
|
67339
|
+
*/
|
|
67340
|
+
async findAlarm(alarmId, lookbackMs, requestOverrides = {}) {
|
|
67341
|
+
const now = Date.now();
|
|
67342
|
+
const body = {
|
|
67343
|
+
...DEFAULT_ALARMS_REQUEST_BODY$1,
|
|
67344
|
+
timeFrom: now - lookbackMs,
|
|
67345
|
+
timeTo: now,
|
|
67346
|
+
pageNumber: 0,
|
|
67347
|
+
pageSize: 10,
|
|
67348
|
+
includeClosedAlarms: true,
|
|
67349
|
+
customFilter: {
|
|
67350
|
+
and: {
|
|
67351
|
+
expressions: [
|
|
67352
|
+
{
|
|
67353
|
+
or: {
|
|
67354
|
+
expressions: [
|
|
67355
|
+
{
|
|
67356
|
+
fieldDescription: 'Alarm Id',
|
|
67357
|
+
field: 'alarmId',
|
|
67358
|
+
value: alarmId,
|
|
67359
|
+
condition: 'equals',
|
|
67360
|
+
},
|
|
67361
|
+
],
|
|
67362
|
+
},
|
|
67363
|
+
},
|
|
67364
|
+
],
|
|
67365
|
+
},
|
|
67366
|
+
},
|
|
67367
|
+
};
|
|
67368
|
+
const response = await this.dxSaaSService.oiPost('oi/v2/api/alarms/_search', body, undefined, undefined, requestOverrides);
|
|
67369
|
+
return (response.alarms ?? []).find((alarm) => alarm.alarmId === alarmId);
|
|
67370
|
+
}
|
|
67147
67371
|
/** Returns the overview (first alarm in a custom-filter search) for an alarm ID. */
|
|
67148
67372
|
async getAlarmOverview(alarmId) {
|
|
67149
67373
|
const singleAlarmQuery = await this.dxSaaSService.oiPost('oi/v2/api/alarms/_search', {
|
|
@@ -75647,6 +75871,12 @@ class DxSaasService {
|
|
|
75647
75871
|
this.simplifiedCohortId = this.dxdoConfiguration.dxConfiguration.cohortId
|
|
75648
75872
|
.replace(/-/g, '')
|
|
75649
75873
|
.toLowerCase();
|
|
75874
|
+
// Opt-in only: without it axios keeps its default of no timeout, which the
|
|
75875
|
+
// CLI's streaming and long-running query paths rely on.
|
|
75876
|
+
const requestTimeoutMs = this.dxdoConfiguration.requestTimeoutMs;
|
|
75877
|
+
if (requestTimeoutMs !== undefined && requestTimeoutMs > 0) {
|
|
75878
|
+
this._httpClient.defaults.timeout = requestTimeoutMs;
|
|
75879
|
+
}
|
|
75650
75880
|
this.initializeProxyIfNecessary();
|
|
75651
75881
|
// Strip auth tokens from any error this client surfaces, so nothing downstream
|
|
75652
75882
|
// (handleAxiosError, re-throws, top-level catches) can log the Authorization header.
|
|
@@ -75931,9 +76161,7 @@ class DxSaasService {
|
|
|
75931
76161
|
* @param body - Request body (JSON-serializable). Defaults to `{}`.
|
|
75932
76162
|
* @param params - Query-string parameters.
|
|
75933
76163
|
* @param headers - Additional request headers merged over the auth header.
|
|
75934
|
-
* @param requestOverrides - Per-call axios settings
|
|
75935
|
-
* the shared client has no default timeout, so a caller that must not
|
|
75936
|
-
* hang — the at-exit command audit — bounds itself here.
|
|
76164
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
75937
76165
|
*/
|
|
75938
76166
|
async tenantPost(path, body, params, headers = {}, requestOverrides = {}) {
|
|
75939
76167
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
@@ -76126,10 +76354,14 @@ class DxSaasService {
|
|
|
76126
76354
|
* @param body - Request body.
|
|
76127
76355
|
* @param params - Query-string parameters.
|
|
76128
76356
|
* @param extraHeaders - Additional request headers.
|
|
76357
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
76129
76358
|
*/
|
|
76130
|
-
async oiPost(path, body, params, extraHeaders) {
|
|
76359
|
+
async oiPost(path, body, params, extraHeaders, requestOverrides = {}) {
|
|
76131
76360
|
const url = `${this.dxdoConfiguration.dxConfiguration.dxGatewayHost}${this.getCohortIDForURL()}/${path}`;
|
|
76132
|
-
const config =
|
|
76361
|
+
const config = {
|
|
76362
|
+
...this.createUserAuthorizedRequestConfig(params ?? {}),
|
|
76363
|
+
...requestOverrides,
|
|
76364
|
+
};
|
|
76133
76365
|
if (extraHeaders) {
|
|
76134
76366
|
if (config.headers) {
|
|
76135
76367
|
config.headers = { ...config.headers, ...extraHeaders };
|
|
@@ -76278,7 +76510,10 @@ class DxSaasService {
|
|
|
76278
76510
|
}
|
|
76279
76511
|
const profile = this.dxdoConfiguration.configurationFilePath ?? '~/.dxdo/<profile>.dxo2.config.json';
|
|
76280
76512
|
const host = config.dxGatewayHost;
|
|
76281
|
-
|
|
76513
|
+
// `definitive` tells a long-running producer whether to give up on log
|
|
76514
|
+
// shipping for the process (the profile itself rules it out) or to retry
|
|
76515
|
+
// later (only the products lookup failed, e.g. a maintenance window).
|
|
76516
|
+
const cannot = (reason, definitive = true) => new exports.LogIngest.LogIngestionEndpointError(`Cannot determine the log ingestion endpoint: ${reason}`, definitive);
|
|
76282
76517
|
let gateway;
|
|
76283
76518
|
try {
|
|
76284
76519
|
gateway = parseSaasGateway(host);
|
|
@@ -76301,7 +76536,7 @@ class DxSaasService {
|
|
|
76301
76536
|
catch (error) {
|
|
76302
76537
|
const message = error instanceof Error ? error.message : String(error);
|
|
76303
76538
|
throw cannot(`the tenant products lookup (GET spp/v5/products on ${gateway.hostname}) failed: ${message}. ` +
|
|
76304
|
-
`Set "dxLogIngestionURL" (e.g. "${derived}") in ${profile} to bypass the lookup
|
|
76539
|
+
`Set "dxLogIngestionURL" (e.g. "${derived}") in ${profile} to bypass the lookup.`, false);
|
|
76305
76540
|
}
|
|
76306
76541
|
const tenant = products.displayName ?? '?';
|
|
76307
76542
|
const la = findProduct(products, LOG_ANALYTICS_PRODUCT);
|
|
@@ -76325,14 +76560,19 @@ class DxSaasService {
|
|
|
76325
76560
|
* `dxLogIngestionURL`, or the SaaS logs-gateway derived from the region and
|
|
76326
76561
|
* Log Analytics provisioning. Auth uses the same `Bearer {userToken}` as
|
|
76327
76562
|
* other tenant methods.
|
|
76328
|
-
* @
|
|
76563
|
+
* @param requestOverrides - Per-call axios settings, see {@link RequestOverrides}.
|
|
76564
|
+
* @throws {@link LogIngest.LogIngestionEndpointError} from
|
|
76565
|
+
* {@link resolveLogIngestionURL} when no endpoint can be determined.
|
|
76329
76566
|
*/
|
|
76330
|
-
async logPost(path, body) {
|
|
76567
|
+
async logPost(path, body, requestOverrides = {}) {
|
|
76331
76568
|
const logBase = await this.resolveLogIngestionURL();
|
|
76332
76569
|
const url = `${logBase}/${path}`;
|
|
76333
76570
|
this.log.debug(`log posting to: ${url}`);
|
|
76334
76571
|
return this._httpClient
|
|
76335
|
-
.post(url, body ?? {},
|
|
76572
|
+
.post(url, body ?? {}, {
|
|
76573
|
+
...this.createSimpleUserAuthorizedRequestConfig(undefined),
|
|
76574
|
+
...requestOverrides,
|
|
76575
|
+
})
|
|
76336
76576
|
.then((response) => response.data)
|
|
76337
76577
|
.catch((reason) => {
|
|
76338
76578
|
if (reason.response || reason.request) {
|
|
@@ -76973,6 +77213,17 @@ class EventService {
|
|
|
76973
77213
|
}
|
|
76974
77214
|
/** Ingests a custom alarm event via the Jarvis ingestion API. */
|
|
76975
77215
|
createAlarm(alarmEvent) {
|
|
77216
|
+
return this.createAlarms([alarmEvent]);
|
|
77217
|
+
}
|
|
77218
|
+
/**
|
|
77219
|
+
* Ingests several custom alarm documents in one Jarvis ingestion request.
|
|
77220
|
+
*
|
|
77221
|
+
* @remarks Each document's `alarm_unique_id` is its alarm's id: a second
|
|
77222
|
+
* document with the same id updates that alarm in place, a closed alarm
|
|
77223
|
+
* ignores every later document, and a CLOSED document for an id that was
|
|
77224
|
+
* never opened creates a closed alarm.
|
|
77225
|
+
*/
|
|
77226
|
+
createAlarms(alarmEvents, requestOverrides = {}) {
|
|
76976
77227
|
const ingestionBody = {
|
|
76977
77228
|
documents: [
|
|
76978
77229
|
{
|
|
@@ -76983,14 +77234,14 @@ class EventService {
|
|
|
76983
77234
|
product_id: 'ao',
|
|
76984
77235
|
unique_id: "$['alarm_unique_id']",
|
|
76985
77236
|
},
|
|
76986
|
-
body: [
|
|
77237
|
+
body: [...alarmEvents],
|
|
76987
77238
|
},
|
|
76988
77239
|
],
|
|
76989
77240
|
};
|
|
76990
|
-
this.log.debug('
|
|
77241
|
+
this.log.debug('createAlarms', JSON.stringify(ingestionBody, null, 2));
|
|
76991
77242
|
return this.dxSaaSService.oiPost('jarvis/v2/ingestion', ingestionBody, {}, {
|
|
76992
77243
|
index_name: 'ao_itoa_alarms_custom_1',
|
|
76993
|
-
});
|
|
77244
|
+
}, requestOverrides);
|
|
76994
77245
|
}
|
|
76995
77246
|
/** Ingests a custom event (non-change) via the Jarvis ingestion API. */
|
|
76996
77247
|
createEvent(changeEvent) {
|
|
@@ -81213,8 +81464,93 @@ function detectIPv4() {
|
|
|
81213
81464
|
function orDefault(value, fallback) {
|
|
81214
81465
|
return value ? value : fallback;
|
|
81215
81466
|
}
|
|
81216
|
-
/**
|
|
81467
|
+
/**
|
|
81468
|
+
* A source file slot the platform can actually parse.
|
|
81469
|
+
*
|
|
81470
|
+
* The Kafka consumer's pattern for slot 8 matches only a dotted token. When it does not match, the
|
|
81471
|
+
* parse slides and the record is stored wrong: `tags` swallows the middle, `file` takes the
|
|
81472
|
+
* second-to-last word of the message, and `message` keeps only the last word. Measured on a lab
|
|
81473
|
+
* tenant (2026-09-16, issue #620): `orig.file` parsed, while `orig-file`, `orig_file` and `origfile`
|
|
81474
|
+
* each corrupted the record. Producers that pass a Java logger name never saw it, because those are
|
|
81475
|
+
* dotted; `broker-events` or a bare integration name did.
|
|
81476
|
+
*
|
|
81477
|
+
* Appending `.log` makes the slot parseable and leaves a value that already has a dot untouched.
|
|
81478
|
+
*/
|
|
81479
|
+
function dottedFileSlot(value) {
|
|
81480
|
+
return value.includes('.') ? value : `${value}.log`;
|
|
81481
|
+
}
|
|
81482
|
+
/**
|
|
81483
|
+
* Ingestion path on the log gateway — the uim_logs pipeline shared with the
|
|
81484
|
+
* on-prem log collector. POSTed under the log gateway base (no cohort
|
|
81485
|
+
* segment) via {@link DxSaasService.logPost}.
|
|
81486
|
+
*/
|
|
81217
81487
|
const UIM_LOGS_INGESTION_PATH = 'mdo/v2/aoanalytics/ingestion/uim_logs';
|
|
81488
|
+
/**
|
|
81489
|
+
* Builds the uim_logs document for one log entry — the pure form of
|
|
81490
|
+
* {@link LogsService.buildLogPayload}, for producers that own their own
|
|
81491
|
+
* transport (a monitoring loop's log shipper) but must stay byte-compatible
|
|
81492
|
+
* with what `dx-do log ingest` sends.
|
|
81493
|
+
*
|
|
81494
|
+
* @param cohortId - The tenant's cohort id as it appears in the profile; it is
|
|
81495
|
+
* upper-cased into `tenant_id` and the first `temp_fields` slot.
|
|
81496
|
+
* @param options - Known log entry fields (`message` required; the rest
|
|
81497
|
+
* optional with sensible defaults). Validated against
|
|
81498
|
+
* {@link LogIngest.LogIngestOptionsSchema}.
|
|
81499
|
+
* @param additionalFields - Arbitrary extra fields to include in the indexed
|
|
81500
|
+
* document. `severity` and `logseverity` (any letter case) are refused:
|
|
81501
|
+
* severity travels through `options.severity` and is emitted as `logseverity`.
|
|
81502
|
+
* @remarks `options.file` is passed through {@link dottedFileSlot}: a source file
|
|
81503
|
+
* without a dot gets `.log` appended, because the platform's positional parse
|
|
81504
|
+
* only matches a dotted source file and corrupts the record otherwise (#620).
|
|
81505
|
+
* @throws ZodError if `options` fails schema validation.
|
|
81506
|
+
* @throws Error if `additionalFields` names a reserved field.
|
|
81507
|
+
*/
|
|
81508
|
+
function buildUimLogPayload(cohortId, options, additionalFields) {
|
|
81509
|
+
exports.LogIngest.LogIngestOptionsSchema.parse(options);
|
|
81510
|
+
for (const key of Object.keys(additionalFields ?? {})) {
|
|
81511
|
+
if (exports.LogIngest.isReservedLogField(key)) {
|
|
81512
|
+
throw new Error(`additional field '${key}' is reserved: pass severity through the 'severity' option — it is sent as 'logseverity'`);
|
|
81513
|
+
}
|
|
81514
|
+
}
|
|
81515
|
+
const tenantIdUpper = cohortId.toUpperCase();
|
|
81516
|
+
// `orDefault` (not `??`) so an explicit empty string is treated as omitted —
|
|
81517
|
+
// a blank value in any temp_fields component shifts every downstream
|
|
81518
|
+
// positional field. See the temp_fields comment below.
|
|
81519
|
+
const logtype = orDefault(options.logtype, 'generic');
|
|
81520
|
+
const host = orDefault(options.host, require$$0$3.hostname());
|
|
81521
|
+
const ip = orDefault(options.ip, detectIPv4());
|
|
81522
|
+
const agentInstance = orDefault(options.agentInstance, 'dx-do');
|
|
81523
|
+
const agentName = orDefault(options.agentName, 'Logs Collector');
|
|
81524
|
+
const containerId = orDefault(options.containerId, host);
|
|
81525
|
+
const containerName = orDefault(options.containerName, agentInstance);
|
|
81526
|
+
// A source file without a dot corrupts the whole record; see dottedFileSlot.
|
|
81527
|
+
const file = dottedFileSlot(orDefault(options.file, 'dx-do.cli'));
|
|
81528
|
+
const tag = `${logtype} logs`;
|
|
81529
|
+
// temp_fields must have exactly 9 space-separated components before the message
|
|
81530
|
+
// is appended by the SaaS filter (agentbase_msg = temp_fields + " " + message).
|
|
81531
|
+
// The Kafka consumer parses positionally: [0]=tenant [1]=logtype [2]=host
|
|
81532
|
+
// [3]=container_id [4]=container_name [5]=ip [6-7]=tags [8]=source_file [9+]=message.
|
|
81533
|
+
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag} ${file}`;
|
|
81534
|
+
return {
|
|
81535
|
+
'@timestamp': options.timestamp ?? new Date().toISOString(),
|
|
81536
|
+
// logtype must be top-level: the SaaS filter does `update => ["type", "%{logtype}"]`
|
|
81537
|
+
// which drives Kafka consumer index routing — without it type stays as "ingestionapi"
|
|
81538
|
+
logtype,
|
|
81539
|
+
// The platform indexes severity as `logseverity`; a bare `severity` is
|
|
81540
|
+
// silently dropped, which is why both are reserved as custom fields.
|
|
81541
|
+
logseverity: options.severity ?? exports.LogIngest.DEFAULT_LOG_SEVERITY,
|
|
81542
|
+
message: options.message,
|
|
81543
|
+
host: { name: host, hostname: host },
|
|
81544
|
+
tenant_id: tenantIdUpper,
|
|
81545
|
+
temp_fields,
|
|
81546
|
+
tags: [tag],
|
|
81547
|
+
__agent_name: agentName,
|
|
81548
|
+
__agent_instance: agentInstance,
|
|
81549
|
+
container_id: containerId,
|
|
81550
|
+
container_name: containerName,
|
|
81551
|
+
...additionalFields,
|
|
81552
|
+
};
|
|
81553
|
+
}
|
|
81218
81554
|
/**
|
|
81219
81555
|
* Service for querying and ingesting log analytics data.
|
|
81220
81556
|
*/
|
|
@@ -81255,50 +81591,7 @@ class LogsService {
|
|
|
81255
81591
|
* @throws Error if `additionalFields` names a reserved field.
|
|
81256
81592
|
*/
|
|
81257
81593
|
buildLogPayload(options, additionalFields) {
|
|
81258
|
-
|
|
81259
|
-
for (const key of Object.keys(additionalFields ?? {})) {
|
|
81260
|
-
if (exports.LogIngest.isReservedLogField(key)) {
|
|
81261
|
-
throw new Error(`additional field '${key}' is reserved: pass severity through the 'severity' option — it is sent as 'logseverity'`);
|
|
81262
|
-
}
|
|
81263
|
-
}
|
|
81264
|
-
const cohortId = this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId;
|
|
81265
|
-
const tenantIdUpper = cohortId.toUpperCase();
|
|
81266
|
-
// `orDefault` (not `??`) so an explicit empty string is treated as omitted —
|
|
81267
|
-
// a blank value in any temp_fields component shifts every downstream
|
|
81268
|
-
// positional field. See the temp_fields comment below.
|
|
81269
|
-
const logtype = orDefault(options.logtype, 'generic');
|
|
81270
|
-
const host = orDefault(options.host, require$$0$3.hostname());
|
|
81271
|
-
const ip = orDefault(options.ip, detectIPv4());
|
|
81272
|
-
const agentInstance = orDefault(options.agentInstance, 'dx-do');
|
|
81273
|
-
const agentName = orDefault(options.agentName, 'Logs Collector');
|
|
81274
|
-
const containerId = orDefault(options.containerId, host);
|
|
81275
|
-
const containerName = orDefault(options.containerName, agentInstance);
|
|
81276
|
-
const file = orDefault(options.file, 'dx-do.cli');
|
|
81277
|
-
const tag = `${logtype} logs`;
|
|
81278
|
-
// temp_fields must have exactly 9 space-separated components before the message
|
|
81279
|
-
// is appended by the SaaS filter (agentbase_msg = temp_fields + " " + message).
|
|
81280
|
-
// The Kafka consumer parses positionally: [0]=tenant [1]=logtype [2]=host
|
|
81281
|
-
// [3]=container_id [4]=container_name [5]=ip [6-7]=tags [8]=source_file [9+]=message.
|
|
81282
|
-
const temp_fields = `${tenantIdUpper} ${logtype} ${host} ${containerId} ${containerName} ${ip} ${tag} ${file}`;
|
|
81283
|
-
return {
|
|
81284
|
-
'@timestamp': options.timestamp ?? new Date().toISOString(),
|
|
81285
|
-
// logtype must be top-level: the SaaS filter does `update => ["type", "%{logtype}"]`
|
|
81286
|
-
// which drives Kafka consumer index routing — without it type stays as "ingestionapi"
|
|
81287
|
-
logtype,
|
|
81288
|
-
// The platform indexes severity as `logseverity`; a bare `severity` is
|
|
81289
|
-
// silently dropped, which is why both are reserved as custom fields.
|
|
81290
|
-
logseverity: options.severity ?? exports.LogIngest.DEFAULT_LOG_SEVERITY,
|
|
81291
|
-
message: options.message,
|
|
81292
|
-
host: { name: host, hostname: host },
|
|
81293
|
-
tenant_id: tenantIdUpper,
|
|
81294
|
-
temp_fields,
|
|
81295
|
-
tags: [tag],
|
|
81296
|
-
__agent_name: agentName,
|
|
81297
|
-
__agent_instance: agentInstance,
|
|
81298
|
-
container_id: containerId,
|
|
81299
|
-
container_name: containerName,
|
|
81300
|
-
...additionalFields,
|
|
81301
|
-
};
|
|
81594
|
+
return buildUimLogPayload(this.dxSaasService.dxdoConfiguration.dxConfiguration.cohortId, options, additionalFields);
|
|
81302
81595
|
}
|
|
81303
81596
|
/**
|
|
81304
81597
|
* Ingests a single log entry into the log gateway.
|
|
@@ -83314,6 +83607,27 @@ class ServiceService {
|
|
|
83314
83607
|
const { body } = await this.buildServiceContentBody(serviceName, newContent, mode);
|
|
83315
83608
|
return this.createService(body, { replace: true });
|
|
83316
83609
|
}
|
|
83610
|
+
/**
|
|
83611
|
+
* Builds the store body for changing a service's own attributes (description,
|
|
83612
|
+
* location, tags, custom properties, includeChildServices) WITHOUT saving.
|
|
83613
|
+
* Re-saves the full subtree (via {@link buildHierarchyBody}) so the children
|
|
83614
|
+
* edges survive `replace=true`; only the target vertex changes. The name and
|
|
83615
|
+
* the service type are never patched — both are fixed at creation (the server
|
|
83616
|
+
* does not allow renames and ignores a `serviceType` change on a re-save).
|
|
83617
|
+
*
|
|
83618
|
+
* @returns the store body plus human-readable change lines (empty = no-op).
|
|
83619
|
+
* @throws Error if the service does not exist.
|
|
83620
|
+
*/
|
|
83621
|
+
async buildServiceUpdateBody(serviceName, patch) {
|
|
83622
|
+
const body = await this.buildHierarchyBody(serviceName);
|
|
83623
|
+
const changes = exports.ServiceTransform.applyServiceUpdate(body, serviceName, patch);
|
|
83624
|
+
return { body, changes };
|
|
83625
|
+
}
|
|
83626
|
+
/** Updates a service's attributes and saves it. See {@link buildServiceUpdateBody}. */
|
|
83627
|
+
async updateService(serviceName, patch) {
|
|
83628
|
+
const { body } = await this.buildServiceUpdateBody(serviceName, patch);
|
|
83629
|
+
return this.createService(body, { replace: true });
|
|
83630
|
+
}
|
|
83317
83631
|
/** Deletes a service by name; optionally deletes child services recursively. */
|
|
83318
83632
|
async deleteService(serviceName, recursive = false) {
|
|
83319
83633
|
return this.dxSaaSService.tenantPost('/oi/v2/sa/service/status', { name: serviceName, action: 'delete' }, { recursive });
|
|
@@ -83333,19 +83647,23 @@ class ServiceService {
|
|
|
83333
83647
|
},
|
|
83334
83648
|
};
|
|
83335
83649
|
}
|
|
83336
|
-
/**
|
|
83337
|
-
|
|
83650
|
+
/**
|
|
83651
|
+
* Builds an empty (no-content) service vertex payload ready to be populated.
|
|
83652
|
+
* @param serviceType - `Service` (default) | `Application` | `Group`.
|
|
83653
|
+
*/
|
|
83654
|
+
generateEmptyServiceVertex(serviceName, serviceDescription, situationsIncludeChildServices, tags = [], customProperties = [], serviceType = 'Service', location = '') {
|
|
83338
83655
|
return {
|
|
83339
83656
|
attributes: {
|
|
83340
83657
|
type: 'saService',
|
|
83341
83658
|
name: serviceName,
|
|
83659
|
+
serviceType,
|
|
83342
83660
|
state: 'ACTIVE',
|
|
83343
83661
|
maintenance: false,
|
|
83344
83662
|
situationsIncludeChildServices,
|
|
83345
83663
|
serviceContent: [],
|
|
83346
83664
|
root_service: null,
|
|
83347
83665
|
tags,
|
|
83348
|
-
location
|
|
83666
|
+
location,
|
|
83349
83667
|
description: serviceDescription,
|
|
83350
83668
|
customProperties,
|
|
83351
83669
|
customMetrics: [],
|
|
@@ -84187,17 +84505,20 @@ class DataStoreMetricsMetadataService {
|
|
|
84187
84505
|
* schema validation, a warning is logged but the raw API response is
|
|
84188
84506
|
* still returned.
|
|
84189
84507
|
*
|
|
84508
|
+
* @param requestOverrides - Per-call `timeout` / `signal`; registration is
|
|
84509
|
+
* an idempotent upsert, so a caller may safely retry after a timeout.
|
|
84510
|
+
*
|
|
84190
84511
|
* @throws ZodError if the request fails schema validation — including the
|
|
84191
84512
|
* tag-registration restrictions ("@tags" non-empty, every listed tag
|
|
84192
84513
|
* present with a non-empty string value, TYPE_TAGS never set without tags).
|
|
84193
84514
|
*/
|
|
84194
|
-
async registerMetrics(metrics, sync) {
|
|
84515
|
+
async registerMetrics(metrics, sync, requestOverrides = {}) {
|
|
84195
84516
|
const body = {
|
|
84196
84517
|
metrics: metrics.map((m) => ensureTypeTagsFlag(m)),
|
|
84197
84518
|
...(sync !== undefined ? { sync } : {}),
|
|
84198
84519
|
};
|
|
84199
84520
|
MetricRegisterRequestSchema.parse(body);
|
|
84200
|
-
const raw = await this.dxSaasService.tenantPost('metadata/registerMetric', body);
|
|
84521
|
+
const raw = await this.dxSaasService.tenantPost('metadata/registerMetric', body, undefined, {}, requestOverrides);
|
|
84201
84522
|
const result = MetricRegisterResponseSchema.safeParse(raw);
|
|
84202
84523
|
if (!result.success) {
|
|
84203
84524
|
this.log.warn('MetricRegisterResponse validation warning:', result.error.message);
|
|
@@ -84205,8 +84526,8 @@ class DataStoreMetricsMetadataService {
|
|
|
84205
84526
|
return raw;
|
|
84206
84527
|
}
|
|
84207
84528
|
/** Registers a single metric. Convenience wrapper around {@link registerMetrics}. */
|
|
84208
|
-
async registerMetric(metric, sync) {
|
|
84209
|
-
return this.registerMetrics([metric], sync);
|
|
84529
|
+
async registerMetric(metric, sync, requestOverrides = {}) {
|
|
84530
|
+
return this.registerMetrics([metric], sync, requestOverrides);
|
|
84210
84531
|
}
|
|
84211
84532
|
/**
|
|
84212
84533
|
* POSTs a metadata query to `/metadata/queryMetric` and returns the matching
|
|
@@ -84463,15 +84784,18 @@ class DataStoreTASService {
|
|
|
84463
84784
|
* POSTs a graph to `/tas/graph/store` and returns the store result including
|
|
84464
84785
|
* any failed vertices or edges.
|
|
84465
84786
|
*
|
|
84466
|
-
* @remarks The request is validated against {@link TasStoreGraphInputSchema}
|
|
84467
|
-
*
|
|
84468
|
-
*
|
|
84787
|
+
* @remarks The request is validated against {@link TasStoreGraphInputSchema}
|
|
84788
|
+
* (externalId-keyed vertices and edges — the ingestion contract; numeric
|
|
84789
|
+
* ids are optional). If the response fails schema validation, a warning is
|
|
84790
|
+
* logged but the raw API response is still returned.
|
|
84791
|
+
* @param requestOverrides - Per-call `timeout` / `signal`; the store is
|
|
84792
|
+
* idempotent, so a caller may safely retry after a timeout.
|
|
84469
84793
|
*
|
|
84470
84794
|
* @throws ZodError if the request fails schema validation.
|
|
84471
84795
|
*/
|
|
84472
|
-
async storeGraph(input) {
|
|
84796
|
+
async storeGraph(input, requestOverrides = {}) {
|
|
84473
84797
|
TasStoreGraphInputSchema.parse(input);
|
|
84474
|
-
const raw = await this.dxSaasService.tenantPost('tas/graph/store', input);
|
|
84798
|
+
const raw = await this.dxSaasService.tenantPost('tas/graph/store', input, undefined, {}, requestOverrides);
|
|
84475
84799
|
const result = TasStoreGraphResponseSchema.safeParse(raw);
|
|
84476
84800
|
if (!result.success) {
|
|
84477
84801
|
this.log.warn('TasStoreGraphResponse validation warning:', result.error.message);
|
|
@@ -84899,13 +85223,17 @@ class DataStoreNASSService {
|
|
|
84899
85223
|
* @remarks The request is validated against {@link NassStoreRequestSchema}.
|
|
84900
85224
|
* If the response fails schema validation, a warning is logged but the raw
|
|
84901
85225
|
* API response is still returned.
|
|
85226
|
+
* @param requestOverrides - Per-call `timeout` / `signal`. A store is NOT
|
|
85227
|
+
* idempotent: a second write to the same `(metricId, timestamp)` merges
|
|
85228
|
+
* with the first, so only retry when the request provably never reached
|
|
85229
|
+
* the server.
|
|
84902
85230
|
*
|
|
84903
85231
|
* @throws ZodError if any datapoint fails schema validation.
|
|
84904
85232
|
*/
|
|
84905
|
-
async storeMetricValues(values) {
|
|
85233
|
+
async storeMetricValues(values, requestOverrides = {}) {
|
|
84906
85234
|
const body = { values };
|
|
84907
85235
|
NassStoreRequestSchema.parse(body);
|
|
84908
|
-
const raw = await this.dxSaasService.tenantPost('nass/metricValue/store', body);
|
|
85236
|
+
const raw = await this.dxSaasService.tenantPost('nass/metricValue/store', body, undefined, {}, requestOverrides);
|
|
84909
85237
|
const result = NassStoreResponseSchema.safeParse(raw);
|
|
84910
85238
|
if (!result.success) {
|
|
84911
85239
|
this.log.warn('NassStoreResponse validation warning:', result.error.message);
|
|
@@ -85817,9 +86145,13 @@ exports.TasProjectionFilterSchema = TasProjectionFilterSchema;
|
|
|
85817
86145
|
exports.TasQuerySchema = TasQuerySchema;
|
|
85818
86146
|
exports.TasServiceFilterSchema = TasServiceFilterSchema;
|
|
85819
86147
|
exports.TasStatusFilterSchema = TasStatusFilterSchema;
|
|
86148
|
+
exports.TasStoreAttributeValueSchema = TasStoreAttributeValueSchema;
|
|
85820
86149
|
exports.TasStoreChangeSchema = TasStoreChangeSchema;
|
|
86150
|
+
exports.TasStoreEdgeSchema = TasStoreEdgeSchema;
|
|
85821
86151
|
exports.TasStoreGraphInputSchema = TasStoreGraphInputSchema;
|
|
85822
86152
|
exports.TasStoreGraphResponseSchema = TasStoreGraphResponseSchema;
|
|
86153
|
+
exports.TasStoreGraphSchema = TasStoreGraphSchema;
|
|
86154
|
+
exports.TasStoreVertexSchema = TasStoreVertexSchema;
|
|
85823
86155
|
exports.TasTakeEdgesFilterSchema = TasTakeEdgesFilterSchema;
|
|
85824
86156
|
exports.TasTakeFlowsFilterSchema = TasTakeFlowsFilterSchema;
|
|
85825
86157
|
exports.TasTakeVerticesFilterSchema = TasTakeVerticesFilterSchema;
|
|
@@ -85856,6 +86188,7 @@ exports.TraversalVertexFilterSchema = TraversalVertexFilterSchema;
|
|
|
85856
86188
|
exports.TraverseCollectSchema = TraverseCollectSchema;
|
|
85857
86189
|
exports.TraverseDirectionSchema = TraverseDirectionSchema;
|
|
85858
86190
|
exports.TraverseSchema = TraverseSchema;
|
|
86191
|
+
exports.UIM_LOGS_INGESTION_PATH = UIM_LOGS_INGESTION_PATH;
|
|
85859
86192
|
exports.UpdateAgentTokenRequestSchema = UpdateAgentTokenRequestSchema;
|
|
85860
86193
|
exports.UpdateTenantTokenRequestSchema = UpdateTenantTokenRequestSchema;
|
|
85861
86194
|
exports.UpdateUserTokenRequestSchema = UpdateUserTokenRequestSchema;
|
|
@@ -85943,6 +86276,7 @@ exports.buildPolicyFilterExpression = buildPolicyFilterExpression;
|
|
|
85943
86276
|
exports.buildSliFunction = buildSliFunction;
|
|
85944
86277
|
exports.buildSloTriplet = buildSloTriplet;
|
|
85945
86278
|
exports.buildTemplateRefs = buildTemplateRefs;
|
|
86279
|
+
exports.buildUimLogPayload = buildUimLogPayload;
|
|
85946
86280
|
exports.capVertexDetail = capVertexDetail;
|
|
85947
86281
|
exports.checkGet = checkGet;
|
|
85948
86282
|
exports.composeMetricTypeBits = composeMetricTypeBits;
|
|
@@ -85969,6 +86303,7 @@ exports.defaultRuleName = defaultRuleName;
|
|
|
85969
86303
|
exports.deriveSliAs = deriveSliAs;
|
|
85970
86304
|
exports.deriveVertexName = deriveVertexName;
|
|
85971
86305
|
exports.displayColumnsFor = displayColumnsFor;
|
|
86306
|
+
exports.dottedFileSlot = dottedFileSlot;
|
|
85972
86307
|
exports.draftKey = draftKey;
|
|
85973
86308
|
exports.encodeItsmSecret = encodeItsmSecret;
|
|
85974
86309
|
exports.ensureParallelAlerts = ensureParallelAlerts;
|