@dynatrace-sdk/client-classic-environment-v2 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,13 +2,27 @@
2
2
 
3
3
  @dynatrace-sdk/client-classic-environment-v2
4
4
 
5
+ ## 9.1.0
6
+
7
+ ### Minor Changes
8
+ - Add optional `externalId` to `SyntheticBrowserMonitorRequest`, `SyntheticBrowserMonitorResponse`, `SyntheticHttpMonitorRequest`, `SyntheticHttpMonitorResponse`, `SyntheticMonitorSummaryDto`, `SyntheticMultiProtocolMonitorRequest`, and `SyntheticMultiProtocolMonitorResponse`. Lets configuration-as-code tools (e.g. Monaco) track a stable identifier per monitor.
9
+ - Add `'ncc' | 'otel-collector' | 'target-allocator' | 'edge-connect'` to the `ContainerImageComponent.type` union and matching new members (`Ncc`, `OtelCollector`, `TargetAllocator`, `EdgeConnect`) to the deprecated `ContainerImageComponentType` enum.
10
+
11
+ ## 9.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Fix encoding of the fields query parameter - reserved characters are now preserved verbatim instead of being percent-encoded. (APPDEV-19736)
16
+
5
17
  ## 9.0.0
6
18
 
7
19
  ### Major Changes
20
+
8
21
  - BREAKING: `SyntheticLocationsNodesAndConfigurationClient.updateConfiguration` now returns `Promise<void>` because the endpoint returns HTTP 204 without a response body. Do not consume the resolved `SyntheticConfigDto`.
9
22
  - BREAKING: `SyntheticConfigDto.maintenanceWindowsExcludedFromAvailability` is now required. Include this field in every `updateConfiguration` request.
10
23
 
11
24
  ### Minor Changes
25
+
12
26
  - Add optional `monitorCrossOriginFrames` to `SyntheticBrowserMonitorConfigurationDto`.
13
27
  - Add `asHistogram` to metric descriptor transformations.
14
28
  - Deprecate the API-token operations on `accessTokensApiTokensClient`.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dynatrace-sdk/client-classic-environment-v2
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v9.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-classic-environment-v2/v/9.0.0)
3
+ [![npm](https://img.shields.io/badge/npm-v9.1.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-classic-environment-v2/v/9.1.0)
4
4
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
 
6
6
 
@@ -15063,7 +15063,7 @@ Gets all synthetic monitors. | maturity=EARLY_ADOPTER
15063
15063
 
15064
15064
  | Name | Type | Description |
15065
15065
  | --- | --- | --- |
15066
- |config.monitorSelector|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>Defines the scope of the query. Only monitors matching the specified criteria are included into response.</p> <p>You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the <strong>OR</strong> logic applies.</p> <ul> <li>Monitor type: <code>type(HTTP,MULTI_PROTOCOL)</code>. Possible values: 'HTTP', 'BROWSER', 'THIRD_PARTY', 'MULTI_PROTOCOL' (Note that only 'BROWSER' and 'MULTI_PROTOCOL' are currently supported).</li> <li>Management zone ID: <code>managementZoneId(1, 2)</code>.</li> <li>Synthetic Location ME ID: <code>location(SYNTHETIC_LOCATION-123)</code>.</li> <li>Monitored host ME ID: <code>monitoredEntity(HOST-123)</code>.</li> <li>Monitor tags: <code>tag(\[context]key:value,key:value,key)</code>. Tags in <code>\[context]key:value</code>, <code>key:value</code>, and <code>key</code> formats are detected and parsed automatically. If a key-only tag has a colon (<code>:</code>) in it, you must escape the colon with a backslash(<code>\\</code>). Otherwise, the tag will be parsed as a <code>key:value tag</code>. All tag values are case-sensitive. Values listed within a single <code>tag(...)</code> are combined with <strong>OR</strong>. To require multiple tags (<strong>AND</strong>), specify several <code>tag(...)</code> selectors. For example, <code>tag(tag-a),tag(tag-b)</code> matches only monitors that have <strong>both</strong> tags, while <code>tag(tag-a,tag-b)</code> matches monitors that have <strong>either</strong>.</li> <li>Monitor enablement: <code>enabled(true)</code>.</li> </ul> <p>To set several criteria, separate them with a comma (<code>,</code>). Only results matching <strong>all</strong> criteria are included in the response.</p> |
15066
+ |config.monitorSelector|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>Defines the scope of the query. Only monitors matching the specified criteria are included into response.</p> <p>You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the <strong>OR</strong> logic applies.</p> <ul> <li>Monitor type: <code>type(HTTP,MULTI_PROTOCOL)</code>. Possible values: 'HTTP', 'BROWSER', 'THIRD_PARTY', 'MULTI_PROTOCOL' (Note that only 'BROWSER' and 'MULTI_PROTOCOL' are currently supported).</li> <li>Management zone ID: <code>managementZoneId(1, 2)</code>.</li> <li>Synthetic Location ME ID: <code>location(SYNTHETIC_LOCATION-123)</code>.</li> <li>Monitored host ME ID: <code>monitoredEntity(HOST-123)</code>.</li> <li>Monitor tags: <code>tag(\[context]key:value,key:value,key)</code>. Tags in <code>\[context]key:value</code>, <code>key:value</code>, and <code>key</code> formats are detected and parsed automatically. If a key-only tag has a colon (<code>:</code>) in it, you must escape the colon with a backslash(<code>\\</code>). Otherwise, the tag will be parsed as a <code>key:value tag</code>. All tag values are case-sensitive. Values listed within a single <code>tag(...)</code> are combined with <strong>OR</strong>. To require multiple tags (<strong>AND</strong>), specify several <code>tag(...)</code> selectors. For example, <code>tag(tag-a),tag(tag-b)</code> matches only monitors that have <strong>both</strong> tags, while <code>tag(tag-a,tag-b)</code> matches monitors that have <strong>either</strong>.</li> <li>Monitor enablement: <code>enabled(true)</code>.</li> <li>Monaco external ID: <code>externalId(value1,value2)</code></li> </ul> <p>To set several criteria, separate them with a comma (<code>,</code>). Only results matching <strong>all</strong> criteria are included in the response.</p> |
15067
15067
 
15068
15068
 
15069
15069
 
@@ -16534,7 +16534,7 @@ Information about component type and images registry URI.
16534
16534
  | Name | Type | Description |
16535
16535
  | --- | --- | --- |
16536
16536
  |imageUri|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Registry URI of the container image component.|
16537
- |type|"activegate" &#124; "codemodules" &#124; "database-datasource-executor" &#124; "sql-extension-executor" &#124; "dynatrace-sql-extension-executor" &#124; "eec" &#124; "logmodule" &#124; "oneagent"|Container image component type.|
16537
+ |type|"activegate" &#124; "codemodules" &#124; "database-datasource-executor" &#124; "sql-extension-executor" &#124; "dynatrace-sql-extension-executor" &#124; "eec" &#124; "logmodule" &#124; "oneagent" &#124; "ncc" &#124; "otel-collector" &#124; "target-allocator" &#124; "edge-connect"|Container image component type.|
16538
16538
 
16539
16539
  ### ContainerImageData
16540
16540
 
@@ -20168,6 +20168,7 @@ Browser monitor update.
20168
20168
  |configuration<sup>*required</sup>|<a href="#syntheticbrowsermonitorconfigurationdto" target="_blank" rel="noopener noreferrer">SyntheticBrowserMonitorConfigurationDto</a>|Browser Monitor configuration.|
20169
20169
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20170
20170
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.<br/><br/><strong>Default:</strong> <code>true</code>|
20171
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20171
20172
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).|
20172
20173
  |keyPerformanceMetrics|<a href="#keyperformancemetrics">KeyPerformanceMetrics</a>|The key performance metrics configuration.|
20173
20174
  |locations<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
@@ -20191,6 +20192,7 @@ Browser Monitor.
20191
20192
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20192
20193
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.|
20193
20194
  |entityId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The entity id of the monitor.|
20195
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20194
20196
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes.|
20195
20197
  |keyPerformanceMetrics<sup>*required</sup>|<a href="#keyperformancemetrics" target="_blank" rel="noopener noreferrer">KeyPerformanceMetrics</a>|The key performance metrics configuration.|
20196
20198
  |locations|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
@@ -20275,6 +20277,7 @@ Http monitor&apos;s settings.
20275
20277
  |cookies|Array&lt;<a href="#syntheticmonitorcookiedto" target="_blank" rel="noopener noreferrer">SyntheticMonitorCookieDto</a>&gt;|The cookies of the monitor.|
20276
20278
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20277
20279
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.<br/><br/><strong>Default:</strong> <code>true</code>|
20280
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20278
20281
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).|
20279
20282
  |locations<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
20280
20283
  |manuallyAssignedEntities|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|Manually assigned entities.|
@@ -20298,6 +20301,7 @@ Http monitor.
20298
20301
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20299
20302
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.|
20300
20303
  |entityId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The entity id of the monitor.|
20304
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20301
20305
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes.|
20302
20306
  |locations|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
20303
20307
  |manuallyAssignedEntities|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|Manually assigned entities.|
@@ -20464,6 +20468,7 @@ Basic monitor data.
20464
20468
  | --- | --- | --- |
20465
20469
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.|
20466
20470
  |entityId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The entity id of the monitor.|
20471
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20467
20472
  |name|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the monitor.|
20468
20473
  |type<sup>*required</sup>|"BROWSER" &#124; "HTTP" &#124; "MULTI_PROTOCOL"|The type of the monitor.|
20469
20474
 
@@ -20475,6 +20480,7 @@ Network availability monitor.
20475
20480
  | --- | --- | --- |
20476
20481
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20477
20482
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.<br/><br/><strong>Default:</strong> <code>true</code>|
20483
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20478
20484
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).|
20479
20485
  |locations<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
20480
20486
  |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the monitor.|
@@ -20494,6 +20500,7 @@ Network availability monitor.
20494
20500
  |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Monitor description|
20495
20501
  |enabled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If true, the monitor is enabled.|
20496
20502
  |entityId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The entity id of the monitor.|
20503
+ |externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.|
20497
20504
  |frequencyMin|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The frequency of the monitor, in minutes.|
20498
20505
  |locations|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The locations to which the monitor is assigned.|
20499
20506
  |modificationTimestamp|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The timestamp of the last modification|
@@ -22136,7 +22143,7 @@ Container image component type.
22136
22143
 
22137
22144
  <div class="padding-left--md">
22138
22145
 
22139
- `Activegate` | `Codemodules` | `DatabaseDatasourceExecutor` | `DynatraceSqlExtensionExecutor` | `Eec` | `Logmodule` | `Oneagent` | `SqlExtensionExecutor`
22146
+ `Activegate` | `Codemodules` | `DatabaseDatasourceExecutor` | `DynatraceSqlExtensionExecutor` | `EdgeConnect` | `Eec` | `Logmodule` | `Ncc` | `Oneagent` | `OtelCollector` | `SqlExtensionExecutor` | `TargetAllocator`
22140
22147
 
22141
22148
  </div>
22142
22149
 
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
 
@@ -18423,16 +18430,19 @@ var MetricsClient = class {
18423
18430
  if (!config) {
18424
18431
  throw new import_shared_errors28.ApiClientError("API client error", "API client call is missing mandatory config parameter");
18425
18432
  }
18426
- const query = toQueryString({
18427
- nextPageKey: config.nextPageKey,
18428
- pageSize: config.pageSize,
18429
- metricSelector: config.metricSelector,
18430
- text: config.text,
18431
- fields: config.fields,
18432
- writtenSince: config.writtenSince,
18433
- writtenSinceMode: config.writtenSinceMode,
18434
- metadataSelector: config.metadataSelector
18435
- });
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
+ );
18436
18446
  try {
18437
18447
  const response = await this.httpClient.send({
18438
18448
  url: `/platform/classic/environment-api/v2/metrics${query}`,
@@ -19419,7 +19429,10 @@ var MetricsUnitsClient = class {
19419
19429
  if (!config) {
19420
19430
  throw new import_shared_errors29.ApiClientError("API client error", "API client call is missing mandatory config parameter");
19421
19431
  }
19422
- 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
+ );
19423
19436
  try {
19424
19437
  const response = await this.httpClient.send({
19425
19438
  url: `/platform/classic/environment-api/v2/units${query}`,
@@ -20815,15 +20828,18 @@ var MonitoredEntitiesClient = class {
20815
20828
  if (!config) {
20816
20829
  throw new import_shared_errors31.ApiClientError("API client error", "API client call is missing mandatory config parameter");
20817
20830
  }
20818
- const query = toQueryString({
20819
- nextPageKey: config.nextPageKey,
20820
- pageSize: config.pageSize,
20821
- entitySelector: config.entitySelector,
20822
- from: config.from,
20823
- to: config.to,
20824
- fields: config.fields,
20825
- sort: config.sort
20826
- });
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
+ );
20827
20843
  try {
20828
20844
  const response = await this.httpClient.send({
20829
20845
  url: `/platform/classic/environment-api/v2/entities${query}`,
@@ -21428,7 +21444,10 @@ var MonitoredEntitiesClient = class {
21428
21444
  if (!config) {
21429
21445
  throw new import_shared_errors31.ApiClientError("API client error", "API client call is missing mandatory config parameter");
21430
21446
  }
21431
- 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
+ );
21432
21451
  try {
21433
21452
  const response = await this.httpClient.send({
21434
21453
  url: `/platform/classic/environment-api/v2/entities/${config.entityId}${query}`,
@@ -38100,6 +38119,10 @@ var ContainerImageComponentType = /* @__PURE__ */ ((ContainerImageComponentType2
38100
38119
  ContainerImageComponentType2["Eec"] = "eec";
38101
38120
  ContainerImageComponentType2["Logmodule"] = "logmodule";
38102
38121
  ContainerImageComponentType2["Oneagent"] = "oneagent";
38122
+ ContainerImageComponentType2["Ncc"] = "ncc";
38123
+ ContainerImageComponentType2["OtelCollector"] = "otel-collector";
38124
+ ContainerImageComponentType2["TargetAllocator"] = "target-allocator";
38125
+ ContainerImageComponentType2["EdgeConnect"] = "edge-connect";
38103
38126
  return ContainerImageComponentType2;
38104
38127
  })(ContainerImageComponentType || {});
38105
38128
 
@@ -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
 
@@ -18237,16 +18244,19 @@ var MetricsClient = class {
18237
18244
  if (!config) {
18238
18245
  throw new ApiClientError22("API client error", "API client call is missing mandatory config parameter");
18239
18246
  }
18240
- const query = toQueryString({
18241
- nextPageKey: config.nextPageKey,
18242
- pageSize: config.pageSize,
18243
- metricSelector: config.metricSelector,
18244
- text: config.text,
18245
- fields: config.fields,
18246
- writtenSince: config.writtenSince,
18247
- writtenSinceMode: config.writtenSinceMode,
18248
- metadataSelector: config.metadataSelector
18249
- });
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
+ );
18250
18260
  try {
18251
18261
  const response = await this.httpClient.send({
18252
18262
  url: `/platform/classic/environment-api/v2/metrics${query}`,
@@ -19242,7 +19252,10 @@ var MetricsUnitsClient = class {
19242
19252
  if (!config) {
19243
19253
  throw new ApiClientError23("API client error", "API client call is missing mandatory config parameter");
19244
19254
  }
19245
- 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
+ );
19246
19259
  try {
19247
19260
  const response = await this.httpClient.send({
19248
19261
  url: `/platform/classic/environment-api/v2/units${query}`,
@@ -20658,15 +20671,18 @@ var MonitoredEntitiesClient = class {
20658
20671
  if (!config) {
20659
20672
  throw new ApiClientError25("API client error", "API client call is missing mandatory config parameter");
20660
20673
  }
20661
- const query = toQueryString({
20662
- nextPageKey: config.nextPageKey,
20663
- pageSize: config.pageSize,
20664
- entitySelector: config.entitySelector,
20665
- from: config.from,
20666
- to: config.to,
20667
- fields: config.fields,
20668
- sort: config.sort
20669
- });
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
+ );
20670
20686
  try {
20671
20687
  const response = await this.httpClient.send({
20672
20688
  url: `/platform/classic/environment-api/v2/entities${query}`,
@@ -21271,7 +21287,10 @@ var MonitoredEntitiesClient = class {
21271
21287
  if (!config) {
21272
21288
  throw new ApiClientError25("API client error", "API client call is missing mandatory config parameter");
21273
21289
  }
21274
- 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
+ );
21275
21294
  try {
21276
21295
  const response = await this.httpClient.send({
21277
21296
  url: `/platform/classic/environment-api/v2/entities/${config.entityId}${query}`,
@@ -38101,6 +38120,10 @@ var ContainerImageComponentType = /* @__PURE__ */ ((ContainerImageComponentType2
38101
38120
  ContainerImageComponentType2["Eec"] = "eec";
38102
38121
  ContainerImageComponentType2["Logmodule"] = "logmodule";
38103
38122
  ContainerImageComponentType2["Oneagent"] = "oneagent";
38123
+ ContainerImageComponentType2["Ncc"] = "ncc";
38124
+ ContainerImageComponentType2["OtelCollector"] = "otel-collector";
38125
+ ContainerImageComponentType2["TargetAllocator"] = "target-allocator";
38126
+ ContainerImageComponentType2["EdgeConnect"] = "edge-connect";
38104
38127
  return ContainerImageComponentType2;
38105
38128
  })(ContainerImageComponentType || {});
38106
38129
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-classic-environment-v2",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "Client for the Dynatrace Environment API v2",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
package/types/index.d.ts CHANGED
@@ -5233,7 +5233,7 @@ export declare interface ContainerImageComponent {
5233
5233
  /**
5234
5234
  * Container image component type.
5235
5235
  */
5236
- type?: 'activegate' | 'codemodules' | 'database-datasource-executor' | 'sql-extension-executor' | 'dynatrace-sql-extension-executor' | 'eec' | 'logmodule' | 'oneagent';
5236
+ type?: 'activegate' | 'codemodules' | 'database-datasource-executor' | 'sql-extension-executor' | 'dynatrace-sql-extension-executor' | 'eec' | 'logmodule' | 'oneagent' | 'ncc' | 'otel-collector' | 'target-allocator' | 'edge-connect';
5237
5237
  }
5238
5238
 
5239
5239
  /**
@@ -5249,7 +5249,11 @@ export declare enum ContainerImageComponentType {
5249
5249
  DynatraceSqlExtensionExecutor = "dynatrace-sql-extension-executor",
5250
5250
  Eec = "eec",
5251
5251
  Logmodule = "logmodule",
5252
- Oneagent = "oneagent"
5252
+ Oneagent = "oneagent",
5253
+ Ncc = "ncc",
5254
+ OtelCollector = "otel-collector",
5255
+ TargetAllocator = "target-allocator",
5256
+ EdgeConnect = "edge-connect"
5253
5257
  }
5254
5258
 
5255
5259
  /**
@@ -22909,6 +22913,10 @@ export declare interface SyntheticBrowserMonitorRequest {
22909
22913
  * @defaultValue true
22910
22914
  */
22911
22915
  enabled?: boolean;
22916
+ /**
22917
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
22918
+ */
22919
+ externalId?: string;
22912
22920
  /**
22913
22921
  * The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).
22914
22922
  */
@@ -22994,6 +23002,10 @@ export declare interface SyntheticBrowserMonitorResponse {
22994
23002
  * The entity id of the monitor.
22995
23003
  */
22996
23004
  entityId: string;
23005
+ /**
23006
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
23007
+ */
23008
+ externalId?: string;
22997
23009
  /**
22998
23010
  * The frequency of the monitor, in minutes.
22999
23011
  */
@@ -23307,6 +23319,10 @@ export declare interface SyntheticHttpMonitorRequest {
23307
23319
  * @defaultValue true
23308
23320
  */
23309
23321
  enabled?: boolean;
23322
+ /**
23323
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
23324
+ */
23325
+ externalId?: string;
23310
23326
  /**
23311
23327
  * The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).
23312
23328
  */
@@ -23392,6 +23408,10 @@ export declare interface SyntheticHttpMonitorResponse {
23392
23408
  * The entity id of the monitor.
23393
23409
  */
23394
23410
  entityId: string;
23411
+ /**
23412
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
23413
+ */
23414
+ externalId?: string;
23395
23415
  /**
23396
23416
  * The frequency of the monitor, in minutes.
23397
23417
  */
@@ -24305,6 +24325,10 @@ export declare interface SyntheticMonitorSummaryDto {
24305
24325
  * The entity id of the monitor.
24306
24326
  */
24307
24327
  entityId: string;
24328
+ /**
24329
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
24330
+ */
24331
+ externalId?: string;
24308
24332
  /**
24309
24333
  * The name of the monitor.
24310
24334
  */
@@ -24340,6 +24364,10 @@ export declare interface SyntheticMultiProtocolMonitorRequest {
24340
24364
  * @defaultValue true
24341
24365
  */
24342
24366
  enabled?: boolean;
24367
+ /**
24368
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
24369
+ */
24370
+ externalId?: string;
24343
24371
  /**
24344
24372
  * The frequency of the monitor, in minutes. Default value depends on the monitor type (1 minute for MULTI_PROTOCOL and HTTP, 15 minutes for BROWSER).
24345
24373
  */
@@ -24409,6 +24437,10 @@ export declare interface SyntheticMultiProtocolMonitorResponse {
24409
24437
  * The entity id of the monitor.
24410
24438
  */
24411
24439
  entityId: string;
24440
+ /**
24441
+ * Stable identifier used by configuration-as-code tools (such as Monaco) to manage this monitor across environments. Unique per environment.
24442
+ */
24443
+ externalId?: string;
24412
24444
  /**
24413
24445
  * The frequency of the monitor, in minutes.
24414
24446
  */
@@ -24570,6 +24602,7 @@ export declare class SyntheticNetworkAvailabilityMonitorsClient {
24570
24602
  * * Monitored host ME ID: `monitoredEntity(HOST-123)`.
24571
24603
  * * Monitor tags: `tag([context]key:value,key:value,key)`. Tags in `[context]key:value`, `key:value`, and `key` formats are detected and parsed automatically. If a key-only tag has a colon (`:`) in it, you must escape the colon with a backslash(`\`). Otherwise, the tag will be parsed as a `key:value tag`. All tag values are case-sensitive. Values listed within a single `tag(...)` are combined with **OR**. To require multiple tags (**AND**), specify several `tag(...)` selectors. For example, `tag(tag-a),tag(tag-b)` matches only monitors that have **both** tags, while `tag(tag-a,tag-b)` matches monitors that have **either**.
24572
24604
  * * Monitor enablement: `enabled(true)`.
24605
+ * * Monaco external ID: `externalId(value1,value2)`
24573
24606
  *
24574
24607
  * To set several criteria, separate them with a comma (`,`).
24575
24608
  * Only results matching **all** criteria are included in the response.