@dx-do/client 7.13.0 → 7.14.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.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs.js +1982 -428
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +1960 -429
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/src/index.d.ts +6 -0
  7. package/dist/src/index.d.ts.map +1 -1
  8. package/dist/src/lib/model/datastore/nassql/operations.d.ts +8 -1
  9. package/dist/src/lib/model/datastore/nassql/operations.d.ts.map +1 -1
  10. package/dist/src/lib/model/datastore/nassql/query.d.ts +8 -1
  11. package/dist/src/lib/model/datastore/nassql/query.d.ts.map +1 -1
  12. package/dist/src/lib/model/datastore/nassql/response.d.ts +11 -0
  13. package/dist/src/lib/model/datastore/nassql/response.d.ts.map +1 -1
  14. package/dist/src/lib/model/datastore/states/filters.d.ts +1 -1
  15. package/dist/src/lib/model/datastore/states/filters.d.ts.map +1 -1
  16. package/dist/src/lib/model/datastore/tas/filters.d.ts +3 -1
  17. package/dist/src/lib/model/datastore/tas/filters.d.ts.map +1 -1
  18. package/dist/src/lib/model/datastore/tas/query.d.ts +2 -1
  19. package/dist/src/lib/model/datastore/tas/query.d.ts.map +1 -1
  20. package/dist/src/lib/model/datastore/tas/response.d.ts +17 -16
  21. package/dist/src/lib/model/datastore/tas/response.d.ts.map +1 -1
  22. package/dist/src/lib/model/datastore/tas/store.d.ts +3 -3
  23. package/dist/src/lib/model/metric-anomaly/group.d.ts +88 -0
  24. package/dist/src/lib/model/metric-anomaly/group.d.ts.map +1 -0
  25. package/dist/src/lib/model/metric-anomaly/metrics-preview.d.ts +74 -0
  26. package/dist/src/lib/model/metric-anomaly/metrics-preview.d.ts.map +1 -0
  27. package/dist/src/lib/model/metric-anomaly/save.d.ts +63 -0
  28. package/dist/src/lib/model/metric-anomaly/save.d.ts.map +1 -0
  29. package/dist/src/lib/model/metric-anomaly/search.d.ts +63 -0
  30. package/dist/src/lib/model/metric-anomaly/search.d.ts.map +1 -0
  31. package/dist/src/lib/model/metricconfig/filter.d.ts +60 -0
  32. package/dist/src/lib/model/metricconfig/filter.d.ts.map +1 -0
  33. package/dist/src/lib/model/sli/group.d.ts +3 -2
  34. package/dist/src/lib/model/sli/group.d.ts.map +1 -1
  35. package/dist/src/lib/model/sli/metrics-preview.d.ts +8 -0
  36. package/dist/src/lib/model/sli/metrics-preview.d.ts.map +1 -1
  37. package/dist/src/lib/services/dx-saas.service.d.ts +2 -2
  38. package/dist/src/lib/services/metric-anomaly.service.d.ts +83 -0
  39. package/dist/src/lib/services/metric-anomaly.service.d.ts.map +1 -0
  40. package/dist/src/lib/services/service-monolith.d.ts +2 -0
  41. package/dist/src/lib/services/service-monolith.d.ts.map +1 -1
  42. package/package.json +2 -1
package/dist/index.cjs.js CHANGED
@@ -2182,12 +2182,65 @@ const hasOwnProperty$1 = (
2182
2182
  hasOwnProperty.call(obj, prop)
2183
2183
  )(Object.prototype);
2184
2184
 
2185
+ const isUnsafeObjectKey = (prop) =>
2186
+ typeof prop === 'string' &&
2187
+ (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
2188
+
2185
2189
  /**
2186
- * Walk the prototype chain (excluding the shared Object.prototype) looking for
2187
- * an own `prop`. This distinguishes genuine own/inherited members — including
2188
- * class accessors and template prototypes — from members injected via
2189
- * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
2190
- * live on Object.prototype itself and are therefore never matched.
2190
+ * Determine whether an inherited object must be treated as a shared-prototype
2191
+ * boundary. Cross-realm Object.prototype objects cannot be distinguished
2192
+ * reliably from application-created null-prototype objects because their
2193
+ * properties are mutable, so all inherited terminal prototypes are excluded
2194
+ * as a fail-closed boundary. A null-prototype source still keeps its own
2195
+ * properties, as produced by mergeConfig and other safe materialization paths.
2196
+ *
2197
+ * @param {*} obj The object to inspect
2198
+ * @param {*} prototype The object's prototype
2199
+ * @param {boolean} source Whether obj is the original traversal source
2200
+ *
2201
+ * @returns {boolean} True when obj is a safe prototype traversal boundary
2202
+ */
2203
+ const isPrototypeBoundary = (obj, prototype, source) =>
2204
+ obj === Object.prototype || (!source && prototype === null);
2205
+
2206
+ /**
2207
+ * Determine whether an object can retain its identity through code paths that
2208
+ * add, replace, and remove config properties without bypassing unsafe-key
2209
+ * filtering. Immutable objects, unsafe-key-bearing objects, and objects with
2210
+ * accessor or restricted data properties must be materialized instead.
2211
+ *
2212
+ * @param {*} obj The object to inspect
2213
+ *
2214
+ * @returns {boolean} True when every own property is safe and fully mutable
2215
+ */
2216
+ const isSafeAndFullyMutable = (obj) => {
2217
+ if (!Object.isExtensible(obj)) {
2218
+ return false;
2219
+ }
2220
+
2221
+ const props = Object.getOwnPropertyNames(obj);
2222
+
2223
+ if (Object.getOwnPropertySymbols) {
2224
+ props.push(...Object.getOwnPropertySymbols(obj));
2225
+ }
2226
+
2227
+ return props.every((prop) => {
2228
+ if (isUnsafeObjectKey(prop)) {
2229
+ return false;
2230
+ }
2231
+
2232
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
2233
+
2234
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
2235
+ });
2236
+ };
2237
+
2238
+ /**
2239
+ * Walk the prototype chain (excluding the source realm's Object.prototype)
2240
+ * looking for an own `prop`. This distinguishes genuine own/inherited members
2241
+ * — including class accessors and template prototypes — from members injected
2242
+ * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
2243
+ * which live on Object.prototype itself and are therefore never matched.
2191
2244
  *
2192
2245
  * @param {*} thing The value whose chain to inspect
2193
2246
  * @param {string|symbol} prop The property key to look for
@@ -2198,16 +2251,22 @@ const hasOwnInPrototypeChain = (thing, prop) => {
2198
2251
  let obj = thing;
2199
2252
  const seen = [];
2200
2253
 
2201
- while (obj != null && obj !== Object.prototype) {
2254
+ while (obj != null) {
2202
2255
  if (seen.indexOf(obj) !== -1) {
2203
2256
  return false;
2204
2257
  }
2205
2258
  seen.push(obj);
2206
2259
 
2260
+ const prototype = getPrototypeOf(obj);
2261
+
2262
+ if (isPrototypeBoundary(obj, prototype, obj === thing)) {
2263
+ return false;
2264
+ }
2265
+
2207
2266
  if (hasOwnProperty$1(obj, prop)) {
2208
2267
  return true;
2209
2268
  }
2210
- obj = getPrototypeOf(obj);
2269
+ obj = prototype;
2211
2270
  }
2212
2271
  return false;
2213
2272
  };
@@ -2226,6 +2285,69 @@ const hasOwnInPrototypeChain = (thing, prop) => {
2226
2285
  const getSafeProp = (obj, prop) =>
2227
2286
  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
2228
2287
 
2288
+ /**
2289
+ * Flatten an object and its application-defined prototype chain into a
2290
+ * null-prototype object. Members inherited only from the source realm's
2291
+ * Object.prototype are deliberately excluded, while class/template members
2292
+ * below that boundary are preserved.
2293
+ *
2294
+ * @param {*} thing The value to flatten
2295
+ *
2296
+ * @returns {*} A null-prototype copy, or the original value when it is already
2297
+ * structurally safe or is not an object
2298
+ */
2299
+ const toSafeFlatObject = (thing) => {
2300
+ if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {
2301
+ return thing;
2302
+ }
2303
+
2304
+ const sourcePrototype = getPrototypeOf(thing);
2305
+
2306
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
2307
+ return thing;
2308
+ }
2309
+
2310
+ const result = Object.create(null);
2311
+ const merged = Object.create(null);
2312
+ const seen = [];
2313
+ let current = thing;
2314
+
2315
+ while (current != null) {
2316
+ if (seen.indexOf(current) !== -1) {
2317
+ break;
2318
+ }
2319
+
2320
+ seen.push(current);
2321
+
2322
+ const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
2323
+
2324
+ if (isPrototypeBoundary(current, prototype, current === thing)) {
2325
+ break;
2326
+ }
2327
+
2328
+ const props = Object.getOwnPropertyNames(current);
2329
+
2330
+ if (Object.getOwnPropertySymbols) {
2331
+ props.push(...Object.getOwnPropertySymbols(current));
2332
+ }
2333
+
2334
+ for (const prop of props) {
2335
+ if (isUnsafeObjectKey(prop)) {
2336
+ continue;
2337
+ }
2338
+
2339
+ if (!hasOwnProperty$1(merged, prop)) {
2340
+ result[prop] = thing[prop];
2341
+ merged[prop] = true;
2342
+ }
2343
+ }
2344
+
2345
+ current = prototype;
2346
+ }
2347
+
2348
+ return result;
2349
+ };
2350
+
2229
2351
  const kindOf = ((cache) => (thing) => {
2230
2352
  const str = toString.call(thing);
2231
2353
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -2357,12 +2479,10 @@ const isPlainObject = (val) => {
2357
2479
 
2358
2480
  const prototype = getPrototypeOf(val);
2359
2481
  return (
2360
- (prototype === null ||
2361
- prototype === Object.prototype ||
2362
- getPrototypeOf(prototype) === null) &&
2363
- // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
2364
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
2365
- // than a plain object, while ignoring keys injected onto Object.prototype.
2482
+ (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
2483
+ // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
2484
+ // evidence the value is tagged/iterable, while ignoring members reachable
2485
+ // only through shared or terminal prototype boundaries.
2366
2486
  !hasOwnInPrototypeChain(val, toStringTag$2) &&
2367
2487
  !hasOwnInPrototypeChain(val, iterator)
2368
2488
  );
@@ -2449,6 +2569,7 @@ const isBlob = kindOfTest('Blob');
2449
2569
  * @returns {boolean} True if value is a FileList, otherwise false
2450
2570
  */
2451
2571
  const isFileList = kindOfTest('FileList');
2572
+ const isSet$1 = kindOfTest('Set');
2452
2573
 
2453
2574
  /**
2454
2575
  * Determine if a value is a Stream
@@ -3014,12 +3135,23 @@ const toJSONObject = (obj) => {
3014
3135
  if (!('toJSON' in source)) {
3015
3136
  // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
3016
3137
  visited.add(source);
3017
- const target = isArray$4(source) ? [] : {};
3018
3138
 
3019
- forEach(source, (value, key) => {
3020
- const reducedValue = visit(value);
3021
- !isUndefined$2(reducedValue) && (target[key] = reducedValue);
3022
- });
3139
+ let target;
3140
+
3141
+ if (isSet$1(source)) {
3142
+ target = [];
3143
+ for (const value of source) {
3144
+ const reducedValue = visit(value);
3145
+ !isUndefined$2(reducedValue) && target.push(reducedValue);
3146
+ }
3147
+ } else {
3148
+ target = isArray$4(source) ? [] : {};
3149
+
3150
+ forEach(source, (value, key) => {
3151
+ const reducedValue = visit(value);
3152
+ !isUndefined$2(reducedValue) && (target[key] = reducedValue);
3153
+ });
3154
+ }
3023
3155
 
3024
3156
  visited.delete(source);
3025
3157
 
@@ -3164,6 +3296,7 @@ var utils$3 = {
3164
3296
  hasOwnProp: hasOwnProperty$1, // an alias to avoid ESLint no-prototype-builtins detection
3165
3297
  hasOwnInPrototypeChain,
3166
3298
  getSafeProp,
3299
+ toSafeFlatObject,
3167
3300
  reduceDescriptors,
3168
3301
  freezeMethods,
3169
3302
  toObjectSet,
@@ -3231,18 +3364,20 @@ var parseHeaders = (rawHeaders) => {
3231
3364
  key = line.substring(0, i).trim().toLowerCase();
3232
3365
  val = line.substring(i + 1).trim();
3233
3366
 
3234
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
3367
+ const hasKey = utils$3.hasOwnProp(parsed, key);
3368
+
3369
+ if (!key || (hasKey && utils$3.hasOwnProp(ignoreDuplicateOf, key))) {
3235
3370
  return;
3236
3371
  }
3237
3372
 
3238
3373
  if (key === 'set-cookie') {
3239
- if (parsed[key]) {
3374
+ if (hasKey) {
3240
3375
  parsed[key].push(val);
3241
3376
  } else {
3242
3377
  parsed[key] = [val];
3243
3378
  }
3244
3379
  } else {
3245
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
3380
+ parsed[key] = hasKey ? parsed[key] + ', ' + val : val;
3246
3381
  }
3247
3382
  });
3248
3383
 
@@ -3306,7 +3441,7 @@ function toByteStringHeaderObject(headers) {
3306
3441
  return byteStringHeaders;
3307
3442
  }
3308
3443
 
3309
- const $internals = Symbol('internals');
3444
+ const $internals$1 = Symbol('internals');
3310
3445
 
3311
3446
  function normalizeHeader(header) {
3312
3447
  return header && String(header).trim().toLowerCase();
@@ -3332,6 +3467,124 @@ function parseTokens(str) {
3332
3467
  return tokens;
3333
3468
  }
3334
3469
 
3470
+ const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
3471
+
3472
+ function trimOWS(value) {
3473
+ let start = 0;
3474
+ let end = value.length;
3475
+
3476
+ while (start < end) {
3477
+ const code = value.charCodeAt(start);
3478
+
3479
+ if (code !== 0x09 && code !== 0x20) {
3480
+ break;
3481
+ }
3482
+
3483
+ start += 1;
3484
+ }
3485
+
3486
+ while (end > start) {
3487
+ const code = value.charCodeAt(end - 1);
3488
+
3489
+ if (code !== 0x09 && code !== 0x20) {
3490
+ break;
3491
+ }
3492
+
3493
+ end -= 1;
3494
+ }
3495
+
3496
+ return start === 0 && end === value.length ? value : value.slice(start, end);
3497
+ }
3498
+
3499
+ function decodeQuotedString(value) {
3500
+ const last = value.length - 1;
3501
+
3502
+ if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
3503
+ return value;
3504
+ }
3505
+
3506
+ let decoded = '';
3507
+
3508
+ for (let i = 1; i < last; i++) {
3509
+ const code = value.charCodeAt(i);
3510
+
3511
+ if (code === 0x22) {
3512
+ return value;
3513
+ }
3514
+
3515
+ if (code === 0x5c) {
3516
+ i += 1;
3517
+
3518
+ if (i >= last) {
3519
+ return value;
3520
+ }
3521
+ }
3522
+
3523
+ decoded += value[i];
3524
+ }
3525
+
3526
+ return decoded;
3527
+ }
3528
+
3529
+ function parseParameters(value) {
3530
+ const parameters = Object.create(null);
3531
+ const str = String(value);
3532
+ let start = 0;
3533
+ let quoted = false;
3534
+ let escaped = false;
3535
+
3536
+ function parseParameter(end) {
3537
+ const part = trimOWS(str.slice(start, end));
3538
+ const equals = part.indexOf('=');
3539
+
3540
+ if (equals < 1) {
3541
+ return;
3542
+ }
3543
+
3544
+ const name = trimOWS(part.slice(0, equals));
3545
+
3546
+ if (!parameterNameRE.test(name)) {
3547
+ return;
3548
+ }
3549
+
3550
+ const normalizedName = name.toLowerCase();
3551
+
3552
+ if (
3553
+ normalizedName === '__proto__' ||
3554
+ normalizedName === 'constructor' ||
3555
+ normalizedName === 'prototype'
3556
+ ) {
3557
+ return;
3558
+ }
3559
+
3560
+ const parameterValue = trimOWS(part.slice(equals + 1));
3561
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
3562
+ }
3563
+
3564
+ for (let i = 0; i < str.length; i++) {
3565
+ const code = str.charCodeAt(i);
3566
+
3567
+ if (quoted) {
3568
+ if (escaped) {
3569
+ escaped = false;
3570
+ } else if (code === 0x5c) {
3571
+ escaped = true;
3572
+ } else if (code === 0x22) {
3573
+ quoted = false;
3574
+ }
3575
+ } else if (code === 0x22) {
3576
+ quoted = true;
3577
+ } else if (code === 0x2c || code === 0x3b) {
3578
+ parseParameter(i);
3579
+ start = i + 1;
3580
+ }
3581
+ }
3582
+
3583
+ parseParameter(str.length);
3584
+
3585
+ return parameters;
3586
+ }
3587
+
3335
3588
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
3336
3589
 
3337
3590
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
@@ -3583,7 +3836,8 @@ let AxiosHeaders$1 = class AxiosHeaders {
3583
3836
  }
3584
3837
 
3585
3838
  getSetCookie() {
3586
- return this.get('set-cookie') || [];
3839
+ const value = this.get('set-cookie');
3840
+ return utils$3.isArray(value) ? value : value == null || value === false ? [] : [value];
3587
3841
  }
3588
3842
 
3589
3843
  get [Symbol.toStringTag]() {
@@ -3594,6 +3848,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
3594
3848
  return thing instanceof this ? thing : new this(thing);
3595
3849
  }
3596
3850
 
3851
+ static parseParameters(value) {
3852
+ return parseParameters(value);
3853
+ }
3854
+
3597
3855
  static concat(first, ...targets) {
3598
3856
  const computed = new this(first);
3599
3857
 
@@ -3604,8 +3862,8 @@ let AxiosHeaders$1 = class AxiosHeaders {
3604
3862
 
3605
3863
  static accessor(header) {
3606
3864
  const internals =
3607
- (this[$internals] =
3608
- this[$internals] =
3865
+ (this[$internals$1] =
3866
+ this[$internals$1] =
3609
3867
  {
3610
3868
  accessors: {},
3611
3869
  });
@@ -3719,9 +3977,40 @@ function redactConfig(config, redactKeys) {
3719
3977
  return visit(config);
3720
3978
  }
3721
3979
 
3980
+ function stringifySafely$1(value) {
3981
+ try {
3982
+ return String(value);
3983
+ } catch (err) {
3984
+ return '';
3985
+ }
3986
+ }
3987
+
3988
+ function aggregateErrorMessage(error) {
3989
+ const message = error.errors
3990
+ .map((entry) => {
3991
+ try {
3992
+ return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry);
3993
+ } catch (err) {
3994
+ return '';
3995
+ }
3996
+ })
3997
+ .filter(Boolean)
3998
+ .join('; ');
3999
+
4000
+ return message || error.name || 'AggregateError';
4001
+ }
4002
+
3722
4003
  let AxiosError$1 = class AxiosError extends Error {
3723
4004
  static from(error, code, config, request, response, customProps) {
3724
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
4005
+ // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
4006
+ // failures) has an empty `message`; its detail lives in `errors[]`. Without
4007
+ // this, the wrapped error surfaces with a blank message (see #6721).
4008
+ let message = error.message;
4009
+ if (!message && utils$3.isArray(error.errors) && error.errors.length) {
4010
+ message = aggregateErrorMessage(error);
4011
+ }
4012
+
4013
+ const axiosError = new AxiosError(message, code || error.code, config, request, response);
3725
4014
  // Match native `Error` `cause` semantics: non-enumerable. The wrapped
3726
4015
  // error often carries circular internals (sockets, requests, agents), so
3727
4016
  // an enumerable `cause` makes structured loggers (pino/winston) and any
@@ -16835,6 +17124,16 @@ var formdata = /*#__PURE__*/_mergeNamespaces({
16835
17124
  default: FormData$2
16836
17125
  }, [form_data]);
16837
17126
 
17127
+ var PlatformBuffer = {
17128
+ isBufferAvailable() {
17129
+ return typeof Buffer !== 'undefined';
17130
+ },
17131
+
17132
+ from(value) {
17133
+ return Buffer.from(value);
17134
+ }
17135
+ };
17136
+
16838
17137
  // Default nesting limit shared with the inverse transform (formDataToJSON) so
16839
17138
  // the FormData <-> JSON round-trip stays symmetric.
16840
17139
  const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
@@ -16928,28 +17227,18 @@ function toFormData$1(obj, formData, options) {
16928
17227
  // eslint-disable-next-line no-param-reassign
16929
17228
  formData = formData || new (FormData$2 || FormData)();
16930
17229
 
16931
- // eslint-disable-next-line no-param-reassign
16932
- options = utils$3.toFlatObject(
16933
- options,
16934
- {
16935
- metaTokens: true,
16936
- dots: false,
16937
- indexes: false,
16938
- },
16939
- false,
16940
- function defined(option, source) {
16941
- // eslint-disable-next-line no-eq-null,eqeqeq
16942
- return !utils$3.isUndefined(source[option]);
16943
- }
16944
- );
17230
+ const option = (name, fallback) => {
17231
+ const value = utils$3.getSafeProp(options, name);
17232
+ return utils$3.isUndefined(value) ? fallback : value;
17233
+ };
16945
17234
 
16946
- const metaTokens = options.metaTokens;
17235
+ const metaTokens = option('metaTokens', true);
16947
17236
  // eslint-disable-next-line no-use-before-define
16948
- const visitor = options.visitor || defaultVisitor;
16949
- const dots = options.dots;
16950
- const indexes = options.indexes;
16951
- const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
16952
- const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
17237
+ const visitor = option('visitor') || defaultVisitor;
17238
+ const dots = option('dots', false);
17239
+ const indexes = option('indexes', false);
17240
+ const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);
17241
+ const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
16953
17242
  const useBlob = _Blob && utils$3.isSpecCompliantForm(formData);
16954
17243
  const stack = [];
16955
17244
 
@@ -16976,10 +17265,13 @@ function toFormData$1(obj, formData, options) {
16976
17265
  if (useBlob && typeof _Blob === 'function') {
16977
17266
  return new _Blob([value]);
16978
17267
  }
16979
- if (typeof Buffer !== 'undefined') {
16980
- return Buffer.from(value);
17268
+ if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {
17269
+ return PlatformBuffer.from(value);
16981
17270
  }
16982
- throw new AxiosError$1('Blob is not supported. Use a Buffer instead.', AxiosError$1.ERR_NOT_SUPPORT);
17271
+ throw new AxiosError$1(
17272
+ 'Blob is not supported. Use a Buffer instead.',
17273
+ AxiosError$1.ERR_NOT_SUPPORT
17274
+ );
16983
17275
  }
16984
17276
 
16985
17277
  return value;
@@ -17231,9 +17523,57 @@ function buildURL(url, params, options) {
17231
17523
  return url;
17232
17524
  }
17233
17525
 
17526
+ const $internals = Symbol('internals');
17527
+
17528
+ // `handlers` is public and may be replaced with a nullish value by user code;
17529
+ // `clear()` has always tolerated that. Treat it as an empty stack rather than
17530
+ // dereferencing it.
17531
+ function countHandlers(handlers) {
17532
+ return handlers ? handlers.length : 0;
17533
+ }
17534
+
17535
+ function trimHandlers(handlers) {
17536
+ if (!handlers) {
17537
+ return;
17538
+ }
17539
+
17540
+ while (handlers.length && handlers[handlers.length - 1] === null) {
17541
+ handlers.pop();
17542
+ }
17543
+ }
17544
+
17545
+ function syncHandlerEntries(manager, internals) {
17546
+ const handlers = manager.handlers;
17547
+ const length = countHandlers(handlers);
17548
+
17549
+ if (handlers !== internals.handlersRef) {
17550
+ internals.handlersRef = handlers;
17551
+ internals.handlerEntries.clear();
17552
+ } else if (length !== internals.handlersLength) {
17553
+ if (!length) {
17554
+ internals.handlerEntries.clear();
17555
+ } else {
17556
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
17557
+ if (handlers[entry.index] !== entry.handler) {
17558
+ internals.handlerEntries.delete(id);
17559
+ }
17560
+ });
17561
+ }
17562
+ }
17563
+
17564
+ internals.handlersLength = length;
17565
+ }
17566
+
17234
17567
  class InterceptorManager {
17235
17568
  constructor() {
17236
17569
  this.handlers = [];
17570
+ this[$internals] = {
17571
+ handlersRef: this.handlers,
17572
+ handlersLength: this.handlers.length,
17573
+ handlerEntries: new Map(),
17574
+ iterationDepth: 0,
17575
+ nextId: 0,
17576
+ };
17237
17577
  }
17238
17578
 
17239
17579
  /**
@@ -17246,13 +17586,30 @@ class InterceptorManager {
17246
17586
  * @return {Number} An ID used to remove interceptor later
17247
17587
  */
17248
17588
  use(fulfilled, rejected, options) {
17249
- this.handlers.push({
17589
+ const handler = {
17250
17590
  fulfilled,
17251
17591
  rejected,
17252
17592
  synchronous: options ? options.synchronous : false,
17253
17593
  runWhen: options ? options.runWhen : null,
17594
+ };
17595
+ const internals = this[$internals];
17596
+
17597
+ if (this.handlers == null) {
17598
+ this.handlers = [];
17599
+ }
17600
+
17601
+ syncHandlerEntries(this, internals);
17602
+
17603
+ const id = internals.nextId++;
17604
+
17605
+ this.handlers.push(handler);
17606
+ internals.handlerEntries.set(id, {
17607
+ handler,
17608
+ index: this.handlers.length - 1,
17254
17609
  });
17255
- return this.handlers.length - 1;
17610
+ internals.handlersLength = this.handlers.length;
17611
+
17612
+ return id;
17256
17613
  }
17257
17614
 
17258
17615
  /**
@@ -17263,8 +17620,27 @@ class InterceptorManager {
17263
17620
  * @returns {void}
17264
17621
  */
17265
17622
  eject(id) {
17266
- if (this.handlers[id]) {
17267
- this.handlers[id] = null;
17623
+ const internals = this[$internals];
17624
+
17625
+ syncHandlerEntries(this, internals);
17626
+
17627
+ const entry = internals.handlerEntries.get(id);
17628
+
17629
+ if (entry) {
17630
+ internals.handlerEntries.delete(id);
17631
+
17632
+ // Ignore IDs invalidated by clear or direct replacement of handlers.
17633
+ if (this.handlers[entry.index] !== entry.handler) {
17634
+ return;
17635
+ }
17636
+
17637
+ this.handlers[entry.index] = null;
17638
+
17639
+ // Do not reuse an index while forEach is walking its length snapshot.
17640
+ if (!internals.iterationDepth) {
17641
+ trimHandlers(this.handlers);
17642
+ internals.handlersLength = this.handlers.length;
17643
+ }
17268
17644
  }
17269
17645
  }
17270
17646
 
@@ -17276,6 +17652,7 @@ class InterceptorManager {
17276
17652
  clear() {
17277
17653
  if (this.handlers) {
17278
17654
  this.handlers = [];
17655
+ syncHandlerEntries(this, this[$internals]);
17279
17656
  }
17280
17657
  }
17281
17658
 
@@ -17290,11 +17667,25 @@ class InterceptorManager {
17290
17667
  * @returns {void}
17291
17668
  */
17292
17669
  forEach(fn) {
17293
- utils$3.forEach(this.handlers, function forEachHandler(h) {
17294
- if (h !== null) {
17295
- fn(h);
17670
+ const internals = this[$internals];
17671
+
17672
+ syncHandlerEntries(this, internals);
17673
+
17674
+ internals.iterationDepth++;
17675
+
17676
+ try {
17677
+ utils$3.forEach(this.handlers, function forEachHandler(h) {
17678
+ if (h !== null) {
17679
+ fn(h);
17680
+ }
17681
+ });
17682
+ } finally {
17683
+ if (!--internals.iterationDepth) {
17684
+ syncHandlerEntries(this, internals);
17685
+ trimHandlers(this.handlers);
17686
+ internals.handlersLength = countHandlers(this.handlers);
17296
17687
  }
17297
- });
17688
+ }
17298
17689
  }
17299
17690
  }
17300
17691
 
@@ -17435,12 +17826,18 @@ function throwIfDepthExceeded(index) {
17435
17826
  * @returns An array of strings.
17436
17827
  */
17437
17828
  function parsePropPath(name) {
17438
- // foo[x][y][z]
17439
- // foo.x.y.z
17440
- // foo-x-y-z
17441
- // foo x y z
17829
+ // foo[x][y][z] -> ['foo', 'x', 'y', 'z']
17830
+ // foo.x.y.z -> ['foo', 'x', 'y', 'z']
17831
+ // A path is split on `.` and on `[...]` groups. A segment — whether written
17832
+ // in dot notation or captured inside brackets — may contain any character
17833
+ // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept
17834
+ // literal instead of being split (#5402). `.`, `[` and `]` keep their existing
17835
+ // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.
17836
+ // Excluding `[` from the bracket group also makes the match fail fast at the
17837
+ // next `[`, so a malformed name cannot rescan to the end of the string from
17838
+ // every unmatched `[` — parsing stays linear in the length of the name.
17442
17839
  const path = [];
17443
- const pattern = /\w+|\[(\w*)]/g;
17840
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
17444
17841
  let match;
17445
17842
 
17446
17843
  while ((match = pattern.exec(name)) !== null) {
@@ -17528,6 +17925,20 @@ function formDataToJSON(formData) {
17528
17925
  return null;
17529
17926
  }
17530
17927
 
17928
+ const methodList = Object.freeze([
17929
+ 'get',
17930
+ 'delete',
17931
+ 'head',
17932
+ 'options',
17933
+ 'post',
17934
+ 'put',
17935
+ 'patch',
17936
+ 'purge',
17937
+ 'link',
17938
+ 'unlink',
17939
+ 'query',
17940
+ ]);
17941
+
17531
17942
  const own = (obj, key) => (obj != null && utils$3.hasOwnProp(obj, key) ? obj[key] : undefined);
17532
17943
 
17533
17944
  /**
@@ -17690,7 +18101,7 @@ const defaults$1 = {
17690
18101
  },
17691
18102
  };
17692
18103
 
17693
- utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
18104
+ utils$3.forEach(methodList, (method) => {
17694
18105
  defaults$1.headers[method] = {};
17695
18106
  });
17696
18107
 
@@ -17789,33 +18200,89 @@ function isAbsoluteURL(url) {
17789
18200
  * @returns {string} The combined URL
17790
18201
  */
17791
18202
  function combineURLs(baseURL, relativeURL) {
17792
- return relativeURL
17793
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
17794
- : baseURL;
17795
- }
18203
+ if (!relativeURL) {
18204
+ return baseURL;
18205
+ }
17796
18206
 
17797
- const malformedHttpProtocol = /^https?:(?!\/\/)/i;
17798
- const httpProtocolControlCharacters = /[\t\n\r]/g;
18207
+ let end = baseURL.length;
17799
18208
 
17800
- function stripLeadingC0ControlOrSpace(url) {
17801
- let i = 0;
17802
- while (i < url.length && url.charCodeAt(i) <= 0x20) {
17803
- i++;
18209
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
18210
+ end--;
17804
18211
  }
17805
- return url.slice(i);
18212
+
18213
+ return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
17806
18214
  }
17807
18215
 
18216
+ const urlParserControlCharacters = /[\t\n\r]/g;
18217
+
18218
+ /**
18219
+ * Match WHATWG URL preprocessing before checking a URL's protocol.
18220
+ *
18221
+ * @param {string} url
18222
+ *
18223
+ * @returns {string}
18224
+ */
17808
18225
  function normalizeURLForProtocolCheck(url) {
17809
- return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
18226
+ if (typeof url !== 'string') {
18227
+ return url;
18228
+ }
18229
+
18230
+ let start = 0;
18231
+
18232
+ while (start < url.length && url.charCodeAt(start) <= 0x20) {
18233
+ start++;
18234
+ }
18235
+
18236
+ return url.slice(start).replace(urlParserControlCharacters, '');
18237
+ }
18238
+
18239
+ const malformedHttpProtocol = /^https?:(?!\/\/)/i;
18240
+
18241
+ // Redact the parts of a URL that can carry secrets before it is embedded in an
18242
+ // error message. AxiosError.toJSON() serializes `message` verbatim and errors
18243
+ // are commonly logged, while the opt-in `config.redact` model only cleans
18244
+ // config keys — it cannot reach the message. Redact only the genuinely
18245
+ // sensitive substrings — userinfo (credentials), query parameter values and
18246
+ // fragment contents — with the same REDACTED marker the config redaction uses,
18247
+ // while keeping the scheme, host, path and parameter names so the offending
18248
+ // request stays accurately identifiable.
18249
+ function redactFragment(fragment) {
18250
+ if (!fragment) {
18251
+ return fragment;
18252
+ }
18253
+
18254
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {
18255
+ return `${separator}${parameterName}${REDACTED$2}`;
18256
+ });
18257
+ }
18258
+
18259
+ function redactSensitiveURLParts(url) {
18260
+ const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED$2}@`);
18261
+ const fragmentIndex = redactedURL.indexOf('#');
18262
+ const urlWithoutFragment =
18263
+ fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
18264
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
18265
+ /([?&][^=&#]*=)[^&#]*/g,
18266
+ `$1${REDACTED$2}`
18267
+ );
18268
+
18269
+ if (fragmentIndex === -1) {
18270
+ return redactedURLWithoutFragment;
18271
+ }
18272
+
18273
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
17810
18274
  }
17811
18275
 
17812
18276
  function assertValidHttpProtocolURL(url, config) {
17813
- if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
17814
- throw new AxiosError$1(
17815
- 'Invalid URL: missing "//" after protocol',
17816
- AxiosError$1.ERR_INVALID_URL,
17817
- config
17818
- );
18277
+ if (typeof url === 'string') {
18278
+ const normalizedURL = normalizeURLForProtocolCheck(url);
18279
+ if (malformedHttpProtocol.test(normalizedURL)) {
18280
+ throw new AxiosError$1(
18281
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
18282
+ AxiosError$1.ERR_INVALID_URL,
18283
+ config
18284
+ );
18285
+ }
17819
18286
  }
17820
18287
  }
17821
18288
 
@@ -20358,7 +20825,7 @@ followRedirects$1.exports.wrap = wrap;
20358
20825
  var followRedirectsExports = followRedirects$1.exports;
20359
20826
  var followRedirects = /*@__PURE__*/getDefaultExportFromCjs(followRedirectsExports);
20360
20827
 
20361
- const VERSION$1 = "1.18.1";
20828
+ const VERSION$1 = "1.20.0";
20362
20829
 
20363
20830
  function parseProtocol(url) {
20364
20831
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
@@ -20367,7 +20834,7 @@ function parseProtocol(url) {
20367
20834
 
20368
20835
  // RFC 2397: data:[<mediatype>][;base64],<data>
20369
20836
  // mediatype = type/subtype followed by optional ;name=value parameters
20370
- const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
20837
+ const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
20371
20838
 
20372
20839
  /**
20373
20840
  * Parse data uri to a Buffer or Blob
@@ -20410,9 +20877,10 @@ function fromDataURI(uri, asBlob, options) {
20410
20877
  mime = 'text/plain' + params;
20411
20878
  }
20412
20879
 
20413
- const buffer = encoding === 'base64'
20414
- ? Buffer.from(body, 'base64')
20415
- : Buffer.from(decodeURIComponent(body), encoding);
20880
+ const buffer =
20881
+ encoding === 'base64'
20882
+ ? Buffer.from(body, 'base64')
20883
+ : Buffer.from(decodeURIComponent(body), encoding);
20416
20884
 
20417
20885
  if (asBlob) {
20418
20886
  if (!_Blob) {
@@ -20428,6 +20896,32 @@ function fromDataURI(uri, asBlob, options) {
20428
20896
  throw new AxiosError$1('Unsupported protocol ' + protocol, AxiosError$1.ERR_NOT_SUPPORT);
20429
20897
  }
20430
20898
 
20899
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
20900
+
20901
+ /**
20902
+ * Apply the headers generated by a FormData implementation to the request headers,
20903
+ * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
20904
+ * content-* headers; otherwise merge all of them.
20905
+ *
20906
+ * @param {AxiosHeaders} headers - the request headers to mutate
20907
+ * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
20908
+ * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
20909
+ *
20910
+ * @returns {void}
20911
+ */
20912
+ function setFormDataHeaders(headers, formHeaders, policy) {
20913
+ if (policy !== 'content-only') {
20914
+ headers.set(formHeaders);
20915
+ return;
20916
+ }
20917
+
20918
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
20919
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
20920
+ headers.set(key, val);
20921
+ }
20922
+ });
20923
+ }
20924
+
20431
20925
  const kInternals = Symbol('internals');
20432
20926
 
20433
20927
  class AxiosTransformStream extends stream.Transform {
@@ -20735,6 +21229,7 @@ class Http2Sessions {
20735
21229
 
20736
21230
  getSession(authority, options) {
20737
21231
  options = Object.assign(
21232
+ Object.create(null),
20738
21233
  {
20739
21234
  sessionTimeout: 1000,
20740
21235
  },
@@ -20825,6 +21320,7 @@ class Http2Sessions {
20825
21320
  }
20826
21321
 
20827
21322
  session.once('close', removeSession);
21323
+ session.once('error', removeSession);
20828
21324
 
20829
21325
  let entry = [session, options];
20830
21326
 
@@ -20853,6 +21349,16 @@ const callbackify = (fn, reducer) => {
20853
21349
 
20854
21350
  const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']);
20855
21351
 
21352
+ const trimTrailingDots = (value) => {
21353
+ let end = value.length;
21354
+
21355
+ while (end && value.charCodeAt(end - 1) === 46) {
21356
+ end--;
21357
+ }
21358
+
21359
+ return end === value.length ? value : value.slice(0, end);
21360
+ };
21361
+
20856
21362
  const isIPv4Loopback = (host) => {
20857
21363
  const parts = host.split('.');
20858
21364
  if (parts.length !== 4) return false;
@@ -20860,6 +21366,112 @@ const isIPv4Loopback = (host) => {
20860
21366
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
20861
21367
  };
20862
21368
 
21369
+ /**
21370
+ * Canonicalize an IPv4 address written in shorthand, octal, or hex form into
21371
+ * dotted-decimal. IPv6 addresses and non-IP strings are returned unchanged so
21372
+ * the existing IPv4-mapped IPv6 unmap path and the isLoopback path can still
21373
+ * see them.
21374
+ *
21375
+ * Shorthand expansion mirrors Node's URL parser: literal parts fill from the
21376
+ * left, the final part fills the remaining octets from the right with
21377
+ * zero-padding on the left.
21378
+ * 127.1 -> 127.0.0.1
21379
+ * 127.0.1 -> 127.0.0.1
21380
+ * 1.2.3 -> 1.2.0.3
21381
+ *
21382
+ * Each octet is parsed with an explicit base: 16 for `0x`/`0X` prefix, 8 for
21383
+ * zero-prefixed multi-digit all-`0-7` parts, 10 otherwise. Zero-prefixed
21384
+ * decimal-looking parts that contain `8` or `9` are rejected to match Node's
21385
+ * URL parser, and the comparison layer falls through to non-bypass if either
21386
+ * side rejects the form (fail-safe).
21387
+ *
21388
+ * Returns the input unchanged on any parse failure, out-of-range octet, or
21389
+ * unusual shape (1-part, 5+ parts) so the comparison layer fails closed.
21390
+ */
21391
+ const parseIPv4Octet = (text) => {
21392
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
21393
+ const n = parseInt(text.slice(2), 16);
21394
+ return Number.isFinite(n) ? n : null;
21395
+ }
21396
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
21397
+ const n = parseInt(text, 8);
21398
+ return Number.isFinite(n) ? n : null;
21399
+ }
21400
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
21401
+ return null;
21402
+ }
21403
+ if (/^[0-9]+$/.test(text)) {
21404
+ const n = parseInt(text, 10);
21405
+ return Number.isFinite(n) ? n : null;
21406
+ }
21407
+ return null;
21408
+ };
21409
+
21410
+ const normalizeIPAddress = (host) => {
21411
+ if (typeof host !== 'string' || !host || host.indexOf(':') !== -1) {
21412
+ return host;
21413
+ }
21414
+
21415
+ let h = host;
21416
+ if (h.charAt(0) === '[' && h.charAt(h.length - 1) === ']') {
21417
+ h = h.slice(1, -1);
21418
+ }
21419
+ h = trimTrailingDots(h);
21420
+
21421
+ // Allowed characters for any IPv4 shape: digits, dot, 'x', 'X', hex digits.
21422
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
21423
+
21424
+ const parts = h.split('.');
21425
+
21426
+ // No part may be empty (e.g. "127..0.1" or "127.0.0."). Trailing dots are
21427
+ // already stripped above; this guards against the empty-middle case.
21428
+ if (parts.some((p) => p === '')) return host;
21429
+
21430
+ if (parts.length === 4) {
21431
+ // Full IPv4 form: each part is an octet.
21432
+ const octets = parts.map(parseIPv4Octet);
21433
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
21434
+ return octets.join('.');
21435
+ }
21436
+
21437
+ if (parts.length > 4) {
21438
+ return host;
21439
+ }
21440
+
21441
+ // Shorthand: 1..3 parts. Node's URL parser treats a 1-part input as a 32-bit
21442
+ // integer split into octets, which has surprising semantics (e.g. "127" ->
21443
+ // "0.0.0.127"). Reject 1-part inputs to keep the helper predictable: the
21444
+ // fail-safe returns the input unchanged and the comparison layer falls
21445
+ // through to non-bypass.
21446
+ if (parts.length === 1) return host;
21447
+
21448
+ // 2..3 parts: literal parts fill from the left, tail fills remaining octets
21449
+ // from the right with zero-padding.
21450
+ const literalOctets = parts.slice(0, -1);
21451
+ const tail = parts[parts.length - 1];
21452
+ const tailSlots = 4 - literalOctets.length;
21453
+
21454
+ // Tail is parsed as a full IPv4 number (hex/octal/decimal) and packed
21455
+ // low-byte-right into the remaining octets, matching Node's URL parser.
21456
+ // e.g. 127.65535 (tail 0xFFFF into 3 slots) -> 127.0.255.255;
21457
+ // 127.0x00ff (tail 0xFF into 3 slots) -> 127.0.0.255;
21458
+ // 127.0.65535 (tail 0xFFFF into 2 slots) -> 127.0.255.255.
21459
+ const tailValue = parseIPv4Octet(tail);
21460
+ if (tailValue === null) return host;
21461
+ const maxTail = (1 << (8 * tailSlots)) - 1;
21462
+ if (tailValue < 0 || tailValue > maxTail) return host;
21463
+
21464
+ const tailOctets = new Array(tailSlots).fill(0);
21465
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
21466
+ tailOctets[i] = v & 0xff;
21467
+ }
21468
+
21469
+ const literal = literalOctets.map(parseIPv4Octet);
21470
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
21471
+
21472
+ return [...literal, ...tailOctets].join('.');
21473
+ };
21474
+
20863
21475
  const isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
20864
21476
 
20865
21477
  // The unspecified address (IPv4 0.0.0.0 / IPv6 ::) resolves to the local host
@@ -20881,9 +21493,7 @@ const isIPv6Unspecified = (host) => {
20881
21493
  const explicitGroups = leftGroups.length + rightGroups.length;
20882
21494
 
20883
21495
  return (
20884
- explicitGroups < 8 &&
20885
- leftGroups.every(isIPv6ZeroGroup) &&
20886
- rightGroups.every(isIPv6ZeroGroup)
21496
+ explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup)
20887
21497
  );
20888
21498
  }
20889
21499
 
@@ -20979,7 +21589,8 @@ const parseNoProxyEntry = (entry) => {
20979
21589
  // allowing the proxy-bypass policy to be circumvented by using the alternate
20980
21590
  // representation. Returns the input unchanged when not IPv4-mapped.
20981
21591
  const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
20982
- const IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
21592
+ const IPV4_MAPPED_HEX_RE =
21593
+ /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
20983
21594
 
20984
21595
  const unmapIPv4MappedIPv6 = (host) => {
20985
21596
  if (typeof host !== 'string' || host.indexOf(':') === -1) return host;
@@ -20997,6 +21608,57 @@ const unmapIPv4MappedIPv6 = (host) => {
20997
21608
  return host;
20998
21609
  };
20999
21610
 
21611
+ const IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
21612
+
21613
+ const ipv4ToBytes = (host) => {
21614
+ const parts = host.split('.');
21615
+
21616
+ return parts.length === 4 &&
21617
+ parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255)
21618
+ ? parts.map(Number)
21619
+ : null;
21620
+ };
21621
+
21622
+ const IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
21623
+
21624
+ const ipv6ToBytes = (host) => {
21625
+ const halves = host.split('::');
21626
+
21627
+ if (halves.length > 2) {
21628
+ return null;
21629
+ }
21630
+
21631
+ const groups = halves[0] ? halves[0].split(':') : [];
21632
+
21633
+ if (halves.length === 2) {
21634
+ const rear = halves[1] ? halves[1].split(':') : [];
21635
+ const missing = 8 - groups.length - rear.length;
21636
+
21637
+ if (missing < 1) {
21638
+ return null;
21639
+ }
21640
+
21641
+ groups.push(...new Array(missing).fill('0'), ...rear);
21642
+ }
21643
+
21644
+ if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
21645
+ return null;
21646
+ }
21647
+
21648
+ return groups.flatMap((group) => {
21649
+ const value = Number.parseInt(group, 16);
21650
+ return [(value >> 8) & 0xff, value & 0xff];
21651
+ });
21652
+ };
21653
+
21654
+ const ipToBytes = (host) => {
21655
+ if (typeof host !== 'string' || !host) {
21656
+ return null;
21657
+ }
21658
+
21659
+ return host.indexOf(':') !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
21660
+ };
21661
+
21000
21662
  const normalizeNoProxyHost = (hostname) => {
21001
21663
  if (!hostname) {
21002
21664
  return hostname;
@@ -21006,7 +21668,120 @@ const normalizeNoProxyHost = (hostname) => {
21006
21668
  hostname = hostname.slice(1, -1);
21007
21669
  }
21008
21670
 
21009
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ''));
21671
+ const trimmed = trimTrailingDots(hostname);
21672
+
21673
+ // IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs
21674
+ // containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap.
21675
+ const ipv4 = normalizeIPAddress(trimmed);
21676
+ if (ipv4 !== trimmed) {
21677
+ return ipv4;
21678
+ }
21679
+
21680
+ return unmapIPv4MappedIPv6(trimmed);
21681
+ };
21682
+
21683
+ const normalizeCidrBase = (input) => {
21684
+ let base = input;
21685
+ const startsBracket = base.charAt(0) === '[';
21686
+ const endsBracket = base.charAt(base.length - 1) === ']';
21687
+ const hasBracket = base.includes('[') || base.includes(']');
21688
+
21689
+ if (startsBracket || endsBracket) {
21690
+ if (!startsBracket || !endsBracket) {
21691
+ return null;
21692
+ }
21693
+
21694
+ base = base.slice(1, -1);
21695
+
21696
+ if (base.indexOf(':') === -1 || base.includes('[') || base.includes(']')) {
21697
+ return null;
21698
+ }
21699
+ } else if (hasBracket) {
21700
+ return null;
21701
+ }
21702
+
21703
+ if (!base || base.charAt(base.length - 1) === '.') {
21704
+ return null;
21705
+ }
21706
+
21707
+ const wasIPv6 = base.indexOf(':') !== -1;
21708
+
21709
+ if (wasIPv6) {
21710
+ try {
21711
+ base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
21712
+ } catch (_err) {
21713
+ return null;
21714
+ }
21715
+ } else {
21716
+ base = normalizeIPAddress(base);
21717
+
21718
+ if (!ipv4ToBytes(base)) {
21719
+ return null;
21720
+ }
21721
+ }
21722
+
21723
+ return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
21724
+ };
21725
+
21726
+ const CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
21727
+
21728
+ const parseCidrEntry = (entry) => {
21729
+ if (entry.indexOf('/') === -1) {
21730
+ return undefined;
21731
+ }
21732
+
21733
+ const match = CIDR_ENTRY_RE.exec(entry);
21734
+
21735
+ if (!match) {
21736
+ return null;
21737
+ }
21738
+
21739
+ let prefix = Number(match[2]);
21740
+ const parsedBase = normalizeCidrBase(match[1]);
21741
+
21742
+ if (!parsedBase) {
21743
+ return null;
21744
+ }
21745
+
21746
+ const { normalized, wasIPv6 } = parsedBase;
21747
+
21748
+ if (wasIPv6 && normalized.indexOf(':') === -1) {
21749
+ if (prefix < 96) {
21750
+ return null;
21751
+ }
21752
+
21753
+ prefix -= 96;
21754
+ }
21755
+
21756
+ const bytes = ipToBytes(normalized);
21757
+
21758
+ if (!bytes || prefix > bytes.length * 8) {
21759
+ return null;
21760
+ }
21761
+
21762
+ return { bytes, prefix };
21763
+ };
21764
+
21765
+ const isInSubnet = (addressBytes, networkBytes, prefix) => {
21766
+ const fullBytes = prefix >> 3;
21767
+
21768
+ for (let i = 0; i < fullBytes; i++) {
21769
+ if (addressBytes[i] !== networkBytes[i]) {
21770
+ return false;
21771
+ }
21772
+ }
21773
+
21774
+ const remainingBits = prefix & 7;
21775
+
21776
+ if (remainingBits) {
21777
+ const mask = (0xff << (8 - remainingBits)) & 0xff;
21778
+
21779
+ if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
21780
+ return false;
21781
+ }
21782
+ }
21783
+
21784
+ return true;
21010
21785
  };
21011
21786
 
21012
21787
  function shouldBypassProxy(location) {
@@ -21032,12 +21807,28 @@ function shouldBypassProxy(location) {
21032
21807
  Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0;
21033
21808
 
21034
21809
  const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
21810
+ const hostnameBytes = ipToBytes(hostname);
21035
21811
 
21036
21812
  return noProxy.split(/[\s,]+/).some((entry) => {
21037
21813
  if (!entry) {
21038
21814
  return false;
21039
21815
  }
21040
21816
 
21817
+ if (entry === '*') {
21818
+ return true;
21819
+ }
21820
+
21821
+ const cidr = parseCidrEntry(entry);
21822
+
21823
+ if (cidr !== undefined) {
21824
+ return (
21825
+ cidr !== null &&
21826
+ !!hostnameBytes &&
21827
+ hostnameBytes.length === cidr.bytes.length &&
21828
+ isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix)
21829
+ );
21830
+ }
21831
+
21041
21832
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
21042
21833
 
21043
21834
  entryHost = normalizeNoProxyHost(entryHost);
@@ -21118,7 +21909,7 @@ function speedometer(samplesCount, min) {
21118
21909
  * Throttle decorator
21119
21910
  * @param {Function} fn
21120
21911
  * @param {Number} freq
21121
- * @return {Function}
21912
+ * @return {Array<Function>}
21122
21913
  */
21123
21914
  function throttle(fn, freq) {
21124
21915
  let timestamp = 0;
@@ -21153,8 +21944,9 @@ function throttle(fn, freq) {
21153
21944
  };
21154
21945
 
21155
21946
  const flush = () => lastArgs && invoke(lastArgs);
21947
+ const flushWith = (...args) => invoke(args);
21156
21948
 
21157
- return [throttled, flush];
21949
+ return [throttled, flush, flushWith];
21158
21950
  }
21159
21951
 
21160
21952
  const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
@@ -21162,12 +21954,12 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
21162
21954
  const _speedometer = speedometer(50, 250);
21163
21955
 
21164
21956
  return throttle((e) => {
21165
- if (!e || typeof e.loaded !== 'number') {
21957
+ if (!e || !utils$3.isNumber(e.loaded)) {
21166
21958
  return;
21167
21959
  }
21168
21960
  const rawLoaded = e.loaded;
21169
21961
  const total = e.lengthComputable ? e.total : undefined;
21170
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
21962
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
21171
21963
  const progressBytes = Math.max(0, loaded - bytesNotified);
21172
21964
  const rate = _speedometer(progressBytes);
21173
21965
 
@@ -21204,18 +21996,16 @@ const progressEventDecorator = (total, throttled) => {
21204
21996
  };
21205
21997
 
21206
21998
  const asyncDecorator =
21207
- (fn) =>
21999
+ (fn, scheduler = utils$3.asap) =>
21208
22000
  (...args) =>
21209
- utils$3.asap(() => fn(...args));
22001
+ scheduler(() => fn(...args));
21210
22002
 
21211
22003
  /**
21212
- * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
21213
- * - For base64: compute exact decoded size using length and padding;
21214
- * handle %XX at the character-count level (no string allocation).
21215
- * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
21216
- *
21217
- * @param {string} url
21218
- * @returns {number}
22004
+ * Estimate data: URL byte lengths *without* allocating large buffers.
22005
+ * - Fetch percent-decodes a base64 body before decoding it.
22006
+ * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
22007
+ * raw body, including ignored characters and content after padding.
22008
+ * - Non-base64 data is percent-decoded and then encoded as UTF-8.
21219
22009
  */
21220
22010
  const isHexDigit$1 = (charCode) =>
21221
22011
  (charCode >= 48 && charCode <= 57) ||
@@ -21225,64 +22015,101 @@ const isHexDigit$1 = (charCode) =>
21225
22015
  const isPercentEncodedByte = (str, i, len) =>
21226
22016
  i + 2 < len && isHexDigit$1(str.charCodeAt(i + 1)) && isHexDigit$1(str.charCodeAt(i + 2));
21227
22017
 
21228
- function estimateDataURLDecodedBytes(url) {
21229
- if (!url || typeof url !== 'string') return 0;
21230
- if (!url.startsWith('data:')) return 0;
22018
+ const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
21231
22019
 
21232
- const comma = url.indexOf(',');
21233
- if (comma < 0) return 0;
22020
+ const isBase64Char = (charCode) =>
22021
+ (charCode >= 65 && charCode <= 90) || // A-Z
22022
+ (charCode >= 97 && charCode <= 122) || // a-z
22023
+ (charCode >= 48 && charCode <= 57) || // 0-9
22024
+ charCode === 43 || // +
22025
+ charCode === 47 || // /
22026
+ charCode === 45 || // - (base64url)
22027
+ charCode === 95; // _ (base64url)
21234
22028
 
21235
- const meta = url.slice(5, comma);
21236
- const body = url.slice(comma + 1);
21237
- const isBase64 = /;base64/i.test(meta);
22029
+ const isBase64Whitespace = (charCode) =>
22030
+ charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
21238
22031
 
21239
- if (isBase64) {
21240
- let effectiveLen = body.length;
21241
- const len = body.length; // cache length
22032
+ const base64Bytes = (significant) => {
22033
+ const groups = Math.floor(significant / 4);
22034
+ const remainder = significant % 4;
22035
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
22036
+ };
21242
22037
 
21243
- for (let i = 0; i < len; i++) {
21244
- if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
21245
- const a = body.charCodeAt(i + 1);
21246
- const b = body.charCodeAt(i + 2);
21247
- const isHex = isHexDigit$1(a) && isHexDigit$1(b);
22038
+ // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
22039
+ // upper bound even when Buffer.from later ignores characters or stops at '='.
22040
+ const estimateBase64BufferAllocation = (body) => {
22041
+ const len = body.length;
22042
+ let padding = 0;
21248
22043
 
21249
- if (isHex) {
21250
- effectiveLen -= 2;
21251
- i += 2;
21252
- }
21253
- }
22044
+ if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
22045
+ padding++;
22046
+
22047
+ if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
22048
+ padding++;
21254
22049
  }
22050
+ }
22051
+
22052
+ return Math.floor(((len - padding) * 3) / 4);
22053
+ };
21255
22054
 
21256
- let pad = 0;
21257
- let idx = len - 1;
22055
+ const estimatePercentDecodedBase64Bytes = (body) => {
22056
+ const len = body.length;
22057
+ let significant = 0;
22058
+ let padding = 0;
22059
+ let invalid = false;
21258
22060
 
21259
- const tailIsPct3D = (j) =>
21260
- j >= 2 &&
21261
- body.charCodeAt(j - 2) === 37 && // '%'
21262
- body.charCodeAt(j - 1) === 51 && // '3'
21263
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
22061
+ for (let i = 0; i < len; i++) {
22062
+ let code = body.charCodeAt(i);
21264
22063
 
21265
- if (idx >= 0) {
21266
- if (body.charCodeAt(idx) === 61 /* '=' */) {
21267
- pad++;
21268
- idx--;
21269
- } else if (tailIsPct3D(idx)) {
21270
- pad++;
21271
- idx -= 3;
21272
- }
22064
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
22065
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
22066
+ i += 2;
21273
22067
  }
21274
22068
 
21275
- if (pad === 1 && idx >= 0) {
21276
- if (body.charCodeAt(idx) === 61 /* '=' */) {
21277
- pad++;
21278
- } else if (tailIsPct3D(idx)) {
21279
- pad++;
21280
- }
22069
+ if (isBase64Whitespace(code)) {
22070
+ continue;
22071
+ }
22072
+
22073
+ if (code === 61 /* '=' */) {
22074
+ padding++;
22075
+ continue;
21281
22076
  }
21282
22077
 
21283
- const groups = Math.floor(effectiveLen / 4);
21284
- const bytes = groups * 3 - (pad || 0);
21285
- return bytes > 0 ? bytes : 0;
22078
+ if (!isBase64Char(code) || padding > 0) {
22079
+ invalid = true;
22080
+ continue;
22081
+ }
22082
+
22083
+ significant++;
22084
+ }
22085
+
22086
+ // Fetch rejects malformed forgiving-base64 input. Returning the raw-size
22087
+ // allocation bound keeps that invalid input from becoming a pre-check bypass.
22088
+ if (
22089
+ invalid ||
22090
+ padding > 2 ||
22091
+ (padding > 0 && (significant + padding) % 4 !== 0) ||
22092
+ significant % 4 === 1
22093
+ ) {
22094
+ return estimateBase64BufferAllocation(body);
22095
+ }
22096
+
22097
+ return base64Bytes(significant);
22098
+ };
22099
+
22100
+ const estimateDataURLBytes = (url, estimateBase64) => {
22101
+ if (!url || typeof url !== 'string') return 0;
22102
+ if (!url.startsWith('data:')) return 0;
22103
+
22104
+ const comma = url.indexOf(',');
22105
+ if (comma < 0) return 0;
22106
+
22107
+ const meta = url.slice(5, comma);
22108
+ const body = url.slice(comma + 1);
22109
+ const isBase64 = /;base64/i.test(meta);
22110
+
22111
+ if (isBase64) {
22112
+ return estimateBase64(body);
21286
22113
  }
21287
22114
 
21288
22115
  // Compute UTF-8 byte length directly from UTF-16 code units without allocating
@@ -21312,6 +22139,32 @@ function estimateDataURLDecodedBytes(url) {
21312
22139
  }
21313
22140
  }
21314
22141
  return bytes;
22142
+ };
22143
+
22144
+ /**
22145
+ * Estimate the percent-decoded payload size used by Fetch data: URLs.
22146
+ *
22147
+ * @param {string} url
22148
+ * @returns {number}
22149
+ */
22150
+ function estimateDataURLDecodedBytes(url) {
22151
+ // Fetch removes URL fragments before processing a data: URL.
22152
+ const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
22153
+
22154
+ return estimateDataURLBytes(
22155
+ fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
22156
+ estimatePercentDecodedBase64Bytes
22157
+ );
22158
+ }
22159
+
22160
+ /**
22161
+ * Estimate the Buffer backing allocation used by Node's raw base64 decoder.
22162
+ *
22163
+ * @param {string} url
22164
+ * @returns {number}
22165
+ */
22166
+ function estimateDataURLBufferAllocation(url) {
22167
+ return estimateDataURLBytes(url, estimateBase64BufferAllocation);
21315
22168
  }
21316
22169
 
21317
22170
  const zlibOptions = {
@@ -21333,30 +22186,27 @@ const isBrotliSupported = utils$3.isFunction(zlib.createBrotliDecompress);
21333
22186
  const isZstdSupported = utils$3.isFunction(zlib.createZstdDecompress);
21334
22187
  const ACCEPT_ENCODING = 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : '');
21335
22188
  const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ', zstd' : '');
22189
+ const scheduleProgress =
22190
+ typeof process !== 'undefined' && process.nextTick ? process.nextTick.bind(process) : utils$3.asap;
21336
22191
 
21337
22192
  const { http: httpFollow, https: httpsFollow } = followRedirects;
21338
22193
 
21339
22194
  const isHttps = /https:?/;
21340
- const FORM_DATA_CONTENT_HEADERS$1 = ['content-type', 'content-length'];
21341
-
21342
- function setFormDataHeaders$1(headers, formHeaders, policy) {
21343
- if (policy !== 'content-only') {
21344
- headers.set(formHeaders);
21345
- return;
21346
- }
21347
-
21348
- Object.entries(formHeaders).forEach(([key, val]) => {
21349
- if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
21350
- headers.set(key, val);
21351
- }
21352
- });
21353
- }
21354
22195
 
21355
22196
  // Symbols used to bind a single 'error' listener to a pooled socket and track
21356
22197
  // the request currently owning that socket across keep-alive reuse (issue #10780).
21357
22198
  const kAxiosSocketListener = Symbol('axios.http.socketListener');
21358
22199
  const kAxiosCurrentReq = Symbol('axios.http.currentReq');
21359
22200
 
22201
+ // A shared listener avoids retaining an adapter context for the lifetime of a
22202
+ // pooled socket. EventEmitter invokes listeners with `this` set to the emitter.
22203
+ function handleSocketError(err) {
22204
+ const current = this[kAxiosCurrentReq];
22205
+ if (current && !current.destroyed) {
22206
+ current.destroy(err);
22207
+ }
22208
+ }
22209
+
21360
22210
  // Tags HttpsProxyAgent instances installed by setProxy() so the redirect path
21361
22211
  // can strip them without clobbering a user-supplied agent that happens to be
21362
22212
  // an HttpsProxyAgent.
@@ -21404,16 +22254,14 @@ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.
21404
22254
  const agentOptions = agent && agent.options;
21405
22255
 
21406
22256
  return Boolean(
21407
- agentOptions &&
21408
- utils$3.hasOwnProp(agentOptions, 'proxyEnv') &&
21409
- agentOptions.proxyEnv != null
22257
+ agentOptions && utils$3.hasOwnProp(agentOptions, 'proxyEnv') && agentOptions.proxyEnv != null
21410
22258
  );
21411
22259
  }
21412
22260
 
21413
22261
  function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
21414
22262
  return isHttps.test(options.protocol)
21415
- ? (configHttpsAgent || https$2.globalAgent)
21416
- : (configHttpAgent || http$2.globalAgent);
22263
+ ? configHttpsAgent || https$2.globalAgent
22264
+ : configHttpAgent || http$2.globalAgent;
21417
22265
  }
21418
22266
 
21419
22267
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
@@ -21426,17 +22274,18 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
21426
22274
  '#' +
21427
22275
  (agentOptions.auth || '');
21428
22276
  const cache = userHttpsAgent
21429
- ? (tunnelingAgentCacheUser.get(userHttpsAgent) ||
21430
- tunnelingAgentCacheUser.set(userHttpsAgent, new Map()).get(userHttpsAgent))
22277
+ ? tunnelingAgentCacheUser.get(userHttpsAgent) ||
22278
+ tunnelingAgentCacheUser.set(userHttpsAgent, new Map()).get(userHttpsAgent)
21431
22279
  : tunnelingAgentCache;
21432
22280
  let agent = cache.get(key);
21433
22281
  if (agent) return agent;
21434
22282
  // Forward the user's TLS options (custom CA, rejectUnauthorized, client cert,
21435
22283
  // etc.) into the tunneling agent so they apply to the origin TLS upgrade
21436
22284
  // performed after CONNECT. Our proxy fields take precedence on conflict.
21437
- const merged = userHttpsAgent && userHttpsAgent.options
21438
- ? { ...userHttpsAgent.options, ...agentOptions }
21439
- : agentOptions;
22285
+ const merged =
22286
+ userHttpsAgent && userHttpsAgent.options
22287
+ ? { ...userHttpsAgent.options, ...agentOptions }
22288
+ : agentOptions;
21440
22289
  agent = new HttpsProxyAgent$2(merged);
21441
22290
  if (userHttpsAgent && userHttpsAgent.options) {
21442
22291
  const originTLSOptions = { ...userHttpsAgent.options };
@@ -21533,13 +22382,22 @@ function isSameOriginRedirect(redirectOptions, requestDetails) {
21533
22382
  * @param {http.ClientRequestArgs} options
21534
22383
  * @param {AxiosProxyConfig} configProxy configuration from Axios options object
21535
22384
  * @param {string} location
21536
- *
21537
- * @returns {http.ClientRequestArgs}
21538
- */
21539
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
22385
+ * @param {boolean} [allowEnvProxy=true] whether environment proxy configuration can be used
22386
+ *
22387
+ * @returns {boolean} whether a proxy applies to the selected transport
22388
+ */
22389
+ function setProxy(
22390
+ options,
22391
+ configProxy,
22392
+ location,
22393
+ isRedirect,
22394
+ configHttpsAgent,
22395
+ configHttpAgent,
22396
+ allowEnvProxy = true
22397
+ ) {
21540
22398
  let proxy = configProxy;
21541
22399
  const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
21542
- if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
22400
+ if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
21543
22401
  const proxyUrl = getProxyForUrl(location);
21544
22402
  if (proxyUrl) {
21545
22403
  if (!shouldBypassProxy(location)) {
@@ -21696,9 +22554,15 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent,
21696
22554
  redirectOptions.href,
21697
22555
  true,
21698
22556
  configHttpsAgent,
21699
- configHttpAgent
22557
+ configHttpAgent,
22558
+ allowEnvProxy
21700
22559
  );
21701
22560
  };
22561
+
22562
+ return Boolean(
22563
+ proxy ||
22564
+ (configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent))
22565
+ );
21702
22566
  }
21703
22567
 
21704
22568
  const isHttpAdapterSupported =
@@ -21733,7 +22597,7 @@ const wrapAsync = (asyncExecutor) => {
21733
22597
 
21734
22598
  const resolveFamily = ({ address, family }) => {
21735
22599
  if (!utils$3.isString(address)) {
21736
- throw TypeError('address must be a string');
22600
+ throw new AxiosError$1('address must be a string', AxiosError$1.ERR_BAD_OPTION_VALUE);
21737
22601
  }
21738
22602
  return {
21739
22603
  address,
@@ -21744,6 +22608,43 @@ const resolveFamily = ({ address, family }) => {
21744
22608
  const buildAddressEntry = (address, family) =>
21745
22609
  resolveFamily(utils$3.isObject(address) ? address : { address, family });
21746
22610
 
22611
+ const normalizedLookupCache = new WeakMap();
22612
+
22613
+ const normalizeLookup = (lookup) => {
22614
+ let normalized = normalizedLookupCache.get(lookup);
22615
+
22616
+ if (normalized) {
22617
+ return normalized;
22618
+ }
22619
+
22620
+ const callbackLookup = callbackify(lookup, (value) => (utils$3.isArray(value) ? value : [value]));
22621
+
22622
+ // Support opt.all, which is required by current Node.js releases.
22623
+ normalized = (hostname, opt, cb) => {
22624
+ callbackLookup(hostname, opt, (err, arg0, arg1) => {
22625
+ if (err) {
22626
+ return cb(err);
22627
+ }
22628
+
22629
+ let addresses;
22630
+
22631
+ try {
22632
+ addresses = utils$3.isArray(arg0)
22633
+ ? arg0.map((addr) => buildAddressEntry(addr))
22634
+ : [buildAddressEntry(arg0, arg1)];
22635
+ } catch (error) {
22636
+ return cb(error);
22637
+ }
22638
+
22639
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
22640
+ });
22641
+ };
22642
+
22643
+ normalizedLookupCache.set(lookup, normalized);
22644
+
22645
+ return normalized;
22646
+ };
22647
+
21747
22648
  const http2Transport = {
21748
22649
  request(options, cb) {
21749
22650
  const authority =
@@ -21808,6 +22709,7 @@ var httpAdapter = isHttpAdapterSupported &&
21808
22709
  let family = own('family');
21809
22710
  let httpVersion = own('httpVersion');
21810
22711
  if (httpVersion === undefined) httpVersion = 1;
22712
+ const rawHttpVersion = httpVersion;
21811
22713
  let http2Options = own('http2Options');
21812
22714
  const httpAgent = own('httpAgent');
21813
22715
  const httpsAgent = own('httpsAgent');
@@ -21825,34 +22727,36 @@ var httpAdapter = isHttpAdapterSupported &&
21825
22727
  let req;
21826
22728
  let connectPhaseTimer;
21827
22729
 
21828
- httpVersion = +httpVersion;
22730
+ try {
22731
+ httpVersion = +httpVersion;
22732
+ } catch (err) {
22733
+ throw new AxiosError$1(
22734
+ 'Invalid protocol version: value is not a number',
22735
+ AxiosError$1.ERR_BAD_OPTION_VALUE,
22736
+ config
22737
+ );
22738
+ }
21829
22739
 
21830
22740
  if (Number.isNaN(httpVersion)) {
21831
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
22741
+ throw new AxiosError$1(
22742
+ `Invalid protocol version: '${rawHttpVersion}' is not a number`,
22743
+ AxiosError$1.ERR_BAD_OPTION_VALUE,
22744
+ config
22745
+ );
21832
22746
  }
21833
22747
 
21834
22748
  if (httpVersion !== 1 && httpVersion !== 2) {
21835
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
22749
+ throw new AxiosError$1(
22750
+ `Unsupported protocol version '${httpVersion}'`,
22751
+ AxiosError$1.ERR_BAD_OPTION_VALUE,
22752
+ config
22753
+ );
21836
22754
  }
21837
22755
 
21838
22756
  const isHttp2 = httpVersion === 2;
21839
22757
 
21840
22758
  if (lookup) {
21841
- const _lookup = callbackify(lookup, (value) => (utils$3.isArray(value) ? value : [value]));
21842
- // hotfix to support opt.all option which is required for node 20.x
21843
- lookup = (hostname, opt, cb) => {
21844
- _lookup(hostname, opt, (err, arg0, arg1) => {
21845
- if (err) {
21846
- return cb(err);
21847
- }
21848
-
21849
- const addresses = utils$3.isArray(arg0)
21850
- ? arg0.map((addr) => buildAddressEntry(addr))
21851
- : [buildAddressEntry(arg0, arg1)];
21852
-
21853
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
21854
- });
21855
- };
22759
+ lookup = normalizeLookup(lookup);
21856
22760
  }
21857
22761
 
21858
22762
  const abortEmitter = new require$$0$4.EventEmitter();
@@ -21945,7 +22849,9 @@ var httpAdapter = isHttpAdapterSupported &&
21945
22849
  // prototype cannot influence URL base selection.
21946
22850
  const urlBase = socketPath
21947
22851
  ? 'http://localhost'
21948
- : (platform.hasBrowserEnv ? platform.origin : undefined);
22852
+ : platform.hasBrowserEnv
22853
+ ? platform.origin
22854
+ : undefined;
21949
22855
  const parsed = new URL(fullPath, urlBase);
21950
22856
  const protocol = parsed.protocol || supportedProtocols[0];
21951
22857
 
@@ -21954,7 +22860,7 @@ var httpAdapter = isHttpAdapterSupported &&
21954
22860
  if (maxContentLength > -1) {
21955
22861
  // Use the exact string passed to fromDataURI (the configured url); fall back to fullPath if needed.
21956
22862
  const dataUrl = String(own('url') || fullPath || '');
21957
- const estimated = estimateDataURLDecodedBytes(dataUrl);
22863
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
21958
22864
 
21959
22865
  if (estimated > maxContentLength) {
21960
22866
  return reject(
@@ -22044,7 +22950,7 @@ var httpAdapter = isHttpAdapterSupported &&
22044
22950
  utils$3.isFunction(data.getHeaders) &&
22045
22951
  data.getHeaders !== Object.prototype.getHeaders
22046
22952
  ) {
22047
- setFormDataHeaders$1(headers, data.getHeaders(), own('formDataHeaderPolicy'));
22953
+ setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
22048
22954
 
22049
22955
  if (!headers.hasContentLength()) {
22050
22956
  try {
@@ -22119,7 +23025,7 @@ var httpAdapter = isHttpAdapterSupported &&
22119
23025
  data,
22120
23026
  progressEventDecorator(
22121
23027
  contentLength,
22122
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
23028
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
22123
23029
  )
22124
23030
  )
22125
23031
  );
@@ -22154,7 +23060,7 @@ var httpAdapter = isHttpAdapterSupported &&
22154
23060
  return reject(
22155
23061
  AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config, null, null, {
22156
23062
  url: own('url'),
22157
- exists: true
23063
+ exists: true,
22158
23064
  })
22159
23065
  );
22160
23066
  }
@@ -22162,10 +23068,16 @@ var httpAdapter = isHttpAdapterSupported &&
22162
23068
  headers.set(
22163
23069
  'Accept-Encoding',
22164
23070
  utils$3.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') &&
22165
- transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
23071
+ transitional.advertiseZstdAcceptEncoding === true
23072
+ ? ACCEPT_ENCODING_WITH_ZSTD
23073
+ : ACCEPT_ENCODING,
22166
23074
  false
22167
23075
  );
22168
23076
 
23077
+ if (isHttp2 && lookup) {
23078
+ http2Options = Object.assign(Object.create(null), http2Options, { lookup });
23079
+ }
23080
+
22169
23081
  // Null-prototype to block prototype pollution gadgets on properties read
22170
23082
  // directly by Node's http.request (e.g. insecureHTTPParser, lookup).
22171
23083
  const options = Object.assign(Object.create(null), {
@@ -22179,11 +23091,14 @@ var httpAdapter = isHttpAdapterSupported &&
22179
23091
  beforeRedirect: dispatchBeforeRedirect,
22180
23092
  beforeRedirects: Object.create(null),
22181
23093
  http2Options,
23094
+ createConnection: undefined,
22182
23095
  });
22183
23096
 
22184
23097
  // cacheable-lookup integration hotfix
22185
23098
  !utils$3.isUndefined(lookup) && (options.lookup = lookup);
22186
23099
 
23100
+ let proxyApplied = false;
23101
+
22187
23102
  if (socketPath) {
22188
23103
  if (typeof socketPath !== 'string') {
22189
23104
  return reject(
@@ -22219,13 +23134,17 @@ var httpAdapter = isHttpAdapterSupported &&
22219
23134
  ? parsed.hostname.slice(1, -1)
22220
23135
  : parsed.hostname;
22221
23136
  options.port = parsed.port;
22222
- setProxy(
23137
+ proxyApplied = setProxy(
22223
23138
  options,
22224
23139
  configProxy,
22225
23140
  protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path,
22226
23141
  false,
22227
23142
  httpsAgent,
22228
- httpAgent
23143
+ httpAgent,
23144
+ // The HTTP/2 transport connects independently of HTTP/1 agents, so it
23145
+ // cannot apply either axios-resolved or agent-local environment proxies.
23146
+ // Explicit proxy config is still processed and rejected below.
23147
+ !isHttp2
22229
23148
  );
22230
23149
  }
22231
23150
  let transport;
@@ -22243,6 +23162,16 @@ var httpAdapter = isHttpAdapterSupported &&
22243
23162
  }
22244
23163
 
22245
23164
  if (isHttp2) {
23165
+ if (proxyApplied) {
23166
+ return reject(
23167
+ new AxiosError$1(
23168
+ 'HTTP/2 requests with a proxy are not supported',
23169
+ AxiosError$1.ERR_NOT_SUPPORT,
23170
+ config
23171
+ )
23172
+ );
23173
+ }
23174
+
22246
23175
  transport = http2Transport;
22247
23176
  } else {
22248
23177
  const configTransport = own('transport');
@@ -22357,7 +23286,11 @@ var httpAdapter = isHttpAdapterSupported &&
22357
23286
  transformStream,
22358
23287
  progressEventDecorator(
22359
23288
  responseLength,
22360
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
23289
+ progressEventReducer(
23290
+ asyncDecorator(onDownloadProgress, scheduleProgress),
23291
+ true,
23292
+ 3
23293
+ )
22361
23294
  )
22362
23295
  )
22363
23296
  );
@@ -22555,18 +23488,10 @@ var httpAdapter = isHttpAdapterSupported &&
22555
23488
  socket.setKeepAlive(true, 1000 * 60);
22556
23489
  }
22557
23490
 
22558
- // Install a single 'error' listener per socket (not per request) to avoid
22559
- // accumulating listeners on pooled keep-alive sockets that get reassigned
22560
- // to new requests before the previous request's 'close' fires (issue #10780).
22561
- // The listener is bound to the socket's currently-active request via a
22562
- // symbol, which is swapped as the socket is reassigned.
23491
+ // Install one shared 'error' listener per socket. The symbol follows the
23492
+ // currently-active request as pooled sockets are reassigned (issue #10780).
22563
23493
  if (!socket[kAxiosSocketListener]) {
22564
- socket.on('error', function handleSocketError(err) {
22565
- const current = socket[kAxiosCurrentReq];
22566
- if (current && !current.destroyed) {
22567
- current.destroy(err);
22568
- }
22569
- });
23494
+ socket.on('error', handleSocketError);
22570
23495
  socket[kAxiosSocketListener] = true;
22571
23496
  }
22572
23497
 
@@ -22768,6 +23693,17 @@ var cookies = platform.hasStandardBrowserEnv
22768
23693
 
22769
23694
  const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing);
22770
23695
 
23696
+ const ownEnumerableKeys = (thing) => {
23697
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
23698
+ return Object.keys(thing).concat(
23699
+ Object.getOwnPropertySymbols(thing).filter(
23700
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
23701
+ )
23702
+ );
23703
+ }
23704
+ return Object.keys(thing);
23705
+ };
23706
+
22771
23707
  /**
22772
23708
  * Config-specific merge-function which creates a new config-object
22773
23709
  * by merging two configuration objects together.
@@ -22833,7 +23769,9 @@ function mergeConfig$1(config1, config2) {
22833
23769
  }
22834
23770
 
22835
23771
  function getMergedTransitionalOption(prop) {
22836
- const transitional2 = utils$3.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
23772
+ const transitional2 = utils$3.hasOwnProp(config2, 'transitional')
23773
+ ? config2.transitional
23774
+ : undefined;
22837
23775
 
22838
23776
  if (!utils$3.isUndefined(transitional2)) {
22839
23777
  if (utils$3.isPlainObject(transitional2)) {
@@ -22845,7 +23783,9 @@ function mergeConfig$1(config1, config2) {
22845
23783
  }
22846
23784
  }
22847
23785
 
22848
- const transitional1 = utils$3.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
23786
+ const transitional1 = utils$3.hasOwnProp(config1, 'transitional')
23787
+ ? config1.transitional
23788
+ : undefined;
22849
23789
 
22850
23790
  if (utils$3.isPlainObject(transitional1) && utils$3.hasOwnProp(transitional1, prop)) {
22851
23791
  return transitional1[prop];
@@ -22872,7 +23812,7 @@ function mergeConfig$1(config1, config2) {
22872
23812
  transformResponse: defaultToConfig2,
22873
23813
  paramsSerializer: defaultToConfig2,
22874
23814
  timeout: defaultToConfig2,
22875
- timeoutMessage: defaultToConfig2,
23815
+ timeoutErrorMessage: defaultToConfig2,
22876
23816
  withCredentials: defaultToConfig2,
22877
23817
  withXSRFToken: defaultToConfig2,
22878
23818
  adapter: defaultToConfig2,
@@ -22897,7 +23837,7 @@ function mergeConfig$1(config1, config2) {
22897
23837
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
22898
23838
  };
22899
23839
 
22900
- utils$3.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
23840
+ utils$3.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
22901
23841
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
22902
23842
  const merge = utils$3.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
22903
23843
  const a = utils$3.hasOwnProp(config1, prop) ? config1[prop] : undefined;
@@ -22921,21 +23861,6 @@ function mergeConfig$1(config1, config2) {
22921
23861
  return config;
22922
23862
  }
22923
23863
 
22924
- const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
22925
-
22926
- function setFormDataHeaders(headers, formHeaders, policy) {
22927
- if (policy !== 'content-only') {
22928
- headers.set(formHeaders);
22929
- return;
22930
- }
22931
-
22932
- Object.entries(formHeaders || {}).forEach(([key, val]) => {
22933
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
22934
- headers.set(key, val);
22935
- }
22936
- });
22937
- }
22938
-
22939
23864
  /**
22940
23865
  * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
22941
23866
  * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
@@ -22990,15 +23915,17 @@ function resolveConfig(config) {
22990
23915
  }
22991
23916
 
22992
23917
  if (utils$3.isFormData(data)) {
23918
+ const getHeaders = utils$3.getSafeProp(data, 'getHeaders');
23919
+
22993
23920
  if (
22994
23921
  platform.hasStandardBrowserEnv ||
22995
23922
  platform.hasStandardBrowserWebWorkerEnv ||
22996
23923
  utils$3.isReactNative(data)
22997
23924
  ) {
22998
23925
  headers.setContentType(undefined); // browser/web worker/RN handles it
22999
- } else if (utils$3.isFunction(data.getHeaders)) {
23926
+ } else if (utils$3.isFunction(getHeaders)) {
23000
23927
  // Node.js FormData (like form-data package)
23001
- setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
23928
+ setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
23002
23929
  }
23003
23930
  }
23004
23931
 
@@ -23040,7 +23967,7 @@ var xhrAdapter = isXHRAdapterSupported &&
23040
23967
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
23041
23968
  let onCanceled;
23042
23969
  let uploadThrottled, downloadThrottled;
23043
- let flushUpload, flushDownload;
23970
+ let flushUpload, flushDownload, flushDownloadWithEvent;
23044
23971
 
23045
23972
  function done() {
23046
23973
  flushUpload && flushUpload(); // flush events
@@ -23058,10 +23985,55 @@ var xhrAdapter = isXHRAdapterSupported &&
23058
23985
  // Set the request timeout in MS
23059
23986
  request.timeout = _config.timeout;
23060
23987
 
23061
- function onloadend() {
23988
+ function onloadend(event) {
23989
+ if (!request) {
23990
+ return;
23991
+ }
23992
+
23993
+ // Status 0 means no response was received, which onerror and onabort normally
23994
+ // reject before this runs. Firefox 152 fires only readystatechange and loadend for
23995
+ // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
23996
+ // leaving settle() to resolve them as an empty success. ECONNABORTED is the error
23997
+ // onabort raised on Firefox 151. Reads over file:, which some environments report as
23998
+ // status 0 on success, are excluded by the request URL's scheme after browser-style
23999
+ // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
24000
+ // by responseURL where implemented.
24001
+ if (
24002
+ request.status === 0 &&
24003
+ (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||
24004
+ parseProtocol(platform.origin)) !== 'file' &&
24005
+ !(request.responseURL && request.responseURL.startsWith('file:'))
24006
+ ) {
24007
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
24008
+ done();
24009
+
24010
+ // Clean up request
24011
+ request = null;
24012
+ return;
24013
+ }
24014
+
24015
+ // When loadend is still dispatching, flushing with it gives progress
24016
+ // listeners a final delivery whose event has a live target. The legacy
24017
+ // ready-state fallback has no event, so replay its pending progress.
24018
+ // A throwing listener must not block settlement; rethrow asynchronously,
24019
+ // matching how listener errors surface on the throttle timer path.
24020
+ try {
24021
+ if (event) {
24022
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
24023
+ } else {
24024
+ flushDownload && flushDownload();
24025
+ }
24026
+ } catch (err) {
24027
+ setTimeout(() => {
24028
+ throw err;
24029
+ });
24030
+ }
24031
+
24032
+ // A final progress callback can cancel the request synchronously.
23062
24033
  if (!request) {
23063
24034
  return;
23064
24035
  }
24036
+
23065
24037
  // Prepare the response
23066
24038
  const responseHeaders = AxiosHeaders$1.from(
23067
24039
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
@@ -23193,7 +24165,10 @@ var xhrAdapter = isXHRAdapterSupported &&
23193
24165
 
23194
24166
  // Handle progress if needed
23195
24167
  if (onDownloadProgress) {
23196
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
24168
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
24169
+ onDownloadProgress,
24170
+ true
24171
+ );
23197
24172
  request.addEventListener('progress', downloadThrottled);
23198
24173
  }
23199
24174
 
@@ -23289,7 +24264,18 @@ const composeSignals = (signals, timeout) => {
23289
24264
  signals = null;
23290
24265
  };
23291
24266
 
23292
- signals.forEach((signal) => signal.addEventListener('abort', onabort, { once: true }));
24267
+ signals.forEach((signal) => {
24268
+ if (aborted) {
24269
+ return;
24270
+ }
24271
+
24272
+ if (signal.aborted) {
24273
+ onabort.call(signal);
24274
+ return;
24275
+ }
24276
+
24277
+ signal.addEventListener('abort', onabort, { once: true });
24278
+ });
23293
24279
 
23294
24280
  const { signal } = controller;
23295
24281
 
@@ -23390,6 +24376,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
23390
24376
 
23391
24377
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
23392
24378
 
24379
+ const DEFAULT_REQUEST_OPTIONS = {
24380
+ cache: 'default',
24381
+ redirect: 'follow',
24382
+ referrer: 'about:client',
24383
+ referrerPolicy: '',
24384
+ mode: 'cors',
24385
+ integrity: '',
24386
+ keepalive: false,
24387
+ priority: 'auto',
24388
+ window: null,
24389
+ };
24390
+
23393
24391
  const { isFunction: isFunction$2 } = utils$3;
23394
24392
 
23395
24393
  /**
@@ -23440,9 +24438,7 @@ const maybeWithAuthCredentials = (url) => {
23440
24438
 
23441
24439
  const factory$1 = (env) => {
23442
24440
  const globalObject =
23443
- utils$3.global !== undefined && utils$3.global !== null
23444
- ? utils$3.global
23445
- : globalThis;
24441
+ utils$3.global !== undefined && utils$3.global !== null ? utils$3.global : globalThis;
23446
24442
  const { ReadableStream, TextEncoder } = globalObject;
23447
24443
 
23448
24444
  env = utils$3.merge.call(
@@ -23581,6 +24577,7 @@ const factory$1 = (env) => {
23581
24577
  fetchOptions,
23582
24578
  maxContentLength,
23583
24579
  maxBodyLength,
24580
+ maxRedirects,
23584
24581
  } = resolveConfig(config);
23585
24582
 
23586
24583
  const hasMaxContentLength = utils$3.isNumber(maxContentLength) && maxContentLength > -1;
@@ -23631,7 +24628,7 @@ const factory$1 = (env) => {
23631
24628
  const password = utils$3.getSafeProp(configAuth, 'password') || '';
23632
24629
  auth = {
23633
24630
  username,
23634
- password
24631
+ password,
23635
24632
  };
23636
24633
  }
23637
24634
 
@@ -23643,7 +24640,7 @@ const factory$1 = (env) => {
23643
24640
  const urlPassword = decodeURIComponentSafe(parsedURL.password);
23644
24641
  auth = {
23645
24642
  username: urlUsername,
23646
- password: urlPassword
24643
+ password: urlPassword,
23647
24644
  };
23648
24645
  }
23649
24646
 
@@ -23717,7 +24714,9 @@ const factory$1 = (env) => {
23717
24714
  (onUploadProgress || mustEnforceStreamBody)
23718
24715
  ) {
23719
24716
  requestContentLength =
23720
- requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
24717
+ requestContentLength == null
24718
+ ? await resolveBodyLength(headers, data)
24719
+ : requestContentLength;
23721
24720
 
23722
24721
  // A declared length of 0 is only trusted to skip the wrap when we are
23723
24722
  // not enforcing a stream limit (which must not rely on that header).
@@ -23730,7 +24729,10 @@ const factory$1 = (env) => {
23730
24729
 
23731
24730
  let contentTypeHeader;
23732
24731
 
23733
- if (utils$3.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
24732
+ if (
24733
+ utils$3.isFormData(data) &&
24734
+ (contentTypeHeader = _request.headers.get('content-type'))
24735
+ ) {
23734
24736
  headers.setContentType(contentTypeHeader);
23735
24737
  }
23736
24738
 
@@ -23793,20 +24795,57 @@ const factory$1 = (env) => {
23793
24795
  // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
23794
24796
  headers.set('User-Agent', 'axios/' + VERSION$1, false);
23795
24797
 
23796
- const resolvedOptions = {
23797
- ...fetchOptions,
24798
+ const safeFetchOptions =
24799
+ fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
24800
+
24801
+ if (safeFetchOptions) {
24802
+ // These options are owned by Axios and are already reflected in the
24803
+ // resolved Request passed to fetch.
24804
+ delete safeFetchOptions.body;
24805
+ delete safeFetchOptions.headers;
24806
+ delete safeFetchOptions.method;
24807
+ delete safeFetchOptions.signal;
24808
+ delete safeFetchOptions.duplex;
24809
+ delete safeFetchOptions.credentials;
24810
+ }
24811
+
24812
+ const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
23798
24813
  signal: composedSignal,
23799
24814
  method: method.toUpperCase(),
23800
24815
  headers: toByteStringHeaderObject(headers.normalize()),
23801
24816
  body: data,
23802
24817
  duplex: 'half',
23803
24818
  credentials: isCredentialsSupported ? withCredentials : undefined,
23804
- };
24819
+ });
24820
+
24821
+ if (isRequestSupported) {
24822
+ utils$3.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
24823
+ if (resolvedOptions[key] === undefined) {
24824
+ resolvedOptions[key] = value;
24825
+ }
24826
+ });
24827
+
24828
+ if (resolvedOptions.signal === undefined) {
24829
+ resolvedOptions.signal = null;
24830
+ }
24831
+
24832
+ if (resolvedOptions.body === undefined) {
24833
+ resolvedOptions.body = null;
24834
+ }
24835
+ }
24836
+
24837
+ if (maxRedirects === 0) {
24838
+ resolvedOptions.redirect = 'manual';
24839
+
24840
+ if (safeFetchOptions) {
24841
+ safeFetchOptions.redirect = 'manual';
24842
+ }
24843
+ }
23805
24844
 
23806
24845
  request = isRequestSupported && new Request(url, resolvedOptions);
23807
24846
 
23808
24847
  let response = await (isRequestSupported
23809
- ? _fetch(request, fetchOptions)
24848
+ ? _fetch(request, safeFetchOptions)
23810
24849
  : _fetch(url, resolvedOptions));
23811
24850
 
23812
24851
  const responseHeaders = AxiosHeaders$1.from(response.headers);
@@ -24164,10 +25203,15 @@ function throwIfCancellationRequested(config) {
24164
25203
  *
24165
25204
  * @returns {Promise} The Promise to be fulfilled
24166
25205
  */
24167
- function dispatchRequest(config) {
25206
+ function dispatchRequest(_config) {
25207
+ // Interceptors may replace the merged config with an ordinary object. Flatten
25208
+ // it at the dispatch boundary so shared prototype members cannot become
25209
+ // request behavior, while preserving intentional template/class members.
25210
+ const config = utils$3.toSafeFlatObject(_config);
25211
+
24168
25212
  throwIfCancellationRequested(config);
24169
25213
 
24170
- config.headers = AxiosHeaders$1.from(config.headers);
25214
+ config.headers = AxiosHeaders$1.from(utils$3.getSafeProp(config, 'headers'));
24171
25215
 
24172
25216
  // Transform request data
24173
25217
  config.data = transformData.call(config, config.transformRequest);
@@ -24360,21 +25404,21 @@ let Axios$1 = class Axios {
24360
25404
  return await this._request(configOrUrl, config);
24361
25405
  } catch (err) {
24362
25406
  if (err instanceof Error) {
24363
- let dummy = {};
25407
+ try {
25408
+ let dummy = {};
24364
25409
 
24365
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
25410
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
24366
25411
 
24367
- // slice off the Error: ... line
24368
- const stack = (() => {
24369
- if (!dummy.stack) {
24370
- return '';
24371
- }
25412
+ const dummyStack = dummy.stack;
25413
+ let stack = '';
24372
25414
 
24373
- const firstNewlineIndex = dummy.stack.indexOf('\n');
25415
+ // slice off the Error: ... line
25416
+ if (typeof dummyStack === 'string') {
25417
+ const firstNewlineIndex = dummyStack.indexOf('\n');
25418
+
25419
+ stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
25420
+ }
24374
25421
 
24375
- return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
24376
- })();
24377
- try {
24378
25422
  if (!err.stack) {
24379
25423
  err.stack = stack;
24380
25424
  // match without the 2 top stack lines
@@ -24390,7 +25434,7 @@ let Axios$1 = class Axios {
24390
25434
  }
24391
25435
  }
24392
25436
  } catch (e) {
24393
- // ignore the case where "stack" is an un-writable property
25437
+ // Ignore failures from custom stack hooks or un-writable stack properties.
24394
25438
  }
24395
25439
  }
24396
25440
 
@@ -24461,13 +25505,17 @@ let Axios$1 = class Axios {
24461
25505
  );
24462
25506
 
24463
25507
  // Set config.method
24464
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
25508
+ config.method = (
25509
+ utils$3.getSafeProp(config, 'method') ||
25510
+ utils$3.getSafeProp(this.defaults, 'method') ||
25511
+ 'get'
25512
+ ).toLowerCase();
24465
25513
 
24466
25514
  // Flatten headers
24467
25515
  let contextHeaders = headers && utils$3.merge(headers.common, headers[config.method]);
24468
25516
 
24469
25517
  headers &&
24470
- utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
25518
+ utils$3.forEach(methodList.concat('common'), (method) => {
24471
25519
  delete headers[method];
24472
25520
  });
24473
25521
 
@@ -24526,17 +25574,35 @@ let Axios$1 = class Axios {
24526
25574
  const onFulfilled = requestInterceptorChain[i++];
24527
25575
  const onRejected = requestInterceptorChain[i++];
24528
25576
  try {
24529
- newConfig = onFulfilled(newConfig);
25577
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
24530
25578
  } catch (error) {
24531
- onRejected.call(this, error);
25579
+ if (!onRejected) {
25580
+ promise = Promise.reject(error);
25581
+ break;
25582
+ }
25583
+
25584
+ try {
25585
+ const rejectedResult = onRejected.call(this, error);
25586
+
25587
+ if (utils$3.isThenable(rejectedResult)) {
25588
+ promise = Promise.resolve(rejectedResult).then(() =>
25589
+ dispatchRequest.call(this, newConfig)
25590
+ );
25591
+ }
25592
+ } catch (rejectedError) {
25593
+ promise = Promise.reject(rejectedError);
25594
+ }
25595
+
24532
25596
  break;
24533
25597
  }
24534
25598
  }
24535
25599
 
24536
- try {
24537
- promise = dispatchRequest.call(this, newConfig);
24538
- } catch (error) {
24539
- return Promise.reject(error);
25600
+ if (!promise) {
25601
+ try {
25602
+ promise = dispatchRequest.call(this, newConfig);
25603
+ } catch (error) {
25604
+ promise = Promise.reject(error);
25605
+ }
24540
25606
  }
24541
25607
 
24542
25608
  i = 0;
@@ -24802,14 +25868,22 @@ const HttpStatusCode$1 = {
24802
25868
  Gone: 410,
24803
25869
  LengthRequired: 411,
24804
25870
  PreconditionFailed: 412,
25871
+ /**
25872
+ * @deprecated Use `ContentTooLarge` instead.
25873
+ */
24805
25874
  PayloadTooLarge: 413,
25875
+ ContentTooLarge: 413,
24806
25876
  UriTooLong: 414,
24807
25877
  UnsupportedMediaType: 415,
24808
25878
  RangeNotSatisfiable: 416,
24809
25879
  ExpectationFailed: 417,
24810
25880
  ImATeapot: 418,
24811
25881
  MisdirectedRequest: 421,
25882
+ /**
25883
+ * @deprecated Use `UnprocessableContent` instead.
25884
+ */
24812
25885
  UnprocessableEntity: 422,
25886
+ UnprocessableContent: 422,
24813
25887
  Locked: 423,
24814
25888
  FailedDependency: 424,
24815
25889
  TooEarly: 425,
@@ -24829,6 +25903,7 @@ const HttpStatusCode$1 = {
24829
25903
  LoopDetected: 508,
24830
25904
  NotExtended: 510,
24831
25905
  NetworkAuthenticationRequired: 511,
25906
+ WebServerReturnsAnUnknownError: 520,
24832
25907
  WebServerIsDown: 521,
24833
25908
  ConnectionTimedOut: 522,
24834
25909
  OriginIsUnreachable: 523,
@@ -24838,7 +25913,9 @@ const HttpStatusCode$1 = {
24838
25913
  };
24839
25914
 
24840
25915
  Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
24841
- HttpStatusCode$1[value] = key;
25916
+ if (HttpStatusCode$1[value] === undefined) {
25917
+ HttpStatusCode$1[value] = key;
25918
+ }
24842
25919
  });
24843
25920
 
24844
25921
  /**
@@ -48148,7 +49225,13 @@ const VertexStateStateFilterSchema = v4.z.looseObject({
48148
49225
  op: v4.z.literal('STATE').describe('Match by state status value'),
48149
49226
  input: VertexStateFilterLazy.optional().describe('Nested filter to apply before this predicate'),
48150
49227
  not: v4.z.boolean().optional().describe('Negate the predicate when true'),
48151
- state: v4.z.array(v4.z.number()).optional().describe('State status codes to match'),
49228
+ stateId: v4.z
49229
+ .array(v4.z.number())
49230
+ .optional()
49231
+ .describe('State status codes to match (0 UNKNOWN, 1 OK, 2 MINOR, 3 MAJOR, 4 CRITICAL). The wire key is `stateId`; a `state` key is silently ignored by the server and matches nothing'),
49232
+ }).refine((v) => !('state' in v), {
49233
+ message: 'STATE filter key is "stateId"; "state" is silently ignored by the server and matches nothing',
49234
+ path: ['state'],
48152
49235
  });
48153
49236
  /** Restricts to states on the given vertices. */
48154
49237
  const VertexStateVertexIdFilterSchema = v4.z.looseObject({
@@ -48433,7 +49516,9 @@ const TasFollowPathFlowFilterSchema = v4.z.enum([
48433
49516
  * - `LEFT` (default if omitted) — all of input + matching right rows
48434
49517
  * - `RIGHT` — all of rightInput + matching left rows
48435
49518
  * - `INNER` — only topology with cross-layer joins
48436
- * - `NOT` — anti-join (Java-side support; not in public AsciiDoc)
49519
+ * - `NOT` — documented as "input without a cross-layer join to rightInput"; measured
49520
+ * (2026-10-15) as "input vertices with no edges at all", whatever rightInput is. The
49521
+ * documented anti-join is `AND[input, NOT(JOIN INNER input × right)]` (findings ledger).
48437
49522
  */
48438
49523
  const TasJoinTypeSchema = v4.z.enum(['LEFT', 'INNER', 'RIGHT', 'NOT']);
48439
49524
  /**
@@ -49134,7 +50219,8 @@ const TasOrderSchema = v4.z.looseObject({
49134
50219
  * - `filter` — primary filter (the workhorse)
49135
50220
  * - `universe` — restricts the working set *before* `filter` is applied
49136
50221
  * - `postFilter` — applied *after* `filter` (e.g. for ADD_TRANSITIONING_EDGES)
49137
- * - `stateFilter` — equivalent to wrapping the result in a STATUS filter
50222
+ * - `stateFilter` — narrows `states[]` only (with `includeStatus`); does
50223
+ * NOT prune the graph — use the STATUS filter for that
49138
50224
  *
49139
50225
  * The `variables[]` array declares named sub-filters reusable via
49140
50226
  * `{ "op": "VARIABLE", "name": ... }` references inside any filter.
@@ -49171,7 +50257,7 @@ const TasQuerySchema = v4.z.looseObject({
49171
50257
  .optional()
49172
50258
  .describe('Named authorization view to scope results by RBAC'),
49173
50259
  postFilter: TasFilterSchema.optional().describe('Filter applied after `filter` and `universe` (typical home for ADD_TRANSITIONING_EDGES)'),
49174
- stateFilter: VertexStateFilterSchema.optional().describe('Vertex-state predicate applied alongside `filter` (equivalent to wrapping in a STATUS filter)'),
50260
+ stateFilter: VertexStateFilterSchema.optional().describe('Vertex-state predicate that narrows the `states[]` response array only (requires `includeStatus`); vertices are still returned regardless of status. To prune the graph by status use the STATUS filter'),
49175
50261
  includeStatus: v4.z
49176
50262
  .boolean()
49177
50263
  .optional()
@@ -49283,8 +50369,9 @@ const TasAttributeAlertStatisticsSchema = v4.z.looseObject({
49283
50369
  .describe('Number of vertices that carry this value (Java spelling: "occurances")'),
49284
50370
  vertexIds: v4.z
49285
50371
  .array(v4.z.number())
50372
+ .nullable()
49286
50373
  .optional()
49287
- .describe('Vertex IDs carrying this value; only populated when the source filter set includeIds=true'),
50374
+ .describe('Vertex IDs carrying this value; only populated when the source filter set includeIds=true, otherwise null or absent'),
49288
50375
  alerts: v4.z.number().optional(),
49289
50376
  cautionAlerts: v4.z.number().optional(),
49290
50377
  dangerAlerts: v4.z.number().optional(),
@@ -49302,7 +50389,9 @@ const TasCollectAttributeResultSchema = TasAnalyticBaseSchema.extend({
49302
50389
  const TasAttributeNameSchema = v4.z.looseObject({
49303
50390
  name: v4.z.string().optional().describe('Attribute name (key) present on a vertex'),
49304
50391
  layer: v4.z.string().optional().describe('Layer the attribute belongs to'),
49305
- type: TasAttributeTypeSchema.optional().describe('Attribute type classification'),
50392
+ type: TasAttributeTypeSchema.nullable()
50393
+ .optional()
50394
+ .describe('Attribute type classification; null in the entry COLLECT_CARD_INFO adds beside its own'),
49306
50395
  });
49307
50396
  /**
49308
50397
  * Result of a COLLECT_ATTRIBUTE_NAMES filter.
@@ -49352,7 +50441,8 @@ const TasCollectGroupingInfoResultSchema = TasAnalyticBaseSchema.extend({
49352
50441
  values: v4.z.array(TasGroupingInfoSchema).optional(),
49353
50442
  });
49354
50443
  /**
49355
- * Result of a COLLECT_CARD_INFO filter — carries `{ name, vertexIds, values }`.
50444
+ * Result of a COLLECT_CARD_INFO filter — carries `{ name, vertexIds, values }`. Measured (2026-10-15): the
50445
+ * response also carries a COLLECT_ATTRIBUTE_NAMES entry for the same vertices, whose `type`s are null.
49356
50446
  * `values` is populated when the source filter sets `includeVertexInfo=true`;
49357
50447
  * the element shape is kept loose here because the underlying type is not
49358
50448
  * yet mirrored as a Zod schema.
@@ -49371,9 +50461,9 @@ const TasCollectCardInfoResultSchema = TasAnalyticBaseSchema.extend({
49371
50461
  * to narrow at runtime; future / unknown result types validate against the
49372
50462
  * bare base so the response still parses.
49373
50463
  *
49374
- * Note: COLLECT_VERTEX_ID does not register a typed result on the Java
49375
- * side — its output is consumed internally — so no specific schema appears
49376
- * in this union.
50464
+ * Note: COLLECT_VERTEX_ID has no result type of its own: measured (2026-10-15)
50465
+ * it answers with a `t: "COLLECT_ATTRIBUTES"` entry whose `attribValue`s are
50466
+ * the vertex ids as strings (`vertexIds` null), so it parses as that variant.
49377
50467
  */
49378
50468
  const TasAnalyticResultSchema = v4.z.union([
49379
50469
  TasCollectAttributeResultSchema,
@@ -50754,7 +51844,7 @@ const QueryWindowSpecSchema = v4.z.looseObject({
50754
51844
  op: v4.z.literal('WINDOW'),
50755
51845
  every: v4.z
50756
51846
  .number()
50757
- .describe('Window size in ms (or upstream-frequency multiples if `useFrequency=true`)'),
51847
+ .describe('Window size in ms (or upstream-frequency multiples if `useFrequency=true`). Must be a number: the tenant rejects `"auto"` and duration strings such as `"5m"`'),
50758
51848
  align: AlignmentSchema.optional().describe('Window alignment; defaults to ABSOLUTE'),
50759
51849
  incomplete: v4.z
50760
51850
  .boolean()
@@ -50957,6 +52047,22 @@ const QueryDerivativeSpecSchema = v4.z.looseObject({
50957
52047
  as: v4.z.string().optional().describe('Output column name'),
50958
52048
  timeSrc: v4.z.string().optional().describe('Override the time-ordering column'),
50959
52049
  });
52050
+ /**
52051
+ * `TREND` — slope and direction of `column` over `timestampColumn`, per
52052
+ * group (needs at least two points). Emits `<as>.slope` and
52053
+ * `<as>.direction` (+1 up, -1 down; a flat series was observed returning
52054
+ * direction 1 with slope 0). `as` defaults to the `column` name.
52055
+ */
52056
+ const QueryTrendSpecSchema = v4.z.looseObject({
52057
+ op: v4.z.literal('TREND'),
52058
+ column: v4.z.string().describe('Numeric column to compute the trend of, e.g. `data.value`'),
52059
+ timestampColumn: v4.z.string().describe('Timestamp column used for the slope, e.g. `data.time`'),
52060
+ round: v4.z.number().optional().describe('Decimal digits kept in the slope; default 4'),
52061
+ as: v4.z
52062
+ .string()
52063
+ .optional()
52064
+ .describe('Output column prefix (`<as>.slope`, `<as>.direction`); defaults to the column name'),
52065
+ });
50960
52066
  /** `DIFFERENCE` — like DERIVATIVE but raw value-to-value diff (no per-unit normalization). */
50961
52067
  const QueryDifferenceSpecSchema = v4.z.looseObject({
50962
52068
  op: v4.z.literal('DIFFERENCE'),
@@ -51214,7 +52320,9 @@ const QueryFromMetadataSpecSchema = v4.z.looseObject({
51214
52320
  */
51215
52321
  const QueryFromTopologySpecSchema = v4.z.looseObject({
51216
52322
  op: v4.z.literal('FROM_TOPOLOGY'),
51217
- querySpecifier: TasQuerySchema.describe('TAS query — only the `filter` field is honored; other TAS fields are ignored by the server'),
52323
+ querySpecifier: TasQuerySchema.refine((q) => !('op' in q), {
52324
+ message: 'querySpecifier is a TAS query: wrap the filter as { "filter": { "op": … } } (a bare filter is ignored by the server)',
52325
+ }).describe('TAS query `{ filter }` — only the `filter` field is honored; other TAS fields are ignored by the server. A bare filter (`{ op, … }`) is ignored too and the op returns arbitrary vertices'),
51218
52326
  alias: v4.z.string().optional().describe('Column namespace for output rows'),
51219
52327
  rowsClampSize: v4.z.number().optional().describe('Cap on emitted rows; 0 = unlimited (default)'),
51220
52328
  });
@@ -51241,13 +52349,15 @@ const QueryFromDataSpecSchema = v4.z.looseObject({
51241
52349
  * The `wql` string is parsed server-side (ANTLR `DXQueryCompiler`); we treat
51242
52350
  * it as opaque here — no client-side grammar validation. Grammar:
51243
52351
  *
51244
- * `ts(<metric-name>[, <predicates>])`
52352
+ * `ts(<selector>[ and|, <predicates>])`
51245
52353
  *
51246
- * `<metric-name>` may be quoted or unquoted. `<predicates>` combine
51247
- * `attr=value` terms with `and` / `or` / `not`, grouping `( … )`, single- or
51248
- * double-quoted values, and `*` wildcards. Example:
52354
+ * `<predicates>` combine `attr=value` terms with `and` / `or` / `not`,
52355
+ * grouping `( … )`, single-, double- or un-quoted values, and `*` wildcards.
52356
+ * A quoted first term is the full metric path when `useAttributes` is false
52357
+ * (the default measured on tenants) and the metric name when it is true; the
52358
+ * `metric_name=` predicate works either way (findings ledger, 2026-10-15). Example:
51249
52359
  *
51250
- * `ts("CPU Time (ms)" and source="web-server-01" and not env="staging")`
52360
+ * `ts(metric_name="CPU Time (ms)" and source="web-server-01" and not env="staging")`
51251
52361
  *
51252
52362
  * **Tenant gating**: requires the `DXDASHBOARDS_WQL_FEATURE` toggle; tenants
51253
52363
  * without it return an error at run time.
@@ -51257,16 +52367,16 @@ const QueryWqlSpecSchema = v4.z.looseObject({
51257
52367
  wql: v4.z
51258
52368
  .string()
51259
52369
  .min(1)
51260
- .describe('WQL expression selecting time-series. Grammar: `ts(<metric-name>[, <predicates>])` — name quoted or unquoted; predicates combine `attr=value` with `and`/`or`/`not`, grouping `( )`, quoted values, and `*` wildcards. E.g. `ts("CPU Time (ms)" and source="web-server-01")`. Server-parsed (ANTLR); required and non-empty.'),
52370
+ .describe('WQL expression selecting time-series. Select with the `metric_name` predicate, which works whatever `useAttributes` says: `ts(metric_name="CPU Time (ms)" and source="web-server-01")`. A quoted first term `ts("…")` is the full metric path when `useAttributes` is false and the metric name when true. Predicates combine `attr=value` with `and`/`or`/`not`, grouping `( )`, quoted values, and `*` wildcards. Server-parsed (ANTLR; a syntax error is an HTTP 400, code 608); required and non-empty.'),
51261
52371
  clamp: v4.z
51262
52372
  .union([v4.z.number(), v4.z.string()])
51263
52373
  .optional()
51264
- .describe('Cap on results; `0` = unlimited (default). Semantically an int, but the platform emits it on the wire as a numeric string (e.g. `"10000"`) — both forms accepted.'),
52374
+ .describe('Limit on matched series; `0` (default) = the tenant limit (`datastore.wql.clamp`, 10000 by default). Other values were measured to drop or duplicate series near the match count, so leave it at 0 and cap downstream (`TOP`, `limit`). Semantically an int, but the platform emits it on the wire as a numeric string (e.g. `"10000"`) — both forms accepted; negative values are an HTTP 500.'),
51265
52375
  useAttributes: v4.z
51266
52376
  .boolean()
51267
52377
  .optional()
51268
- .describe('When true, use metadata attributes in the WQL metadata query; omit to fall back to the tenant config default (`isMetadataQueryUsingAttributes`).'),
51269
- queryRange: QueryRangeSpecSchema.optional().describe('Time-window spec; defaults to the last 8 minutes ending now'),
52378
+ .describe('What a quoted first term `ts("…")` matches: the metric name when true, the full metric path (case-insensitive, `*` wildcards) when false; the other reading matches nothing. The `metric_name=` predicate works either way. Omit to fall back to the tenant config default (`isMetadataQueryUsingAttributes`; false on the tenants measured).'),
52379
+ queryRange: QueryRangeSpecSchema.optional().describe('Time-window spec; omitted = the last ~8 minutes at raw resolution. `endTime` 0 or omitted = now; `frequency` omitted = raw points. With `frequency`, buckets are epoch-aligned and stamped with their end, and a bucket stamped b was returned when endTime - rangeSize <= b < endTime in 12 of 14 measured ranges (the one ending exactly at endTime is usually left out; end the range after the last bucket you need).'),
51270
52380
  });
51271
52381
  /**
51272
52382
  * `JOIN_METADATA` — for each upstream row, look up zero or one
@@ -51282,7 +52392,7 @@ const QueryWqlSpecSchema = v4.z.looseObject({
51282
52392
  */
51283
52393
  const QueryJoinMetadataSpecSchema = v4.z.looseObject({
51284
52394
  op: v4.z.literal('JOIN_METADATA'),
51285
- querySpecifier: QuerySpecifierSchema.optional().describe('Optional Metadata specifier to pre-filter which metrics can be joined'),
52395
+ querySpecifier: QuerySpecifierSchema.describe('Metadata specifier selecting which metrics can be joined. Required: the server rejects the op without it ("JOIN_METADATA querySpecifier is null"); use `{op:"ALL"}` for no narrowing'),
51286
52396
  queryRange: QueryRangeSpecSchema.optional().describe('Time-window for the metadata lookup'),
51287
52397
  queryHints: v4.z
51288
52398
  .array(QueryHintSchema)
@@ -51294,6 +52404,10 @@ const QueryJoinMetadataSpecSchema = v4.z.looseObject({
51294
52404
  .string()
51295
52405
  .optional()
51296
52406
  .describe('Upstream column carrying the external ID to match against metric sources; default `metric.externalId`'),
52407
+ topologyIdColumn: v4.z
52408
+ .string()
52409
+ .optional()
52410
+ .describe('Upstream column carrying the topology (vertex) ID to join on instead of the external ID, e.g. `vertex.id`. The server validates the column name; on one corpus topology join `vertex.id` returned no rows (cause not established)'),
51297
52411
  joinType: JoinTypeSchema.optional().describe('INNER (default) drops unmatched rows; LEFT keeps them with nulls'),
51298
52412
  });
51299
52413
  /**
@@ -51372,22 +52486,27 @@ const QueryLogSpecSchema = v4.z.looseObject({
51372
52486
  excludeFinalResult: v4.z.boolean().optional().describe('Exclude LOG output from query response; default false'),
51373
52487
  });
51374
52488
  /**
51375
- * `SCRIPT` — execute a Groovy or NASSQL script against each row.
51376
- * The script receives the current row's columns as bound variables and
51377
- * must return a map of `outputColumns` values.
52489
+ * `SCRIPT` — execute a JavaScript function against each row.
52490
+ * The script is a function expression `(function transform(input) { ... })`
52491
+ * that receives the row's `inputColumns` values as a positional array and
52492
+ * returns an array of `outputColumns` values in order, e.g.
52493
+ * `(function transform(input) { return [input[1] == 0 ? null : input[0] / input[1]]; })`.
52494
+ * A bare `return` statement is a syntax error. A global `context` persists
52495
+ * across rows; each row must finish within 10 s.
51378
52496
  *
51379
- * `inputColumns` declares which upstream columns are available inside
51380
- * the script. `outputColumns` declares the names of the columns the
51381
- * script emits.
52497
+ * `inputColumns` declares which upstream columns are passed in (in order).
52498
+ * `outputColumns` declares the names of the columns the script emits.
51382
52499
  *
51383
52500
  * **Use sparingly**: scripts disable query-plan optimizations and run
51384
52501
  * server-side per row — they are significantly slower than native ops.
51385
52502
  */
51386
52503
  const QueryScriptSpecSchema = v4.z.looseObject({
51387
52504
  op: v4.z.literal('SCRIPT'),
51388
- script: v4.z.string().describe('Groovy/NASSQL script body'),
51389
- inputColumns: v4.z.array(v4.z.string()).optional().describe('Upstream columns accessible inside the script'),
51390
- outputColumns: v4.z.array(v4.z.string()).optional().describe('Column names emitted by the script'),
52505
+ script: v4.z
52506
+ .string()
52507
+ .describe('JavaScript function expression `(function transform(input) { return [...]; })`'),
52508
+ inputColumns: v4.z.array(v4.z.string()).optional().describe('Upstream columns passed to the function as a positional array'),
52509
+ outputColumns: v4.z.array(v4.z.string()).optional().describe('Column names for the array the function returns'),
51391
52510
  });
51392
52511
  const QueryFunctionSpecSchema = v4.z.discriminatedUnion('op', [
51393
52512
  QueryFromSpecSchema,
@@ -51406,6 +52525,7 @@ const QueryFunctionSpecSchema = v4.z.discriminatedUnion('op', [
51406
52525
  QueryMultiAggregationSpecSchema,
51407
52526
  QueryDerivativeSpecSchema,
51408
52527
  QueryDifferenceSpecSchema,
52528
+ QueryTrendSpecSchema,
51409
52529
  QueryFirstSpecSchema,
51410
52530
  QueryLastSpecSchema,
51411
52531
  QueryQuantileSpecSchema,
@@ -51456,6 +52576,20 @@ const QueryRequestSchema = v4.z.looseObject({
51456
52576
  });
51457
52577
 
51458
52578
  const QueryResultSchema = v4.z.array(v4.z.unknown());
52579
+ /**
52580
+ * One NASSQL result cell: SCRIPT may return arrays; MAP on a zero denominator returns null. Objects are allowed
52581
+ * too: the recordings showed none, but nothing rules them out.
52582
+ */
52583
+ const QueryResultCellSchema = v4.z
52584
+ .union([v4.z.string(), v4.z.number(), v4.z.boolean(), v4.z.null(), v4.z.array(v4.z.unknown()), v4.z.record(v4.z.string(), v4.z.unknown())])
52585
+ .describe('A result cell: string, number, boolean, null (e.g. MAP over 0/0), an array (SCRIPT output) or an object');
52586
+ /**
52587
+ * The NASSQL result as a table: the first row is the column names, every following row is one result row.
52588
+ * Stricter than `QueryResultSchema`, which stays loose for callers that only pass the result through.
52589
+ */
52590
+ const QueryResultTableSchema = v4.z
52591
+ .tuple([v4.z.array(v4.z.string()).describe('Column names')], v4.z.array(QueryResultCellSchema).describe('A result row'))
52592
+ .describe('NASSQL result table: header row of column names, then rows of cells');
51459
52593
 
51460
52594
  /**
51461
52595
  * Self-describing envelope stored as the blob body by `dx-do blob store`.
@@ -62015,6 +63149,389 @@ const MaintenanceSearchResponseSchema = v4.z.looseObject({
62015
63149
  pageSize: v4.z.number().optional(),
62016
63150
  });
62017
63151
 
63152
+ /**
63153
+ * One filter atom of an OI metricconfig group — the match criteria shared by
63154
+ * SLI groups (`type: "sli"`) and metric anomaly-detection groups (no type),
63155
+ * e.g. "Source contains bd605" or "Metric regex java.lang\|Threading:.*".
63156
+ * Groups persist a FLAT list of these; the server groups them by `field`.
63157
+ */
63158
+ const MetricConfigFilterSchema = v4.z.looseObject({
63159
+ fieldDescription: v4.z
63160
+ .string()
63161
+ .describe('Human label for the field, e.g. "Source" or "Metric"'),
63162
+ field: v4.z
63163
+ .string()
63164
+ .describe('Wire field the filter matches on, e.g. "sourceName" (source path), "attributeName" ' +
63165
+ '(the FULL metric path such as "java.lang|Threading:ThreadCount", not the bare name), ' +
63166
+ '"Service", or a metric metadata attribute'),
63167
+ value: v4.z
63168
+ .string()
63169
+ .describe('Value to match; for "regex" a literal pipe must be escaped as "\\|"'),
63170
+ condition: v4.z
63171
+ .string()
63172
+ .describe('Match operator: "equals", "contains", "not_contains", "ends_with" or "regex"'),
63173
+ });
63174
+ /** One `or` block of the preview expression tree: atoms on ONE field, OR-ed. */
63175
+ const MetricConfigFilterOrBlockSchema = v4.z.looseObject({
63176
+ or: v4.z.looseObject({
63177
+ expressions: v4.z
63178
+ .array(MetricConfigFilterSchema)
63179
+ .describe('Atoms on the SAME field, OR-ed together'),
63180
+ }),
63181
+ });
63182
+ /**
63183
+ * The `customFilter` expression tree of `POST oi/v2/metricconfig/groups/metrics`.
63184
+ *
63185
+ * The server accepts exactly ONE shape: a root `and` whose children are `or`
63186
+ * blocks, each holding atoms on a single field (probed on a lab tenant,
63187
+ * 2026-10-01). Every other shape still answers HTTP 200 but is logically
63188
+ * wrong — any nesting (a top-level `or`, an `and` inside an `or`, bare atoms
63189
+ * under `and`) silently matches 0 metrics, and a mixed-field `or` block keeps
63190
+ * only its first atom's field. So `(A∧B)∨(C∧D)` cannot be expressed in one
63191
+ * group; use two. Build the tree with {@link orBlocksByField}, never by hand.
63192
+ */
63193
+ const MetricConfigCustomFilterSchema = v4.z
63194
+ .looseObject({
63195
+ and: v4.z.looseObject({
63196
+ expressions: v4.z
63197
+ .array(MetricConfigFilterOrBlockSchema)
63198
+ .describe('One or-block per distinct field, AND-ed across fields'),
63199
+ }),
63200
+ })
63201
+ .describe('The group filters as the wire expression tree');
63202
+ /**
63203
+ * Groups flat filter atoms into the only tree shape the server evaluates
63204
+ * correctly: one or-block per `field` (first-appearance order). Same-field
63205
+ * atoms OR (a metric can `equals` any of four values); different fields must
63206
+ * all match.
63207
+ */
63208
+ function orBlocksByField(filters) {
63209
+ const byField = new Map();
63210
+ for (const atom of filters) {
63211
+ const bucket = byField.get(atom.field);
63212
+ if (bucket) {
63213
+ bucket.push(atom);
63214
+ }
63215
+ else {
63216
+ byField.set(atom.field, [atom]);
63217
+ }
63218
+ }
63219
+ return [...byField.values()].map((expressions) => ({ or: { expressions } }));
63220
+ }
63221
+
63222
+ /**
63223
+ * The metric product an anomaly-detection group is scoped to. Matching,
63224
+ * the filter-field catalog and the default groups are all per product.
63225
+ * Short CLI-friendly aliases map to the wire names the server stores.
63226
+ */
63227
+ const ANOMALY_DETECTION_PRODUCTS = {
63228
+ apm: 'Application Performance Management',
63229
+ capm: 'CAPM',
63230
+ uim: 'UIM',
63231
+ custom: 'CUSTOM',
63232
+ };
63233
+ /**
63234
+ * Resolves a product alias (`apm`) or wire name (`Application Performance
63235
+ * Management`), case-insensitively, to the wire name; undefined when unknown.
63236
+ */
63237
+ function resolveAnomalyDetectionProduct(input) {
63238
+ const needle = input.trim().toLowerCase();
63239
+ for (const [alias, wire] of Object.entries(ANOMALY_DETECTION_PRODUCTS)) {
63240
+ if (needle === alias || needle === wire.toLowerCase()) {
63241
+ return wire;
63242
+ }
63243
+ }
63244
+ return undefined;
63245
+ }
63246
+ /**
63247
+ * The alerting half of an anomaly-detection group. `enabled` is the on/off
63248
+ * switch for anomaly detection on the group's metrics; with
63249
+ * `useSystemSettings: true` the remaining knobs come from the tenant default
63250
+ * (`GET oi/v2/metricconfig/defaultalert`) and are stored as nulls.
63251
+ */
63252
+ const AnomalyAlertConfigSchema = v4.z.looseObject({
63253
+ enabled: v4.z
63254
+ .boolean()
63255
+ .describe('Whether anomaly detection runs on the group metrics (counts toward the tenant metric cap)'),
63256
+ useSystemSettings: v4.z
63257
+ .boolean()
63258
+ .optional()
63259
+ .describe('True = use the tenant default alert settings; the fields below are then null'),
63260
+ timeOverThreshold: v4.z.number().nullable().optional().describe('Breach duration before alerting'),
63261
+ unit: v4.z.string().nullable().optional().describe('Unit of the time fields'),
63262
+ observationTime: v4.z.number().nullable().optional().describe('Observation window length'),
63263
+ countOverThreshold: v4.z
63264
+ .number()
63265
+ .nullable()
63266
+ .optional()
63267
+ .describe('Breaches needed within `observationCount` observations to alert'),
63268
+ observationCount: v4.z.number().nullable().optional().describe('Observations per evaluation window'),
63269
+ deviationPercentage: v4.z
63270
+ .number()
63271
+ .nullable()
63272
+ .optional()
63273
+ .describe('Deviation from the baseline, in percent, that counts as anomalous'),
63274
+ deviationValue: v4.z.number().nullable().optional().describe('Absolute deviation threshold'),
63275
+ deviationValueOp: v4.z.string().nullable().optional().describe('Operator for `deviationValue`'),
63276
+ threshold: v4.z
63277
+ .array(v4.z.string())
63278
+ .nullable()
63279
+ .optional()
63280
+ .describe('Anomaly bands that alert, e.g. ["rare_upper"]'),
63281
+ alarmSeverity: v4.z.string().nullable().optional().describe('Raised alarm severity, e.g. "major"'),
63282
+ alarmMessage: v4.z
63283
+ .string()
63284
+ .nullable()
63285
+ .optional()
63286
+ .describe('Alarm message template with ${metric_name}/${host}/… placeholders'),
63287
+ policyId: v4.z.unknown().nullable().optional().describe('Notification policy id; usually null'),
63288
+ acType: v4.z.string().nullable().optional().describe('Alert config type; "Anomaly"'),
63289
+ });
63290
+ /**
63291
+ * A metric anomaly-detection group (DXO2 Settings → Anomaly Detection
63292
+ * Groups): a product-scoped filter selecting metrics plus the anomaly alert
63293
+ * config. Same OI metricconfig `groups` family as SLI groups, but with no
63294
+ * `type` — as returned by `groups/search` (`metricGroups[]`) and
63295
+ * `groups?groupId=<id>`.
63296
+ */
63297
+ const AnomalyDetectionGroupSchema = v4.z.looseObject({
63298
+ groupName: v4.z.string().describe('Group name; NOT unique (default groups appear twice)'),
63299
+ groupId: v4.z.number().describe('Server-assigned group id — the unambiguous key'),
63300
+ filters: v4.z
63301
+ .array(MetricConfigFilterSchema)
63302
+ .describe('Flat filter atoms; same-field atoms OR, different fields AND'),
63303
+ description: v4.z.string().nullable().optional().describe('Free-text description; may be null'),
63304
+ product: v4.z
63305
+ .string()
63306
+ .describe('Wire product name scoping the match, e.g. "Application Performance Management"'),
63307
+ anomalyAlertConfig: AnomalyAlertConfigSchema.describe('On/off switch and alert settings'),
63308
+ defaultGroup: v4.z
63309
+ .boolean()
63310
+ .optional()
63311
+ .describe('True for the system default groups shipped with the tenant'),
63312
+ serviceNames: v4.z.array(v4.z.string()).nullable().optional().describe('Unused here; null observed'),
63313
+ // Read-only server-managed fields (present on reads, not sent on save).
63314
+ creationTime: v4.z.number().optional().describe('Epoch SECONDS the group was created'),
63315
+ lastModifiedTime: v4.z.number().optional().describe('Epoch SECONDS the group was last modified'),
63316
+ createdBy: v4.z.string().nullable().optional().describe('User that created the group'),
63317
+ lastUpdatedBy: v4.z.string().nullable().optional().describe('User that last updated the group'),
63318
+ totalMetrics: v4.z.number().optional().describe('Count of metrics the group currently matches'),
63319
+ breached: v4.z.boolean().optional().describe('Breach flag; observed false'),
63320
+ });
63321
+
63322
+ /**
63323
+ * Model for `POST oi/v2/metricconfig/groups/metrics` — the metric-match
63324
+ * preview the DXO2 UI calls while a group's filters are edited. Given filter
63325
+ * atoms and service bindings it returns the currently-matching metrics, which
63326
+ * is exactly the feedback a create/add dry-run needs ("your filters match N
63327
+ * metrics") and the fastest way to diagnose `sliStatusCode` 5 ("no metrics
63328
+ * matching").
63329
+ */
63330
+ const SliGroupMetricsRequestSchema = v4.z.looseObject({
63331
+ numericFilter: v4.z.boolean().describe('Always true — SLI groups only watch numeric metrics'),
63332
+ serviceNames: v4.z.array(v4.z.string()).describe('Service bindings scoping the match'),
63333
+ customFilter: MetricConfigCustomFilterSchema,
63334
+ pageSize: v4.z.number().describe('Max metrics returned; the UI uses 100'),
63335
+ });
63336
+ const SliGroupMetricsEntrySchema = v4.z.looseObject({
63337
+ metricName: v4.z.string().describe('Bare metric name, e.g. "Web Agent Status"'),
63338
+ source: v4.z.string().describe('Source path of the metric'),
63339
+ metric: v4.z.string().describe('Full metric path including the source-qualified name'),
63340
+ nassMetricId: v4.z.string().optional().describe('NASS metric id'),
63341
+ lastSeen: v4.z.number().optional().describe('Epoch millis the metric last reported'),
63342
+ serviceNames: v4.z.array(v4.z.string()).optional().describe('Services the metric maps to'),
63343
+ });
63344
+ const SliGroupMetricsResponseSchema = v4.z.looseObject({
63345
+ totalMetrics: v4.z
63346
+ .union([v4.z.string(), v4.z.number()])
63347
+ .describe('Count of matching metrics — a STRING on the wire (e.g. "2")'),
63348
+ pageSize: v4.z.union([v4.z.string(), v4.z.number()]).optional().describe('Returned page size'),
63349
+ metrics: v4.z.array(SliGroupMetricsEntrySchema).describe('The matching metrics'),
63350
+ exceedLimit: v4.z
63351
+ .boolean()
63352
+ .optional()
63353
+ .describe('True when the match exceeds the per-group metric cap'),
63354
+ });
63355
+ /**
63356
+ * One filterable field for a set of services, from
63357
+ * `POST oi/v2/metricconfig/metric/fields`. The catalog is DYNAMIC — derived
63358
+ * from the metadata attributes the services' metrics actually carry, so it
63359
+ * grows as new attributes report. `path` fields address the metric/source
63360
+ * paths; `metadata` fields address metric attributes.
63361
+ */
63362
+ const SliMetricFieldSchema = v4.z.looseObject({
63363
+ fieldDescription: v4.z.string().describe('Human label; equals `field` for metadata fields'),
63364
+ field: v4.z.string().describe('Wire field name usable in filter atoms'),
63365
+ type: v4.z.string().describe('"path" (metric/source path) or "metadata" (metric attribute)'),
63366
+ values: v4.z.array(v4.z.unknown()).optional().describe('Value suggestions; observed empty'),
63367
+ conditions: v4.z.array(v4.z.unknown()).optional().describe('Condition suggestions; observed empty'),
63368
+ });
63369
+ const SliMetricFieldsRequestSchema = v4.z.looseObject({
63370
+ serviceNames: v4.z.array(v4.z.string()).describe('Services whose metric attributes to enumerate'),
63371
+ });
63372
+ const SliMetricFieldsResponseSchema = v4.z
63373
+ .array(SliMetricFieldSchema)
63374
+ .describe('The filterable fields for the requested services');
63375
+ /**
63376
+ * Builds the preview request from flat filter atoms the way the UI does:
63377
+ * atoms are grouped by `field` (one or-block per field, in first-appearance
63378
+ * order), and the blocks are AND-ed. Same-field atoms therefore OR (a metric
63379
+ * name can `equals` any of four values) while different fields must all
63380
+ * match.
63381
+ *
63382
+ * A per-SLI refinement is a SECOND filter layer narrowing the group's
63383
+ * matches: its atoms are appended as their own AND-ed or-blocks, kept
63384
+ * separate from the group set even when fields overlap (a refinement never
63385
+ * ORs into the group filter — matches the UI's SLI-editing preview calls).
63386
+ */
63387
+ function toGroupMetricsRequest(filters, serviceNames, pageSize = 100, refinementFilters = []) {
63388
+ return {
63389
+ numericFilter: true,
63390
+ serviceNames,
63391
+ customFilter: {
63392
+ and: {
63393
+ expressions: [...orBlocksByField(filters), ...orBlocksByField(refinementFilters)],
63394
+ },
63395
+ },
63396
+ pageSize,
63397
+ };
63398
+ }
63399
+
63400
+ /**
63401
+ * Model for `POST oi/v2/metricconfig/groups/metrics` scoped by product — the
63402
+ * live "matching metrics" preview the anomaly-detection group editor shows.
63403
+ * Same endpoint as the SLI preview but keyed by `product` instead of
63404
+ * `serviceNames`, with no `numericFilter`.
63405
+ */
63406
+ const AnomalyGroupMetricsRequestSchema = v4.z.looseObject({
63407
+ pageSize: v4.z.number().describe('Max metrics returned; the UI uses 100'),
63408
+ product: v4.z.string().min(1).describe('Wire product name scoping the match'),
63409
+ customFilter: MetricConfigCustomFilterSchema,
63410
+ });
63411
+ const AnomalyGroupMetricsEntrySchema = v4.z.looseObject({
63412
+ metricName: v4.z.string().describe('Bare metric name, e.g. "ThreadCount"'),
63413
+ source: v4.z.string().describe('Source path, e.g. "SuperDomain|host|process|agent"'),
63414
+ metric: v4.z.string().describe('Full metric path, e.g. "java.lang|Threading:ThreadCount"'),
63415
+ nassMetricId: v4.z.string().optional().describe('NASS metric id'),
63416
+ lastSeen: v4.z.number().optional().describe('Epoch millis the metric last reported'),
63417
+ });
63418
+ const AnomalyGroupMetricsResponseSchema = v4.z.looseObject({
63419
+ totalMetrics: v4.z
63420
+ .union([v4.z.string(), v4.z.number()])
63421
+ .describe('Matching-metric count — a STRING on the wire; "-1" means the server did not count'),
63422
+ pageSize: v4.z.union([v4.z.string(), v4.z.number()]).optional().describe('Returned page size'),
63423
+ metrics: v4.z.array(AnomalyGroupMetricsEntrySchema).describe('The matching metrics (first page)'),
63424
+ exceedLimit: v4.z.boolean().optional().describe('True when the match exceeds the server cap'),
63425
+ });
63426
+ /** Request for `POST oi/v2/metricconfig/metric/fields` — the per-product field catalog. */
63427
+ const AnomalyMetricFieldsRequestSchema = v4.z.looseObject({
63428
+ product: v4.z.string().min(1).describe('Wire product name whose filterable fields to list'),
63429
+ });
63430
+ /**
63431
+ * Builds the preview request the way the UI does: flat atoms grouped into one
63432
+ * or-block per field — the only `customFilter` shape the server evaluates
63433
+ * correctly (see `MetricConfigCustomFilterSchema`).
63434
+ */
63435
+ function toAnomalyGroupMetricsRequest(filters, product, pageSize = 100) {
63436
+ return {
63437
+ pageSize,
63438
+ product,
63439
+ customFilter: { and: { expressions: orBlocksByField(filters) } },
63440
+ };
63441
+ }
63442
+ /**
63443
+ * Response of `metric/fields` for a product: `path` fields (`sourceName`,
63444
+ * `attributeName`), `Service` (condition `equals`), and every metadata
63445
+ * attribute the product's metrics carry. A filter on a field NOT in this
63446
+ * catalog silently matches nothing.
63447
+ */
63448
+ const AnomalyMetricFieldsResponseSchema = v4.z
63449
+ .array(SliMetricFieldSchema)
63450
+ .describe('The filterable fields for the requested product');
63451
+
63452
+ /**
63453
+ * Request body for `POST oi/v2/metricconfig/groups/save` for an
63454
+ * anomaly-detection group. `groupId` absent → create; present → update that
63455
+ * group. The UI's create sends a minimal `anomalyAlertConfig`
63456
+ * (`{enabled, useSystemSettings: true}`); updates send the full stored config.
63457
+ */
63458
+ const AnomalyDetectionGroupSaveRequestSchema = v4.z.looseObject({
63459
+ groupName: v4.z.string().min(1).describe('Group name'),
63460
+ description: v4.z.string().nullable().optional().describe('Free-text description'),
63461
+ filters: v4.z
63462
+ .array(MetricConfigFilterSchema)
63463
+ .min(1)
63464
+ .describe('Flat filter atoms; same-field atoms OR, different fields AND'),
63465
+ product: v4.z.string().min(1).describe('Wire product name scoping the match'),
63466
+ anomalyAlertConfig: AnomalyAlertConfigSchema.describe('On/off switch and alert settings'),
63467
+ defaultGroup: v4.z.boolean().optional().describe('Always false for user groups; sent on create'),
63468
+ groupId: v4.z.number().optional().describe('Omit to create; include to update that group'),
63469
+ });
63470
+ /** Response from `groups/save`. */
63471
+ const AnomalyDetectionGroupSaveResponseSchema = v4.z.looseObject({
63472
+ groupId: v4.z.number().describe('Id of the created/updated group'),
63473
+ message: v4.z.array(v4.z.string()).optional().describe('Server status messages'),
63474
+ status: v4.z.string().describe('"Success" on success'),
63475
+ });
63476
+ /**
63477
+ * Response from `DELETE oi/v2/metricconfig/groups` with body
63478
+ * `{groupIds: [<id>]}` (no `type` — the typed variant is the SLI delete).
63479
+ */
63480
+ const AnomalyDetectionGroupDeleteResponseSchema = v4.z.looseObject({
63481
+ message: v4.z.string().optional().describe('Server message, e.g. "Groups successfully deleted - [N]."'),
63482
+ status: v4.z.string().describe('"Success" on success'),
63483
+ });
63484
+ /**
63485
+ * Projects a stored group onto the writable save body for an UPDATE — drops
63486
+ * the read-only server fields, carries `groupId` and the full
63487
+ * `anomalyAlertConfig` (so an update never resets alert settings), and
63488
+ * applies `overrides` on top.
63489
+ */
63490
+ function toAnomalyDetectionGroupSaveRequest(group, overrides = {}) {
63491
+ return {
63492
+ groupName: overrides.groupName ?? group.groupName,
63493
+ groupId: group.groupId,
63494
+ description: overrides.description ?? group.description ?? null,
63495
+ filters: overrides.filters ?? group.filters,
63496
+ product: overrides.product ?? group.product,
63497
+ anomalyAlertConfig: overrides.anomalyAlertConfig ?? group.anomalyAlertConfig,
63498
+ };
63499
+ }
63500
+
63501
+ /**
63502
+ * Request body for `POST oi/v2/metricconfig/groups/search` when listing
63503
+ * anomaly-detection groups. Unlike the SLI search there is NO `type` — the
63504
+ * untyped search returns the anomaly groups in `metricGroups`.
63505
+ */
63506
+ const AnomalyDetectionGroupSearchRequestSchema = v4.z.looseObject({
63507
+ like: v4.z.string().describe('Name substring filter; "" for all'),
63508
+ pageSize: v4.z.number().describe('Max groups to return'),
63509
+ sortCol: v4.z.string().describe('Sort spec, e.g. "groupName:asc"'),
63510
+ customFilter: v4.z
63511
+ .record(v4.z.string(), v4.z.unknown())
63512
+ .describe('Group-attribute filter tree; {} for none'),
63513
+ });
63514
+ /**
63515
+ * Response from the untyped `groups/search`: the groups plus the tenant-wide
63516
+ * anomaly-detection budget (`enabledMetrics` of `allowedMetricsPerTenant`).
63517
+ */
63518
+ const AnomalyDetectionGroupSearchResponseSchema = v4.z.looseObject({
63519
+ totalGroups: v4.z.number().optional().describe('Number of groups returned'),
63520
+ pageSize: v4.z.number().optional().describe('Effective page size applied by the server'),
63521
+ enabledMetrics: v4.z
63522
+ .number()
63523
+ .optional()
63524
+ .describe('Metrics under anomaly detection across enabled groups; server-recomputed, observed to lag creates/deletes'),
63525
+ allowedMetricsPerTenant: v4.z
63526
+ .number()
63527
+ .optional()
63528
+ .describe('Tenant cap on metrics under anomaly detection (50000 observed)'),
63529
+ exceedLimit: v4.z.boolean().optional().describe('True when the tenant is over its cap'),
63530
+ metricGroups: v4.z
63531
+ .array(AnomalyDetectionGroupSchema)
63532
+ .describe('The anomaly-detection groups'),
63533
+ });
63534
+
62018
63535
  exports.NASS = void 0;
62019
63536
  (function (NASS) {
62020
63537
  function getAgentMetricCountQueryBody(agent) {
@@ -65327,21 +66844,11 @@ function toClusteringPolicyPreviewBody(body) {
65327
66844
 
65328
66845
  /**
65329
66846
  * One row of an SLI group's match criteria. SLI groups select the metrics they
65330
- * watch by a list of these AND-ed filters (e.g. "Source contains bd605" AND
65331
- * "Metric ends with Web Agent Status").
66847
+ * watch by a list of these filters (e.g. "Source contains bd605" AND
66848
+ * "Metric ends with Web Agent Status") — the metricconfig filter atom shared
66849
+ * with anomaly-detection groups.
65332
66850
  */
65333
- const SliFilterSchema = v4.z.looseObject({
65334
- fieldDescription: v4.z
65335
- .string()
65336
- .describe('Human label for the field, e.g. "Source" or "Metric"'),
65337
- field: v4.z
65338
- .string()
65339
- .describe('Wire field the filter matches on, e.g. "sourceName" or "attributeName"'),
65340
- value: v4.z.string().describe('Value to match against the field'),
65341
- condition: v4.z
65342
- .string()
65343
- .describe('Match operator, e.g. "contains", "ends_with", "regex"'),
65344
- });
66851
+ const SliFilterSchema = MetricConfigFilterSchema;
65345
66852
  /**
65346
66853
  * A full SLI group — the top-level construct holding SLIs, SLOs, and related
65347
66854
  * alerts — as returned by `groups/search` (per `sliGroups[]` entry) and
@@ -66082,112 +67589,6 @@ function removeAlert(group, sli, target) {
66082
67589
  return slot.splice(idx, 1)[0];
66083
67590
  }
66084
67591
 
66085
- /**
66086
- * Model for `POST oi/v2/metricconfig/groups/metrics` — the metric-match
66087
- * preview the DXO2 UI calls while a group's filters are edited. Given filter
66088
- * atoms and service bindings it returns the currently-matching metrics, which
66089
- * is exactly the feedback a create/add dry-run needs ("your filters match N
66090
- * metrics") and the fastest way to diagnose `sliStatusCode` 5 ("no metrics
66091
- * matching").
66092
- */
66093
- const SliFilterOrBlockSchema = v4.z.looseObject({
66094
- or: v4.z.looseObject({
66095
- expressions: v4.z
66096
- .array(SliFilterSchema)
66097
- .describe('Atoms on the SAME field, OR-ed together'),
66098
- }),
66099
- });
66100
- const SliGroupMetricsRequestSchema = v4.z.looseObject({
66101
- numericFilter: v4.z.boolean().describe('Always true — SLI groups only watch numeric metrics'),
66102
- serviceNames: v4.z.array(v4.z.string()).describe('Service bindings scoping the match'),
66103
- customFilter: v4.z
66104
- .looseObject({
66105
- and: v4.z.looseObject({
66106
- expressions: v4.z
66107
- .array(SliFilterOrBlockSchema)
66108
- .describe('One or-block per distinct field, AND-ed across fields'),
66109
- }),
66110
- })
66111
- .describe('The group filters as the wire expression tree'),
66112
- pageSize: v4.z.number().describe('Max metrics returned; the UI uses 100'),
66113
- });
66114
- const SliGroupMetricsEntrySchema = v4.z.looseObject({
66115
- metricName: v4.z.string().describe('Bare metric name, e.g. "Web Agent Status"'),
66116
- source: v4.z.string().describe('Source path of the metric'),
66117
- metric: v4.z.string().describe('Full metric path including the source-qualified name'),
66118
- nassMetricId: v4.z.string().optional().describe('NASS metric id'),
66119
- lastSeen: v4.z.number().optional().describe('Epoch millis the metric last reported'),
66120
- serviceNames: v4.z.array(v4.z.string()).optional().describe('Services the metric maps to'),
66121
- });
66122
- const SliGroupMetricsResponseSchema = v4.z.looseObject({
66123
- totalMetrics: v4.z
66124
- .union([v4.z.string(), v4.z.number()])
66125
- .describe('Count of matching metrics — a STRING on the wire (e.g. "2")'),
66126
- pageSize: v4.z.union([v4.z.string(), v4.z.number()]).optional().describe('Returned page size'),
66127
- metrics: v4.z.array(SliGroupMetricsEntrySchema).describe('The matching metrics'),
66128
- exceedLimit: v4.z
66129
- .boolean()
66130
- .optional()
66131
- .describe('True when the match exceeds the per-group metric cap'),
66132
- });
66133
- /**
66134
- * One filterable field for a set of services, from
66135
- * `POST oi/v2/metricconfig/metric/fields`. The catalog is DYNAMIC — derived
66136
- * from the metadata attributes the services' metrics actually carry, so it
66137
- * grows as new attributes report. `path` fields address the metric/source
66138
- * paths; `metadata` fields address metric attributes.
66139
- */
66140
- const SliMetricFieldSchema = v4.z.looseObject({
66141
- fieldDescription: v4.z.string().describe('Human label; equals `field` for metadata fields'),
66142
- field: v4.z.string().describe('Wire field name usable in filter atoms'),
66143
- type: v4.z.string().describe('"path" (metric/source path) or "metadata" (metric attribute)'),
66144
- values: v4.z.array(v4.z.unknown()).optional().describe('Value suggestions; observed empty'),
66145
- conditions: v4.z.array(v4.z.unknown()).optional().describe('Condition suggestions; observed empty'),
66146
- });
66147
- const SliMetricFieldsRequestSchema = v4.z.looseObject({
66148
- serviceNames: v4.z.array(v4.z.string()).describe('Services whose metric attributes to enumerate'),
66149
- });
66150
- const SliMetricFieldsResponseSchema = v4.z
66151
- .array(SliMetricFieldSchema)
66152
- .describe('The filterable fields for the requested services');
66153
- function orBlocksByField(filters) {
66154
- const byField = new Map();
66155
- for (const atom of filters) {
66156
- const bucket = byField.get(atom.field);
66157
- if (bucket) {
66158
- bucket.push(atom);
66159
- }
66160
- else {
66161
- byField.set(atom.field, [atom]);
66162
- }
66163
- }
66164
- return [...byField.values()].map((expressions) => ({ or: { expressions } }));
66165
- }
66166
- /**
66167
- * Builds the preview request from flat filter atoms the way the UI does:
66168
- * atoms are grouped by `field` (one or-block per field, in first-appearance
66169
- * order), and the blocks are AND-ed. Same-field atoms therefore OR (a metric
66170
- * name can `equals` any of four values) while different fields must all
66171
- * match.
66172
- *
66173
- * A per-SLI refinement is a SECOND filter layer narrowing the group's
66174
- * matches: its atoms are appended as their own AND-ed or-blocks, kept
66175
- * separate from the group set even when fields overlap (a refinement never
66176
- * ORs into the group filter — matches the UI's SLI-editing preview calls).
66177
- */
66178
- function toGroupMetricsRequest(filters, serviceNames, pageSize = 100, refinementFilters = []) {
66179
- return {
66180
- numericFilter: true,
66181
- serviceNames,
66182
- customFilter: {
66183
- and: {
66184
- expressions: [...orBlocksByField(filters), ...orBlocksByField(refinementFilters)],
66185
- },
66186
- },
66187
- pageSize,
66188
- };
66189
- }
66190
-
66191
67592
  /**
66192
67593
  * Request body for `POST oi/v2/metricconfig/groups/save`. Mirrors the writable
66193
67594
  * subset of {@link SliGroupSchema} — read-only server fields (creationTime,
@@ -84401,6 +85802,135 @@ class ManagementModuleService {
84401
85802
  }
84402
85803
  }
84403
85804
 
85805
+ /**
85806
+ * Service for metric anomaly-detection groups (DXO2 Settings → Anomaly
85807
+ * Detection Groups) — the untyped groups of the OI metricconfig API under
85808
+ * `oi/v2/metricconfig/groups/*` (SLI groups are the `type: "sli"` ones, see
85809
+ * {@link SLIService}).
85810
+ *
85811
+ * These endpoints require the `x-authorizationview: VIEWALL` header, so this
85812
+ * service uses {@link DxSaasService.oiPost} / `oiGet` / `oiDelete`.
85813
+ * Requests are validated against their input schema (throws `ZodError`);
85814
+ * responses are `safeParse`-validated (warn-on-mismatch, raw still returned).
85815
+ * Backs the `metric *-anomaly-detection-group(s)` CLI commands.
85816
+ */
85817
+ class MetricAnomalyService {
85818
+ dxSaasService;
85819
+ log;
85820
+ /**
85821
+ * @param dxSaasService - An authenticated {@link DxSaasService} for the target tenant.
85822
+ * @param log - Logger conforming to {@link SimpleLog} from `@dx-do/util`.
85823
+ */
85824
+ constructor(dxSaasService, log) {
85825
+ this.dxSaasService = dxSaasService;
85826
+ this.log = log;
85827
+ }
85828
+ /**
85829
+ * Lists anomaly-detection groups via the untyped
85830
+ * `POST oi/v2/metricconfig/groups/search`, plus the tenant budget
85831
+ * (`enabledMetrics` / `allowedMetricsPerTenant`).
85832
+ *
85833
+ * @remarks Defaults to the UI's body (`like: ""`, `pageSize: 5000`,
85834
+ * `sortCol: "groupName:asc"`, `customFilter: {}`); pass a partial override.
85835
+ * Response is validated but returned raw on mismatch.
85836
+ * @throws ZodError if the (merged) request fails schema validation.
85837
+ */
85838
+ async searchGroups(request) {
85839
+ const body = { like: '', pageSize: 5000, sortCol: 'groupName:asc', customFilter: {}, ...request };
85840
+ AnomalyDetectionGroupSearchRequestSchema.parse(body);
85841
+ const raw = await this.dxSaasService.oiPost('oi/v2/metricconfig/groups/search', body);
85842
+ const result = AnomalyDetectionGroupSearchResponseSchema.safeParse(raw);
85843
+ if (!result.success) {
85844
+ this.log.warn('AnomalyDetectionGroupSearchResponse validation warning:', result.error.message);
85845
+ }
85846
+ return raw;
85847
+ }
85848
+ /**
85849
+ * Retrieves one group via `GET oi/v2/metricconfig/groups?groupId=<id>`.
85850
+ *
85851
+ * @remarks Response is validated but returned raw on mismatch.
85852
+ */
85853
+ async getGroup(groupId) {
85854
+ const raw = await this.dxSaasService.oiGet('oi/v2/metricconfig/groups', { groupId });
85855
+ const result = AnomalyDetectionGroupSchema.safeParse(raw);
85856
+ if (!result.success) {
85857
+ this.log.warn('AnomalyDetectionGroup validation warning:', result.error.message);
85858
+ }
85859
+ return raw;
85860
+ }
85861
+ /**
85862
+ * Creates (no `groupId`) or updates (with `groupId`) a group via
85863
+ * `POST oi/v2/metricconfig/groups/save`. Build update bodies with
85864
+ * `toAnomalyDetectionGroupSaveRequest` so the alert config round-trips.
85865
+ *
85866
+ * @remarks Response is validated but returned raw on mismatch.
85867
+ * @throws ZodError if the request fails schema validation.
85868
+ */
85869
+ async saveGroup(body) {
85870
+ AnomalyDetectionGroupSaveRequestSchema.parse(body);
85871
+ const raw = await this.dxSaasService.oiPost('oi/v2/metricconfig/groups/save', body);
85872
+ const result = AnomalyDetectionGroupSaveResponseSchema.safeParse(raw);
85873
+ if (!result.success) {
85874
+ this.log.warn('AnomalyDetectionGroupSaveResponse validation warning:', result.error.message);
85875
+ }
85876
+ return raw;
85877
+ }
85878
+ /**
85879
+ * Deletes a group via `DELETE oi/v2/metricconfig/groups` with body
85880
+ * `{ groupIds: [<id>] }` — no `type` (adding `type: "sli"` targets SLI
85881
+ * groups instead). Captured from the DXO2 UI via copy-as-curl; the HAR
85882
+ * export did not record the DELETE.
85883
+ *
85884
+ * @remarks Response is validated but returned raw on mismatch.
85885
+ */
85886
+ async deleteGroup(groupId) {
85887
+ const raw = await this.dxSaasService.oiDelete('oi/v2/metricconfig/groups', undefined, {
85888
+ groupIds: [groupId],
85889
+ });
85890
+ const result = AnomalyDetectionGroupDeleteResponseSchema.safeParse(raw);
85891
+ if (!result.success) {
85892
+ this.log.warn('AnomalyDetectionGroupDeleteResponse validation warning:', result.error.message);
85893
+ }
85894
+ return raw;
85895
+ }
85896
+ /**
85897
+ * Previews the metrics a filter set matches within a product via
85898
+ * `POST oi/v2/metricconfig/groups/metrics`. Build the body with
85899
+ * `toAnomalyGroupMetricsRequest(filters, product)`.
85900
+ *
85901
+ * @remarks `totalMetrics` is a string on the wire; `"-1"` = not counted.
85902
+ * A malformed filter tree answers 200 with 0 matches, never an error.
85903
+ * @throws ZodError if the request fails schema validation.
85904
+ */
85905
+ async previewGroupMetrics(request) {
85906
+ AnomalyGroupMetricsRequestSchema.parse(request);
85907
+ const raw = await this.dxSaasService.oiPost('oi/v2/metricconfig/groups/metrics', request);
85908
+ const result = AnomalyGroupMetricsResponseSchema.safeParse(raw);
85909
+ if (!result.success) {
85910
+ this.log.warn('AnomalyGroupMetricsResponse validation warning:', result.error.message);
85911
+ }
85912
+ return raw;
85913
+ }
85914
+ /**
85915
+ * Lists the filterable fields for a product via
85916
+ * `POST oi/v2/metricconfig/metric/fields`.
85917
+ *
85918
+ * @remarks A filter on a field absent from this catalog silently matches
85919
+ * nothing — validate against it to catch typos.
85920
+ * @throws ZodError if the request fails schema validation.
85921
+ */
85922
+ async listMetricFields(product) {
85923
+ const request = { product };
85924
+ AnomalyMetricFieldsRequestSchema.parse(request);
85925
+ const raw = await this.dxSaasService.oiPost('oi/v2/metricconfig/metric/fields', request);
85926
+ const result = AnomalyMetricFieldsResponseSchema.safeParse(raw);
85927
+ if (!result.success) {
85928
+ this.log.warn('AnomalyMetricFieldsResponse validation warning:', result.error.message);
85929
+ }
85930
+ return raw;
85931
+ }
85932
+ }
85933
+
84404
85934
  var NullSimpleLog$3 = Logging.NullSimpleLog;
84405
85935
  /**
84406
85936
  * Service for metric batch and tree operations: batch retrieval by metric
@@ -88278,6 +89808,7 @@ function createServiceMonolith(dxDoConfiguration, log = new NullSimpleLog()) {
88278
89808
  dxSessionService: new SessionService(dxSaaSService),
88279
89809
  dxSituationService: new SituationService(dxSaaSService, log),
88280
89810
  dxSLIService: new SLIService(dxSaaSService, log),
89811
+ dxMetricAnomalyService: new MetricAnomalyService(dxSaaSService, log),
88281
89812
  dxSQLService: new SQLService(dxSaaSService),
88282
89813
  dxStatesService: new DataStoreStatesService(dxSaaSService, log),
88283
89814
  dxTASService,
@@ -88304,6 +89835,7 @@ exports.ALARM_VIEW_CATEGORIES = ALARM_VIEW_CATEGORIES;
88304
89835
  exports.ALARM_VIEW_FIELD_PATHS = ALARM_VIEW_FIELD_PATHS;
88305
89836
  exports.ALARM_VIEW_SEARCH_PATHS = ALARM_VIEW_SEARCH_PATHS;
88306
89837
  exports.ALGORITHMIC_SITUATIONS_KEY = ALGORITHMIC_SITUATIONS_KEY;
89838
+ exports.ANOMALY_DETECTION_PRODUCTS = ANOMALY_DETECTION_PRODUCTS;
88307
89839
  exports.AccService = AccService;
88308
89840
  exports.AgentService = AgentService;
88309
89841
  exports.AlarmCategorySchema = AlarmCategorySchema;
@@ -88326,6 +89858,18 @@ exports.AlarmService = AlarmService;
88326
89858
  exports.AlertService = AlertService;
88327
89859
  exports.AlignmentSchema = AlignmentSchema;
88328
89860
  exports.AllAlarmQueuesResponseSchema = AllAlarmQueuesResponseSchema;
89861
+ exports.AnomalyAlertConfigSchema = AnomalyAlertConfigSchema;
89862
+ exports.AnomalyDetectionGroupDeleteResponseSchema = AnomalyDetectionGroupDeleteResponseSchema;
89863
+ exports.AnomalyDetectionGroupSaveRequestSchema = AnomalyDetectionGroupSaveRequestSchema;
89864
+ exports.AnomalyDetectionGroupSaveResponseSchema = AnomalyDetectionGroupSaveResponseSchema;
89865
+ exports.AnomalyDetectionGroupSchema = AnomalyDetectionGroupSchema;
89866
+ exports.AnomalyDetectionGroupSearchRequestSchema = AnomalyDetectionGroupSearchRequestSchema;
89867
+ exports.AnomalyDetectionGroupSearchResponseSchema = AnomalyDetectionGroupSearchResponseSchema;
89868
+ exports.AnomalyGroupMetricsEntrySchema = AnomalyGroupMetricsEntrySchema;
89869
+ exports.AnomalyGroupMetricsRequestSchema = AnomalyGroupMetricsRequestSchema;
89870
+ exports.AnomalyGroupMetricsResponseSchema = AnomalyGroupMetricsResponseSchema;
89871
+ exports.AnomalyMetricFieldsRequestSchema = AnomalyMetricFieldsRequestSchema;
89872
+ exports.AnomalyMetricFieldsResponseSchema = AnomalyMetricFieldsResponseSchema;
88329
89873
  exports.AnyChannelSchema = AnyChannelSchema;
88330
89874
  exports.ApmUniverseService = ApmUniverseService;
88331
89875
  exports.AppVersionSchema = AppVersionSchema;
@@ -88568,8 +90112,12 @@ exports.MessageTemplateFieldSchema = MessageTemplateFieldSchema;
88568
90112
  exports.MessageTemplateFieldsResponseSchema = MessageTemplateFieldsResponseSchema;
88569
90113
  exports.MetadataMetricQueryResponseV2Schema = MetadataMetricQueryResponseV2Schema;
88570
90114
  exports.MetadataMetricQuerySchema = MetadataMetricQuerySchema;
90115
+ exports.MetricAnomalyService = MetricAnomalyService;
88571
90116
  exports.MetricAttributeSchema = MetricAttributeSchema;
88572
90117
  exports.MetricBatchService = MetricBatchService;
90118
+ exports.MetricConfigCustomFilterSchema = MetricConfigCustomFilterSchema;
90119
+ exports.MetricConfigFilterOrBlockSchema = MetricConfigFilterOrBlockSchema;
90120
+ exports.MetricConfigFilterSchema = MetricConfigFilterSchema;
88573
90121
  exports.MetricFolderSchema = MetricFolderSchema;
88574
90122
  exports.MetricGroupingService = MetricGroupingService;
88575
90123
  exports.MetricRegisterInputSchema = MetricRegisterInputSchema;
@@ -88626,7 +90174,9 @@ exports.QueryNotSpecifierSchema = QueryNotSpecifierSchema;
88626
90174
  exports.QueryOrSpecifierSchema = QueryOrSpecifierSchema;
88627
90175
  exports.QueryRangeSpecSchema = QueryRangeSpecSchema;
88628
90176
  exports.QueryRequestSchema = QueryRequestSchema;
90177
+ exports.QueryResultCellSchema = QueryResultCellSchema;
88629
90178
  exports.QueryResultSchema = QueryResultSchema;
90179
+ exports.QueryResultTableSchema = QueryResultTableSchema;
88630
90180
  exports.QuerySpecSpecifierSchema = QuerySpecSpecifierSchema;
88631
90181
  exports.QuerySpecifierSchema = QuerySpecifierSchema;
88632
90182
  exports.REDACTED_SECRET = REDACTED_SECRET;
@@ -89051,6 +90601,7 @@ exports.oauthTokenCognateDelete = oauthTokenCognateDelete;
89051
90601
  exports.oauthTokenCognateDeleteCurrent = oauthTokenCognateDeleteCurrent;
89052
90602
  exports.oauthTokenDelete = oauthTokenDelete;
89053
90603
  exports.oauthTokenDeleteCurrent = oauthTokenDeleteCurrent;
90604
+ exports.orBlocksByField = orBlocksByField;
89054
90605
  exports.parseExpression = parseExpression;
89055
90606
  exports.parseExternalIdFormat = parseExternalIdFormat;
89056
90607
  exports.parseFilter = parseFilter;
@@ -89070,6 +90621,7 @@ exports.reencodeItsmForWrite = reencodeItsmForWrite;
89070
90621
  exports.removeAlert = removeAlert;
89071
90622
  exports.removeSli = removeSli;
89072
90623
  exports.removeSloTriplet = removeSloTriplet;
90624
+ exports.resolveAnomalyDetectionProduct = resolveAnomalyDetectionProduct;
89073
90625
  exports.resolveEnrichmentMappings = resolveEnrichmentMappings;
89074
90626
  exports.resolveWebhookPayload = resolveWebhookPayload;
89075
90627
  exports.sampleServiceDetailRequestBody = sampleServiceDetailRequestBody;
@@ -89113,6 +90665,8 @@ exports.tenantConfigAttribute = tenantConfigAttribute;
89113
90665
  exports.timezonesList = timezonesList;
89114
90666
  exports.toAlarmFilterWriteBody = toAlarmFilterWriteBody;
89115
90667
  exports.toAlarmQueueWriteBody = toAlarmQueueWriteBody;
90668
+ exports.toAnomalyDetectionGroupSaveRequest = toAnomalyDetectionGroupSaveRequest;
90669
+ exports.toAnomalyGroupMetricsRequest = toAnomalyGroupMetricsRequest;
89116
90670
  exports.toChannelWriteBody = toChannelWriteBody;
89117
90671
  exports.toClusteringPolicyPreviewBody = toClusteringPolicyPreviewBody;
89118
90672
  exports.toClusteringPolicyWriteBody = toClusteringPolicyWriteBody;