@dynatrace-sdk/client-classic-environment-v2 8.0.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -613,29 +613,36 @@ function transformToFormDataField(value, field) {
613
613
  }
614
614
 
615
615
  // packages/client/classic-environment-v2/src/lib/utils/url-helpers.ts
616
- var encodeQueryParam = (key, value) => {
616
+ var flagFor = (flags, key, fallback) => flags && Object.prototype.hasOwnProperty.call(flags, key) ? flags[key] : fallback;
617
+ var encodeAllowingReserved = (value) => value.replace(/[^:/?#[\]@!$&'()*+,;=]+/g, (unreserved) => encodeURIComponent(unreserved));
618
+ var encodeQueryParamValue = (value, allowReserved) => {
619
+ const rawValue = String(value);
620
+ return allowReserved ? encodeAllowingReserved(rawValue) : encodeURIComponent(rawValue);
621
+ };
622
+ var encodeQueryParam = (key, value, allowReserved) => {
617
623
  const encodedKey = encodeURIComponent(key);
618
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : String(value))}`;
624
+ return `${encodedKey}=${encodeQueryParamValue(value, allowReserved)}`;
619
625
  };
620
- var addExplodedArrayQueryParam = (query, key) => {
626
+ var addExplodedArrayQueryParam = (query, key, allowReserved) => {
621
627
  const arrayValue = query[key];
622
- return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
628
+ return arrayValue.map((value) => encodeQueryParam(key, value, allowReserved)).join("&");
623
629
  };
624
- var addNonExplodedArrayQueryParams = (query, key) => {
630
+ var addNonExplodedArrayQueryParams = (query, key, allowReserved) => {
625
631
  const encodedKey = encodeURIComponent(key);
626
- const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
632
+ const encodedParamsList = query[key].map((value) => encodeQueryParamValue(value, allowReserved)).join(",");
627
633
  return `${encodedKey}=${encodedParamsList}`;
628
634
  };
629
- var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
630
- var arrayQueryParams = (query, key, explode) => {
631
- return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
635
+ var addQueryParam = (query, key, allowReserved) => encodeQueryParam(key, query[key], allowReserved);
636
+ var arrayQueryParams = (query, key, explode, allowReserved) => {
637
+ return explode ? addExplodedArrayQueryParam(query, key, allowReserved) : addNonExplodedArrayQueryParams(query, key, allowReserved);
632
638
  };
633
639
  var toQueryString = (rawQuery, flags = {}) => {
634
640
  const query = rawQuery || {};
635
641
  const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
636
- const queryString = keys.map(
637
- (key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
638
- ).join("&");
642
+ const queryString = keys.map((key) => {
643
+ const allowReserved = flagFor(flags.allowReserved, key, false);
644
+ return Array.isArray(query[key]) ? arrayQueryParams(query, key, flagFor(flags.explode, key, true), allowReserved) : addQueryParam(query, key, allowReserved);
645
+ }).join("&");
639
646
  return queryString ? `?${queryString}` : "";
640
647
  };
641
648
 
@@ -1671,6 +1678,8 @@ var AccessTokensApiTokensClient = class {
1671
1678
  * 1. Specify the number of results per page in the **pageSize** query parameter.
1672
1679
  * 2. Use the cursor from the **nextPageKey** field of the previous response in the **nextPageKey** query parameter to obtain subsequent pages.
1673
1680
  *
1681
+ * @deprecated
1682
+ *
1674
1683
  * @returns {Promise<ApiTokenList>} Success
1675
1684
  *
1676
1685
  * @example <caption>Code example</caption>
@@ -1852,6 +1861,8 @@ var AccessTokensApiTokensClient = class {
1852
1861
  *
1853
1862
  * Creating personal access tokens requires the `environment:roles:viewer` permission. Creating access tokens requires the `environment:roles:manage-settings` permission.
1854
1863
  *
1864
+ * @deprecated
1865
+ *
1855
1866
  * @returns {Promise<ApiTokenCreated>} Success. The token has been created. The body of the response contains the token secret.
1856
1867
  *
1857
1868
  * @example <caption>Code example</caption>
@@ -2026,6 +2037,10 @@ var AccessTokensApiTokensClient = class {
2026
2037
  * + environment:roles:viewer
2027
2038
  * + api-tokens:tokens:read
2028
2039
  *
2040
+ *
2041
+ *
2042
+ * @deprecated
2043
+ *
2029
2044
  * @returns {Promise<ApiToken>} Success
2030
2045
  *
2031
2046
  * @example <caption>Code example</caption>
@@ -2191,6 +2206,8 @@ var AccessTokensApiTokensClient = class {
2191
2206
  *
2192
2207
  * <br/><br/>The token secret is **not** exposed.
2193
2208
  *
2209
+ * @deprecated
2210
+ *
2194
2211
  * @returns {Promise<ApiToken>} Success
2195
2212
  *
2196
2213
  * @example <caption>Code example</caption>
@@ -2368,6 +2385,10 @@ var AccessTokensApiTokensClient = class {
2368
2385
  * + environment:roles:viewer
2369
2386
  * + api-tokens:tokens:write
2370
2387
  *
2388
+ *
2389
+ *
2390
+ * @deprecated
2391
+ *
2371
2392
  * @example <caption>Code example</caption>
2372
2393
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2373
2394
  *
@@ -2528,6 +2549,10 @@ var AccessTokensApiTokensClient = class {
2528
2549
  * + environment:roles:viewer
2529
2550
  * + api-tokens:tokens:write
2530
2551
  *
2552
+ *
2553
+ *
2554
+ * @deprecated
2555
+ *
2531
2556
  * @example <caption>Code example</caption>
2532
2557
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2533
2558
  *
@@ -18405,16 +18430,19 @@ var MetricsClient = class {
18405
18430
  if (!config) {
18406
18431
  throw new import_shared_errors28.ApiClientError("API client error", "API client call is missing mandatory config parameter");
18407
18432
  }
18408
- const query = toQueryString({
18409
- nextPageKey: config.nextPageKey,
18410
- pageSize: config.pageSize,
18411
- metricSelector: config.metricSelector,
18412
- text: config.text,
18413
- fields: config.fields,
18414
- writtenSince: config.writtenSince,
18415
- writtenSinceMode: config.writtenSinceMode,
18416
- metadataSelector: config.metadataSelector
18417
- });
18433
+ const query = toQueryString(
18434
+ {
18435
+ nextPageKey: config.nextPageKey,
18436
+ pageSize: config.pageSize,
18437
+ metricSelector: config.metricSelector,
18438
+ text: config.text,
18439
+ fields: config.fields,
18440
+ writtenSince: config.writtenSince,
18441
+ writtenSinceMode: config.writtenSinceMode,
18442
+ metadataSelector: config.metadataSelector
18443
+ },
18444
+ { allowReserved: { fields: true } }
18445
+ );
18418
18446
  try {
18419
18447
  const response = await this.httpClient.send({
18420
18448
  url: `/platform/classic/environment-api/v2/metrics${query}`,
@@ -19401,7 +19429,10 @@ var MetricsUnitsClient = class {
19401
19429
  if (!config) {
19402
19430
  throw new import_shared_errors29.ApiClientError("API client error", "API client call is missing mandatory config parameter");
19403
19431
  }
19404
- const query = toQueryString({ unitSelector: config.unitSelector, fields: config.fields });
19432
+ const query = toQueryString(
19433
+ { unitSelector: config.unitSelector, fields: config.fields },
19434
+ { allowReserved: { fields: true } }
19435
+ );
19405
19436
  try {
19406
19437
  const response = await this.httpClient.send({
19407
19438
  url: `/platform/classic/environment-api/v2/units${query}`,
@@ -20797,15 +20828,18 @@ var MonitoredEntitiesClient = class {
20797
20828
  if (!config) {
20798
20829
  throw new import_shared_errors31.ApiClientError("API client error", "API client call is missing mandatory config parameter");
20799
20830
  }
20800
- const query = toQueryString({
20801
- nextPageKey: config.nextPageKey,
20802
- pageSize: config.pageSize,
20803
- entitySelector: config.entitySelector,
20804
- from: config.from,
20805
- to: config.to,
20806
- fields: config.fields,
20807
- sort: config.sort
20808
- });
20831
+ const query = toQueryString(
20832
+ {
20833
+ nextPageKey: config.nextPageKey,
20834
+ pageSize: config.pageSize,
20835
+ entitySelector: config.entitySelector,
20836
+ from: config.from,
20837
+ to: config.to,
20838
+ fields: config.fields,
20839
+ sort: config.sort
20840
+ },
20841
+ { allowReserved: { fields: true } }
20842
+ );
20809
20843
  try {
20810
20844
  const response = await this.httpClient.send({
20811
20845
  url: `/platform/classic/environment-api/v2/entities${query}`,
@@ -21410,7 +21444,10 @@ var MonitoredEntitiesClient = class {
21410
21444
  if (!config) {
21411
21445
  throw new import_shared_errors31.ApiClientError("API client error", "API client call is missing mandatory config parameter");
21412
21446
  }
21413
- const query = toQueryString({ from: config.from, to: config.to, fields: config.fields });
21447
+ const query = toQueryString(
21448
+ { from: config.from, to: config.to, fields: config.fields },
21449
+ { allowReserved: { fields: true } }
21450
+ );
21414
21451
  try {
21415
21452
  const response = await this.httpClient.send({
21416
21453
  url: `/platform/classic/environment-api/v2/entities/${config.entityId}${query}`,
@@ -33560,14 +33597,18 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33560
33597
  *
33561
33598
  * **Required scope:** environment-api:synthetic:write<br/>**Required permission:** environment:roles:manage-settings
33562
33599
  *
33563
- * @returns {Promise<SyntheticConfigDto>} Success. The set of synthetic related parameters has been updated. Response doesn't have a body.
33564
- *
33565
33600
  * @example <caption>Code example</caption>
33566
33601
  * import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
33567
33602
  *
33568
33603
  * const data =
33569
33604
  * await syntheticLocationsNodesAndConfigurationClient.updateConfiguration(
33570
- * { body: { bmMonitorTimeout: 10, bmStepTimeout: 10 } },
33605
+ * {
33606
+ * body: {
33607
+ * bmMonitorTimeout: 10,
33608
+ * bmStepTimeout: 10,
33609
+ * maintenanceWindowsExcludedFromAvailability: false,
33610
+ * },
33611
+ * },
33571
33612
  * );
33572
33613
  *
33573
33614
  * @throws {ErrorEnvelopeError} Client side error. | Server side error.
@@ -33581,35 +33622,22 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33581
33622
  }
33582
33623
  const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
33583
33624
  try {
33584
- const response = await this.httpClient.send({
33625
+ await this.httpClient.send({
33585
33626
  url: `/platform/classic/environment-api/v2/synthetic/config`,
33586
33627
  method: "PUT",
33587
33628
  requestBodyType: "json",
33588
33629
  body: encodedBody,
33589
33630
  headers: {
33590
- "Content-Type": "application/json; charset=utf-8",
33591
- Accept: "application/json; charset=utf-8, application/json"
33631
+ "Content-Type": "application/json; charset=utf-8"
33592
33632
  },
33593
33633
  abortSignal: config instanceof EventTarget ? config : config.abortSignal,
33594
33634
  statusValidator: (status) => {
33595
33635
  return [204].includes(status);
33596
33636
  }
33597
33637
  });
33598
- const responseValue = await response.body("json");
33599
- try {
33600
- return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
33601
- } catch (err) {
33602
- throw new import_shared_errors47.InvalidResponseError(
33603
- `SyntheticLocationsNodesAndConfigurationClient.updateConfiguration:204`,
33604
- err,
33605
- responseValue,
33606
- void 0,
33607
- void 0,
33608
- response
33609
- );
33610
- }
33638
+ return;
33611
33639
  } catch (e) {
33612
- if ((0, import_http_client39.isHttpClientAbortError)(e) || (0, import_shared_errors47.isInvalidResponseError)(e)) {
33640
+ if ((0, import_http_client39.isHttpClientAbortError)(e)) {
33613
33641
  throw e;
33614
33642
  }
33615
33643
  if (!(0, import_http_client39.isHttpClientResponseError)(e)) {
@@ -33843,7 +33871,6 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33843
33871
  * latitude: 10,
33844
33872
  * longitude: 10,
33845
33873
  * name: "...",
33846
- * nodes: ["..."],
33847
33874
  * type: "CLUSTER",
33848
33875
  * },
33849
33876
  * },
@@ -38919,6 +38946,7 @@ var MetricDescriptorAggregationTypesItem = /* @__PURE__ */ ((MetricDescriptorAgg
38919
38946
  // packages/client/classic-environment-v2/src/lib/models/metric-descriptor-transformations-item.ts
38920
38947
  var MetricDescriptorTransformationsItem = /* @__PURE__ */ ((MetricDescriptorTransformationsItem2) => {
38921
38948
  MetricDescriptorTransformationsItem2["AsGauge"] = "asGauge";
38949
+ MetricDescriptorTransformationsItem2["AsHistogram"] = "asHistogram";
38922
38950
  MetricDescriptorTransformationsItem2["Default"] = "default";
38923
38951
  MetricDescriptorTransformationsItem2["Delta"] = "delta";
38924
38952
  MetricDescriptorTransformationsItem2["EvaluateModel"] = "evaluateModel";
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "dynagen": {
3
- "version": "0.23.0",
3
+ "version": "0.23.2",
4
4
  "template": {
5
5
  "name": "@dynatrace-sdk/template-typescript-client",
6
- "version": "0.36.1"
6
+ "version": "0.37.0"
7
7
  },
8
8
  "featureFlags": {}
9
9
  },
package/esm/index.js CHANGED
@@ -238,29 +238,36 @@ function transformToFormDataField(value, field) {
238
238
  }
239
239
 
240
240
  // packages/client/classic-environment-v2/src/lib/utils/url-helpers.ts
241
- var encodeQueryParam = (key, value) => {
241
+ var flagFor = (flags, key, fallback) => flags && Object.prototype.hasOwnProperty.call(flags, key) ? flags[key] : fallback;
242
+ var encodeAllowingReserved = (value) => value.replace(/[^:/?#[\]@!$&'()*+,;=]+/g, (unreserved) => encodeURIComponent(unreserved));
243
+ var encodeQueryParamValue = (value, allowReserved) => {
244
+ const rawValue = String(value);
245
+ return allowReserved ? encodeAllowingReserved(rawValue) : encodeURIComponent(rawValue);
246
+ };
247
+ var encodeQueryParam = (key, value, allowReserved) => {
242
248
  const encodedKey = encodeURIComponent(key);
243
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : String(value))}`;
249
+ return `${encodedKey}=${encodeQueryParamValue(value, allowReserved)}`;
244
250
  };
245
- var addExplodedArrayQueryParam = (query, key) => {
251
+ var addExplodedArrayQueryParam = (query, key, allowReserved) => {
246
252
  const arrayValue = query[key];
247
- return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
253
+ return arrayValue.map((value) => encodeQueryParam(key, value, allowReserved)).join("&");
248
254
  };
249
- var addNonExplodedArrayQueryParams = (query, key) => {
255
+ var addNonExplodedArrayQueryParams = (query, key, allowReserved) => {
250
256
  const encodedKey = encodeURIComponent(key);
251
- const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
257
+ const encodedParamsList = query[key].map((value) => encodeQueryParamValue(value, allowReserved)).join(",");
252
258
  return `${encodedKey}=${encodedParamsList}`;
253
259
  };
254
- var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
255
- var arrayQueryParams = (query, key, explode) => {
256
- return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
260
+ var addQueryParam = (query, key, allowReserved) => encodeQueryParam(key, query[key], allowReserved);
261
+ var arrayQueryParams = (query, key, explode, allowReserved) => {
262
+ return explode ? addExplodedArrayQueryParam(query, key, allowReserved) : addNonExplodedArrayQueryParams(query, key, allowReserved);
257
263
  };
258
264
  var toQueryString = (rawQuery, flags = {}) => {
259
265
  const query = rawQuery || {};
260
266
  const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
261
- const queryString = keys.map(
262
- (key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
263
- ).join("&");
267
+ const queryString = keys.map((key) => {
268
+ const allowReserved = flagFor(flags.allowReserved, key, false);
269
+ return Array.isArray(query[key]) ? arrayQueryParams(query, key, flagFor(flags.explode, key, true), allowReserved) : addQueryParam(query, key, allowReserved);
270
+ }).join("&");
264
271
  return queryString ? `?${queryString}` : "";
265
272
  };
266
273
 
@@ -1314,6 +1321,8 @@ var AccessTokensApiTokensClient = class {
1314
1321
  * 1. Specify the number of results per page in the **pageSize** query parameter.
1315
1322
  * 2. Use the cursor from the **nextPageKey** field of the previous response in the **nextPageKey** query parameter to obtain subsequent pages.
1316
1323
  *
1324
+ * @deprecated
1325
+ *
1317
1326
  * @returns {Promise<ApiTokenList>} Success
1318
1327
  *
1319
1328
  * @example <caption>Code example</caption>
@@ -1495,6 +1504,8 @@ var AccessTokensApiTokensClient = class {
1495
1504
  *
1496
1505
  * Creating personal access tokens requires the `environment:roles:viewer` permission. Creating access tokens requires the `environment:roles:manage-settings` permission.
1497
1506
  *
1507
+ * @deprecated
1508
+ *
1498
1509
  * @returns {Promise<ApiTokenCreated>} Success. The token has been created. The body of the response contains the token secret.
1499
1510
  *
1500
1511
  * @example <caption>Code example</caption>
@@ -1669,6 +1680,10 @@ var AccessTokensApiTokensClient = class {
1669
1680
  * + environment:roles:viewer
1670
1681
  * + api-tokens:tokens:read
1671
1682
  *
1683
+ *
1684
+ *
1685
+ * @deprecated
1686
+ *
1672
1687
  * @returns {Promise<ApiToken>} Success
1673
1688
  *
1674
1689
  * @example <caption>Code example</caption>
@@ -1834,6 +1849,8 @@ var AccessTokensApiTokensClient = class {
1834
1849
  *
1835
1850
  * <br/><br/>The token secret is **not** exposed.
1836
1851
  *
1852
+ * @deprecated
1853
+ *
1837
1854
  * @returns {Promise<ApiToken>} Success
1838
1855
  *
1839
1856
  * @example <caption>Code example</caption>
@@ -2011,6 +2028,10 @@ var AccessTokensApiTokensClient = class {
2011
2028
  * + environment:roles:viewer
2012
2029
  * + api-tokens:tokens:write
2013
2030
  *
2031
+ *
2032
+ *
2033
+ * @deprecated
2034
+ *
2014
2035
  * @example <caption>Code example</caption>
2015
2036
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2016
2037
  *
@@ -2171,6 +2192,10 @@ var AccessTokensApiTokensClient = class {
2171
2192
  * + environment:roles:viewer
2172
2193
  * + api-tokens:tokens:write
2173
2194
  *
2195
+ *
2196
+ *
2197
+ * @deprecated
2198
+ *
2174
2199
  * @example <caption>Code example</caption>
2175
2200
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2176
2201
  *
@@ -18219,16 +18244,19 @@ var MetricsClient = class {
18219
18244
  if (!config) {
18220
18245
  throw new ApiClientError22("API client error", "API client call is missing mandatory config parameter");
18221
18246
  }
18222
- const query = toQueryString({
18223
- nextPageKey: config.nextPageKey,
18224
- pageSize: config.pageSize,
18225
- metricSelector: config.metricSelector,
18226
- text: config.text,
18227
- fields: config.fields,
18228
- writtenSince: config.writtenSince,
18229
- writtenSinceMode: config.writtenSinceMode,
18230
- metadataSelector: config.metadataSelector
18231
- });
18247
+ const query = toQueryString(
18248
+ {
18249
+ nextPageKey: config.nextPageKey,
18250
+ pageSize: config.pageSize,
18251
+ metricSelector: config.metricSelector,
18252
+ text: config.text,
18253
+ fields: config.fields,
18254
+ writtenSince: config.writtenSince,
18255
+ writtenSinceMode: config.writtenSinceMode,
18256
+ metadataSelector: config.metadataSelector
18257
+ },
18258
+ { allowReserved: { fields: true } }
18259
+ );
18232
18260
  try {
18233
18261
  const response = await this.httpClient.send({
18234
18262
  url: `/platform/classic/environment-api/v2/metrics${query}`,
@@ -19224,7 +19252,10 @@ var MetricsUnitsClient = class {
19224
19252
  if (!config) {
19225
19253
  throw new ApiClientError23("API client error", "API client call is missing mandatory config parameter");
19226
19254
  }
19227
- const query = toQueryString({ unitSelector: config.unitSelector, fields: config.fields });
19255
+ const query = toQueryString(
19256
+ { unitSelector: config.unitSelector, fields: config.fields },
19257
+ { allowReserved: { fields: true } }
19258
+ );
19228
19259
  try {
19229
19260
  const response = await this.httpClient.send({
19230
19261
  url: `/platform/classic/environment-api/v2/units${query}`,
@@ -20640,15 +20671,18 @@ var MonitoredEntitiesClient = class {
20640
20671
  if (!config) {
20641
20672
  throw new ApiClientError25("API client error", "API client call is missing mandatory config parameter");
20642
20673
  }
20643
- const query = toQueryString({
20644
- nextPageKey: config.nextPageKey,
20645
- pageSize: config.pageSize,
20646
- entitySelector: config.entitySelector,
20647
- from: config.from,
20648
- to: config.to,
20649
- fields: config.fields,
20650
- sort: config.sort
20651
- });
20674
+ const query = toQueryString(
20675
+ {
20676
+ nextPageKey: config.nextPageKey,
20677
+ pageSize: config.pageSize,
20678
+ entitySelector: config.entitySelector,
20679
+ from: config.from,
20680
+ to: config.to,
20681
+ fields: config.fields,
20682
+ sort: config.sort
20683
+ },
20684
+ { allowReserved: { fields: true } }
20685
+ );
20652
20686
  try {
20653
20687
  const response = await this.httpClient.send({
20654
20688
  url: `/platform/classic/environment-api/v2/entities${query}`,
@@ -21253,7 +21287,10 @@ var MonitoredEntitiesClient = class {
21253
21287
  if (!config) {
21254
21288
  throw new ApiClientError25("API client error", "API client call is missing mandatory config parameter");
21255
21289
  }
21256
- const query = toQueryString({ from: config.from, to: config.to, fields: config.fields });
21290
+ const query = toQueryString(
21291
+ { from: config.from, to: config.to, fields: config.fields },
21292
+ { allowReserved: { fields: true } }
21293
+ );
21257
21294
  try {
21258
21295
  const response = await this.httpClient.send({
21259
21296
  url: `/platform/classic/environment-api/v2/entities/${config.entityId}${query}`,
@@ -33534,14 +33571,18 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33534
33571
  *
33535
33572
  * **Required scope:** environment-api:synthetic:write<br/>**Required permission:** environment:roles:manage-settings
33536
33573
  *
33537
- * @returns {Promise<SyntheticConfigDto>} Success. The set of synthetic related parameters has been updated. Response doesn't have a body.
33538
- *
33539
33574
  * @example <caption>Code example</caption>
33540
33575
  * import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
33541
33576
  *
33542
33577
  * const data =
33543
33578
  * await syntheticLocationsNodesAndConfigurationClient.updateConfiguration(
33544
- * { body: { bmMonitorTimeout: 10, bmStepTimeout: 10 } },
33579
+ * {
33580
+ * body: {
33581
+ * bmMonitorTimeout: 10,
33582
+ * bmStepTimeout: 10,
33583
+ * maintenanceWindowsExcludedFromAvailability: false,
33584
+ * },
33585
+ * },
33545
33586
  * );
33546
33587
  *
33547
33588
  * @throws {ErrorEnvelopeError} Client side error. | Server side error.
@@ -33555,35 +33596,22 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33555
33596
  }
33556
33597
  const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
33557
33598
  try {
33558
- const response = await this.httpClient.send({
33599
+ await this.httpClient.send({
33559
33600
  url: `/platform/classic/environment-api/v2/synthetic/config`,
33560
33601
  method: "PUT",
33561
33602
  requestBodyType: "json",
33562
33603
  body: encodedBody,
33563
33604
  headers: {
33564
- "Content-Type": "application/json; charset=utf-8",
33565
- Accept: "application/json; charset=utf-8, application/json"
33605
+ "Content-Type": "application/json; charset=utf-8"
33566
33606
  },
33567
33607
  abortSignal: config instanceof EventTarget ? config : config.abortSignal,
33568
33608
  statusValidator: (status) => {
33569
33609
  return [204].includes(status);
33570
33610
  }
33571
33611
  });
33572
- const responseValue = await response.body("json");
33573
- try {
33574
- return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
33575
- } catch (err) {
33576
- throw new InvalidResponseError39(
33577
- `SyntheticLocationsNodesAndConfigurationClient.updateConfiguration:204`,
33578
- err,
33579
- responseValue,
33580
- void 0,
33581
- void 0,
33582
- response
33583
- );
33584
- }
33612
+ return;
33585
33613
  } catch (e) {
33586
- if (isHttpClientAbortError39(e) || isInvalidResponseError38(e)) {
33614
+ if (isHttpClientAbortError39(e)) {
33587
33615
  throw e;
33588
33616
  }
33589
33617
  if (!isHttpClientResponseError39(e)) {
@@ -33817,7 +33845,6 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33817
33845
  * latitude: 10,
33818
33846
  * longitude: 10,
33819
33847
  * name: "...",
33820
- * nodes: ["..."],
33821
33848
  * type: "CLUSTER",
33822
33849
  * },
33823
33850
  * },
@@ -38920,6 +38947,7 @@ var MetricDescriptorAggregationTypesItem = /* @__PURE__ */ ((MetricDescriptorAgg
38920
38947
  // packages/client/classic-environment-v2/src/lib/models/metric-descriptor-transformations-item.ts
38921
38948
  var MetricDescriptorTransformationsItem = /* @__PURE__ */ ((MetricDescriptorTransformationsItem2) => {
38922
38949
  MetricDescriptorTransformationsItem2["AsGauge"] = "asGauge";
38950
+ MetricDescriptorTransformationsItem2["AsHistogram"] = "asHistogram";
38923
38951
  MetricDescriptorTransformationsItem2["Default"] = "default";
38924
38952
  MetricDescriptorTransformationsItem2["Delta"] = "delta";
38925
38953
  MetricDescriptorTransformationsItem2["EvaluateModel"] = "evaluateModel";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-classic-environment-v2",
3
- "version": "8.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Client for the Dynatrace Environment API v2",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {