@ignos/api-client 20261106.349.1-alpha → 20261106.350.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.
@@ -1350,15 +1350,15 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1350
1350
  time zone. The current utilization is calculated starting from the start of the current date offset from UTC
1351
1351
  by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
1352
1352
  client and server
1353
- * @param assetExternalId (optional)
1353
+ * @param assetId (optional)
1354
1354
  * @param favorites (optional)
1355
1355
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1356
1356
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1357
1357
  */
1358
- getMachineUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
1358
+ getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1359
1359
  let url_ = this.baseUrl + "/machineutilization?";
1360
- if (assetExternalId !== undefined && assetExternalId !== null)
1361
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1360
+ if (assetId !== undefined && assetId !== null)
1361
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
1362
1362
  if (favorites === null)
1363
1363
  throw new globalThis.Error("The parameter 'favorites' cannot be null.");
1364
1364
  else if (favorites !== undefined)
@@ -1665,8 +1665,10 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1665
1665
  }
1666
1666
  return Promise.resolve(null);
1667
1667
  }
1668
- listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
1668
+ listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
1669
1669
  let url_ = this.baseUrl + "/machineutilization/power-on/datapoints?";
1670
+ if (id !== undefined && id !== null)
1671
+ url_ += "id=" + encodeURIComponent("" + id) + "&";
1670
1672
  if (externalId !== undefined && externalId !== null)
1671
1673
  url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
1672
1674
  if (nDays !== undefined && nDays !== null)
@@ -1808,15 +1810,15 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1808
1810
  time zone. The current utilization is calculated starting from the start of the current date offset from UTC
1809
1811
  by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
1810
1812
  client and server
1811
- * @param assetExternalId (optional)
1813
+ * @param assetId (optional)
1812
1814
  * @param favorites (optional)
1813
1815
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1814
1816
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1815
1817
  */
1816
- getResourceUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
1818
+ getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1817
1819
  let url_ = this.baseUrl + "/resourceutilization?";
1818
- if (assetExternalId !== undefined && assetExternalId !== null)
1819
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1820
+ if (assetId !== undefined && assetId !== null)
1821
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
1820
1822
  if (favorites === null)
1821
1823
  throw new globalThis.Error("The parameter 'favorites' cannot be null.");
1822
1824
  else if (favorites !== undefined)
@@ -2075,8 +2077,10 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
2075
2077
  }
2076
2078
  return Promise.resolve(null);
2077
2079
  }
2078
- listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
2080
+ listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
2079
2081
  let url_ = this.baseUrl + "/resourceutilization/power-on/datapoints?";
2082
+ if (id !== undefined && id !== null)
2083
+ url_ += "id=" + encodeURIComponent("" + id) + "&";
2080
2084
  if (externalId !== undefined && externalId !== null)
2081
2085
  url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
2082
2086
  if (nDays !== undefined && nDays !== null)
@@ -2907,10 +2911,10 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
2907
2911
  this.http = http ? http : window;
2908
2912
  this.baseUrl = baseUrl ?? "";
2909
2913
  }
2910
- getMachineDataHealth(assetExternalId) {
2914
+ getMachineDataHealth(assetId) {
2911
2915
  let url_ = this.baseUrl + "/systemhealthdashboard?";
2912
- if (assetExternalId !== undefined && assetExternalId !== null)
2913
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
2916
+ if (assetId !== undefined && assetId !== null)
2917
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
2914
2918
  url_ = url_.replace(/[?&]$/, "");
2915
2919
  let options_ = {
2916
2920
  method: "GET",
@@ -5069,8 +5073,10 @@ export class KpiResourceClient extends AuthorizedApiBase {
5069
5073
  }
5070
5074
  return Promise.resolve(null);
5071
5075
  }
5072
- getUptimeNormalTrend(assetExternalId, date, utcOffset) {
5076
+ getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
5073
5077
  let url_ = this.baseUrl + "/kpiresource/normal-day-trendline?";
5078
+ if (assetId !== undefined && assetId !== null)
5079
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5074
5080
  if (assetExternalId !== undefined && assetExternalId !== null)
5075
5081
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5076
5082
  if (date !== undefined && date !== null)
@@ -5309,10 +5315,10 @@ export class ResourcesClient extends AuthorizedApiBase {
5309
5315
  }
5310
5316
  return Promise.resolve(null);
5311
5317
  }
5312
- listCurrentMachineStates(assetExternalId) {
5318
+ listCurrentMachineStates(assetId) {
5313
5319
  let url_ = this.baseUrl + "/resources/states/now?";
5314
- if (assetExternalId !== undefined && assetExternalId !== null)
5315
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5320
+ if (assetId !== undefined && assetId !== null)
5321
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5316
5322
  url_ = url_.replace(/[?&]$/, "");
5317
5323
  let options_ = {
5318
5324
  method: "GET",
@@ -6902,10 +6908,11 @@ export class UtilizationClient extends AuthorizedApiBase {
6902
6908
  * @param startTime (optional)
6903
6909
  * @param endTime (optional)
6904
6910
  * @param ianaTimeZone (optional)
6911
+ * @param assetId (optional)
6905
6912
  * @param assetExternalId (optional)
6906
6913
  * @deprecated
6907
6914
  */
6908
- getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
6915
+ getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
6909
6916
  let url_ = this.baseUrl + "/utilization/datapoints?";
6910
6917
  if (utilizationType === null)
6911
6918
  throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
@@ -6919,6 +6926,8 @@ export class UtilizationClient extends AuthorizedApiBase {
6919
6926
  url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
6920
6927
  if (ianaTimeZone !== undefined && ianaTimeZone !== null)
6921
6928
  url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
6929
+ if (assetId !== undefined && assetId !== null)
6930
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
6922
6931
  if (assetExternalId !== undefined && assetExternalId !== null)
6923
6932
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
6924
6933
  url_ = url_.replace(/[?&]$/, "");
@@ -7145,7 +7154,7 @@ export class UtilizationClient extends AuthorizedApiBase {
7145
7154
  }
7146
7155
  return Promise.resolve(null);
7147
7156
  }
7148
- getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
7157
+ getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
7149
7158
  let url_ = this.baseUrl + "/pulseutilization/datapoints?";
7150
7159
  if (utilizationType === null)
7151
7160
  throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
@@ -7159,6 +7168,8 @@ export class UtilizationClient extends AuthorizedApiBase {
7159
7168
  url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
7160
7169
  if (ianaTimeZone !== undefined && ianaTimeZone !== null)
7161
7170
  url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
7171
+ if (assetId !== undefined && assetId !== null)
7172
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
7162
7173
  if (assetExternalId !== undefined && assetExternalId !== null)
7163
7174
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
7164
7175
  url_ = url_.replace(/[?&]$/, "");
@@ -11765,8 +11776,10 @@ export class KpiClient extends AuthorizedApiBase {
11765
11776
  }
11766
11777
  return Promise.resolve(null);
11767
11778
  }
11768
- getUptimeNormalTrend(assetExternalId, date, utcOffset) {
11779
+ getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
11769
11780
  let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
11781
+ if (assetId !== undefined && assetId !== null)
11782
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
11770
11783
  if (assetExternalId !== undefined && assetExternalId !== null)
11771
11784
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
11772
11785
  if (date !== undefined && date !== null)
@@ -12005,10 +12018,10 @@ export class MachinesClient extends AuthorizedApiBase {
12005
12018
  }
12006
12019
  return Promise.resolve(null);
12007
12020
  }
12008
- listCurrentMachineStates(assetExternalId) {
12021
+ listCurrentMachineStates(assetId) {
12009
12022
  let url_ = this.baseUrl + "/machines/states/now?";
12010
- if (assetExternalId !== undefined && assetExternalId !== null)
12011
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
12023
+ if (assetId !== undefined && assetId !== null)
12024
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
12012
12025
  url_ = url_.replace(/[?&]$/, "");
12013
12026
  let options_ = {
12014
12027
  method: "GET",
@@ -12638,11 +12651,11 @@ export class MachineDataClient extends AuthorizedApiBase {
12638
12651
  this.http = http ? http : window;
12639
12652
  this.baseUrl = baseUrl ?? "";
12640
12653
  }
12641
- getLiveMachineData(assetExternalId, externalIds) {
12642
- let url_ = this.baseUrl + "/machinedata/{assetExternalId}/live-machinedata?";
12643
- if (assetExternalId === undefined || assetExternalId === null)
12644
- throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
12645
- url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
12654
+ getLiveMachineData(assetId, externalIds) {
12655
+ let url_ = this.baseUrl + "/machinedata/{assetId}/live-machinedata?";
12656
+ if (assetId === undefined || assetId === null)
12657
+ throw new globalThis.Error("The parameter 'assetId' must be defined.");
12658
+ url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
12646
12659
  if (externalIds === null)
12647
12660
  throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
12648
12661
  else if (externalIds !== undefined)
@@ -12681,11 +12694,11 @@ export class MachineDataClient extends AuthorizedApiBase {
12681
12694
  }
12682
12695
  return Promise.resolve(null);
12683
12696
  }
12684
- getTimeseriesGraph(assetExternalId, externalIds, startTime, endTime) {
12685
- let url_ = this.baseUrl + "/machinedata/{assetExternalId}/timeseries-graph?";
12686
- if (assetExternalId === undefined || assetExternalId === null)
12687
- throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
12688
- url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
12697
+ getTimeseriesGraph(assetId, externalIds, startTime, endTime) {
12698
+ let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph?";
12699
+ if (assetId === undefined || assetId === null)
12700
+ throw new globalThis.Error("The parameter 'assetId' must be defined.");
12701
+ url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
12689
12702
  if (externalIds === null)
12690
12703
  throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
12691
12704
  else if (externalIds !== undefined)
@@ -12732,11 +12745,11 @@ export class MachineDataClient extends AuthorizedApiBase {
12732
12745
  }
12733
12746
  return Promise.resolve(null);
12734
12747
  }
12735
- exportTimeseriesGraph(assetExternalId, request) {
12736
- let url_ = this.baseUrl + "/machinedata/{assetExternalId}/timeseries-graph/export-csv";
12737
- if (assetExternalId === undefined || assetExternalId === null)
12738
- throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
12739
- url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
12748
+ exportTimeseriesGraph(assetId, request) {
12749
+ let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph/export-csv";
12750
+ if (assetId === undefined || assetId === null)
12751
+ throw new globalThis.Error("The parameter 'assetId' must be defined.");
12752
+ url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
12740
12753
  url_ = url_.replace(/[?&]$/, "");
12741
12754
  const content_ = JSON.stringify(request);
12742
12755
  let options_ = {
@@ -12896,6 +12909,47 @@ export class LinksClient extends AuthorizedApiBase {
12896
12909
  }
12897
12910
  return Promise.resolve(null);
12898
12911
  }
12912
+ moveLink(id, scope, request) {
12913
+ let url_ = this.baseUrl + "/links/{id}/move?";
12914
+ if (id === undefined || id === null)
12915
+ throw new globalThis.Error("The parameter 'id' must be defined.");
12916
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
12917
+ if (scope !== undefined && scope !== null)
12918
+ url_ += "scope=" + encodeURIComponent("" + scope) + "&";
12919
+ url_ = url_.replace(/[?&]$/, "");
12920
+ const content_ = JSON.stringify(request);
12921
+ let options_ = {
12922
+ body: content_,
12923
+ method: "POST",
12924
+ headers: {
12925
+ "Content-Type": "application/json",
12926
+ }
12927
+ };
12928
+ return this.transformOptions(options_).then(transformedOptions_ => {
12929
+ return this.http.fetch(url_, transformedOptions_);
12930
+ }).then((_response) => {
12931
+ return this.processMoveLink(_response);
12932
+ });
12933
+ }
12934
+ processMoveLink(response) {
12935
+ const status = response.status;
12936
+ let _headers = {};
12937
+ if (response.headers && response.headers.forEach) {
12938
+ response.headers.forEach((v, k) => _headers[k] = v);
12939
+ }
12940
+ ;
12941
+ if (status === 204) {
12942
+ return response.text().then((_responseText) => {
12943
+ return;
12944
+ });
12945
+ }
12946
+ else if (status !== 200 && status !== 204) {
12947
+ return response.text().then((_responseText) => {
12948
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
12949
+ });
12950
+ }
12951
+ return Promise.resolve(null);
12952
+ }
12899
12953
  deleteLink(id, scope) {
12900
12954
  let url_ = this.baseUrl + "/links/{id}?";
12901
12955
  if (id === undefined || id === null)
@@ -18432,55 +18486,6 @@ export class CdfClient extends AuthorizedApiBase {
18432
18486
  return Promise.resolve(null);
18433
18487
  }
18434
18488
  }
18435
- export class WorkspaceMigrationAdminClient extends AuthorizedApiBase {
18436
- http;
18437
- baseUrl;
18438
- constructor(configuration, baseUrl, http) {
18439
- super(configuration);
18440
- this.http = http ? http : window;
18441
- this.baseUrl = baseUrl ?? "";
18442
- }
18443
- migrateAssetIds(dryRun) {
18444
- let url_ = this.baseUrl + "/admin/workspaces/migrate-asset-ids?";
18445
- if (dryRun === null)
18446
- throw new globalThis.Error("The parameter 'dryRun' cannot be null.");
18447
- else if (dryRun !== undefined)
18448
- url_ += "dryRun=" + encodeURIComponent("" + dryRun) + "&";
18449
- url_ = url_.replace(/[?&]$/, "");
18450
- let options_ = {
18451
- method: "POST",
18452
- headers: {
18453
- "Accept": "application/json"
18454
- }
18455
- };
18456
- return this.transformOptions(options_).then(transformedOptions_ => {
18457
- return this.http.fetch(url_, transformedOptions_);
18458
- }).then((_response) => {
18459
- return this.processMigrateAssetIds(_response);
18460
- });
18461
- }
18462
- processMigrateAssetIds(response) {
18463
- const status = response.status;
18464
- let _headers = {};
18465
- if (response.headers && response.headers.forEach) {
18466
- response.headers.forEach((v, k) => _headers[k] = v);
18467
- }
18468
- ;
18469
- if (status === 200) {
18470
- return response.text().then((_responseText) => {
18471
- let result200 = null;
18472
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
18473
- return result200;
18474
- });
18475
- }
18476
- else if (status !== 200 && status !== 204) {
18477
- return response.text().then((_responseText) => {
18478
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
18479
- });
18480
- }
18481
- return Promise.resolve(null);
18482
- }
18483
- }
18484
18489
  export class WorkspaceDefaultsAdminClient extends AuthorizedApiBase {
18485
18490
  http;
18486
18491
  baseUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261106.349.1-alpha",
3
+ "version": "20261106.350.1",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",