@ignos/api-client 20261109.354.1 → 20261109.356.1-alpha

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 assetId (optional)
1353
+ * @param assetExternalId (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(assetId, favorites, startTimeToday, utcOffset) {
1358
+ getMachineUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
1359
1359
  let url_ = this.baseUrl + "/machineutilization?";
1360
- if (assetId !== undefined && assetId !== null)
1361
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
1360
+ if (assetExternalId !== undefined && assetExternalId !== null)
1361
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1362
1362
  if (favorites === null)
1363
1363
  throw new globalThis.Error("The parameter 'favorites' cannot be null.");
1364
1364
  else if (favorites !== undefined)
@@ -1665,10 +1665,8 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1665
1665
  }
1666
1666
  return Promise.resolve(null);
1667
1667
  }
1668
- listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
1668
+ listPowerOnUtilizationDatapoints(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) + "&";
1672
1670
  if (externalId !== undefined && externalId !== null)
1673
1671
  url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
1674
1672
  if (nDays !== undefined && nDays !== null)
@@ -1810,15 +1808,15 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1810
1808
  time zone. The current utilization is calculated starting from the start of the current date offset from UTC
1811
1809
  by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
1812
1810
  client and server
1813
- * @param assetId (optional)
1811
+ * @param assetExternalId (optional)
1814
1812
  * @param favorites (optional)
1815
1813
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1816
1814
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1817
1815
  */
1818
- getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1816
+ getResourceUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
1819
1817
  let url_ = this.baseUrl + "/resourceutilization?";
1820
- if (assetId !== undefined && assetId !== null)
1821
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
1818
+ if (assetExternalId !== undefined && assetExternalId !== null)
1819
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1822
1820
  if (favorites === null)
1823
1821
  throw new globalThis.Error("The parameter 'favorites' cannot be null.");
1824
1822
  else if (favorites !== undefined)
@@ -2077,10 +2075,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
2077
2075
  }
2078
2076
  return Promise.resolve(null);
2079
2077
  }
2080
- listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
2078
+ listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
2081
2079
  let url_ = this.baseUrl + "/resourceutilization/power-on/datapoints?";
2082
- if (id !== undefined && id !== null)
2083
- url_ += "id=" + encodeURIComponent("" + id) + "&";
2084
2080
  if (externalId !== undefined && externalId !== null)
2085
2081
  url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
2086
2082
  if (nDays !== undefined && nDays !== null)
@@ -2911,10 +2907,10 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
2911
2907
  this.http = http ? http : window;
2912
2908
  this.baseUrl = baseUrl ?? "";
2913
2909
  }
2914
- getMachineDataHealth(assetId) {
2910
+ getMachineDataHealth(assetExternalId) {
2915
2911
  let url_ = this.baseUrl + "/systemhealthdashboard?";
2916
- if (assetId !== undefined && assetId !== null)
2917
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
2912
+ if (assetExternalId !== undefined && assetExternalId !== null)
2913
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
2918
2914
  url_ = url_.replace(/[?&]$/, "");
2919
2915
  let options_ = {
2920
2916
  method: "GET",
@@ -5073,10 +5069,8 @@ export class KpiResourceClient extends AuthorizedApiBase {
5073
5069
  }
5074
5070
  return Promise.resolve(null);
5075
5071
  }
5076
- getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
5072
+ getUptimeNormalTrend(assetExternalId, date, utcOffset) {
5077
5073
  let url_ = this.baseUrl + "/kpiresource/normal-day-trendline?";
5078
- if (assetId !== undefined && assetId !== null)
5079
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5080
5074
  if (assetExternalId !== undefined && assetExternalId !== null)
5081
5075
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5082
5076
  if (date !== undefined && date !== null)
@@ -5315,10 +5309,10 @@ export class ResourcesClient extends AuthorizedApiBase {
5315
5309
  }
5316
5310
  return Promise.resolve(null);
5317
5311
  }
5318
- listCurrentMachineStates(assetId) {
5312
+ listCurrentMachineStates(assetExternalId) {
5319
5313
  let url_ = this.baseUrl + "/resources/states/now?";
5320
- if (assetId !== undefined && assetId !== null)
5321
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5314
+ if (assetExternalId !== undefined && assetExternalId !== null)
5315
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5322
5316
  url_ = url_.replace(/[?&]$/, "");
5323
5317
  let options_ = {
5324
5318
  method: "GET",
@@ -6908,11 +6902,10 @@ export class UtilizationClient extends AuthorizedApiBase {
6908
6902
  * @param startTime (optional)
6909
6903
  * @param endTime (optional)
6910
6904
  * @param ianaTimeZone (optional)
6911
- * @param assetId (optional)
6912
6905
  * @param assetExternalId (optional)
6913
6906
  * @deprecated
6914
6907
  */
6915
- getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
6908
+ getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
6916
6909
  let url_ = this.baseUrl + "/utilization/datapoints?";
6917
6910
  if (utilizationType === null)
6918
6911
  throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
@@ -6926,8 +6919,6 @@ export class UtilizationClient extends AuthorizedApiBase {
6926
6919
  url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
6927
6920
  if (ianaTimeZone !== undefined && ianaTimeZone !== null)
6928
6921
  url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
6929
- if (assetId !== undefined && assetId !== null)
6930
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
6931
6922
  if (assetExternalId !== undefined && assetExternalId !== null)
6932
6923
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
6933
6924
  url_ = url_.replace(/[?&]$/, "");
@@ -7154,7 +7145,7 @@ export class UtilizationClient extends AuthorizedApiBase {
7154
7145
  }
7155
7146
  return Promise.resolve(null);
7156
7147
  }
7157
- getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
7148
+ getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
7158
7149
  let url_ = this.baseUrl + "/pulseutilization/datapoints?";
7159
7150
  if (utilizationType === null)
7160
7151
  throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
@@ -7168,8 +7159,6 @@ export class UtilizationClient extends AuthorizedApiBase {
7168
7159
  url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
7169
7160
  if (ianaTimeZone !== undefined && ianaTimeZone !== null)
7170
7161
  url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
7171
- if (assetId !== undefined && assetId !== null)
7172
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
7173
7162
  if (assetExternalId !== undefined && assetExternalId !== null)
7174
7163
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
7175
7164
  url_ = url_.replace(/[?&]$/, "");
@@ -11776,10 +11765,8 @@ export class KpiClient extends AuthorizedApiBase {
11776
11765
  }
11777
11766
  return Promise.resolve(null);
11778
11767
  }
11779
- getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
11768
+ getUptimeNormalTrend(assetExternalId, date, utcOffset) {
11780
11769
  let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
11781
- if (assetId !== undefined && assetId !== null)
11782
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
11783
11770
  if (assetExternalId !== undefined && assetExternalId !== null)
11784
11771
  url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
11785
11772
  if (date !== undefined && date !== null)
@@ -12018,10 +12005,10 @@ export class MachinesClient extends AuthorizedApiBase {
12018
12005
  }
12019
12006
  return Promise.resolve(null);
12020
12007
  }
12021
- listCurrentMachineStates(assetId) {
12008
+ listCurrentMachineStates(assetExternalId) {
12022
12009
  let url_ = this.baseUrl + "/machines/states/now?";
12023
- if (assetId !== undefined && assetId !== null)
12024
- url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
12010
+ if (assetExternalId !== undefined && assetExternalId !== null)
12011
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
12025
12012
  url_ = url_.replace(/[?&]$/, "");
12026
12013
  let options_ = {
12027
12014
  method: "GET",
@@ -26146,44 +26133,6 @@ export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
26146
26133
  }
26147
26134
  return Promise.resolve(null);
26148
26135
  }
26149
- deleteMeasurementFormSchemaFile(id, slot) {
26150
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files/{slot}";
26151
- if (id === undefined || id === null)
26152
- throw new globalThis.Error("The parameter 'id' must be defined.");
26153
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
26154
- if (slot === undefined || slot === null)
26155
- throw new globalThis.Error("The parameter 'slot' must be defined.");
26156
- url_ = url_.replace("{slot}", encodeURIComponent("" + slot));
26157
- url_ = url_.replace(/[?&]$/, "");
26158
- let options_ = {
26159
- method: "DELETE",
26160
- headers: {}
26161
- };
26162
- return this.transformOptions(options_).then(transformedOptions_ => {
26163
- return this.http.fetch(url_, transformedOptions_);
26164
- }).then((_response) => {
26165
- return this.processDeleteMeasurementFormSchemaFile(_response);
26166
- });
26167
- }
26168
- processDeleteMeasurementFormSchemaFile(response) {
26169
- const status = response.status;
26170
- let _headers = {};
26171
- if (response.headers && response.headers.forEach) {
26172
- response.headers.forEach((v, k) => _headers[k] = v);
26173
- }
26174
- ;
26175
- if (status === 204) {
26176
- return response.text().then((_responseText) => {
26177
- return;
26178
- });
26179
- }
26180
- else if (status !== 200 && status !== 204) {
26181
- return response.text().then((_responseText) => {
26182
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
26183
- });
26184
- }
26185
- return Promise.resolve(null);
26186
- }
26187
26136
  getMeasurementFormImportStatus(id) {
26188
26137
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/importstatus";
26189
26138
  if (id === undefined || id === null)
@@ -27920,45 +27869,6 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
27920
27869
  }
27921
27870
  return Promise.resolve(null);
27922
27871
  }
27923
- listMeasurementFormSchemaFiles(id) {
27924
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files";
27925
- if (id === undefined || id === null)
27926
- throw new globalThis.Error("The parameter 'id' must be defined.");
27927
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
27928
- url_ = url_.replace(/[?&]$/, "");
27929
- let options_ = {
27930
- method: "GET",
27931
- headers: {
27932
- "Accept": "application/json"
27933
- }
27934
- };
27935
- return this.transformOptions(options_).then(transformedOptions_ => {
27936
- return this.http.fetch(url_, transformedOptions_);
27937
- }).then((_response) => {
27938
- return this.processListMeasurementFormSchemaFiles(_response);
27939
- });
27940
- }
27941
- processListMeasurementFormSchemaFiles(response) {
27942
- const status = response.status;
27943
- let _headers = {};
27944
- if (response.headers && response.headers.forEach) {
27945
- response.headers.forEach((v, k) => _headers[k] = v);
27946
- }
27947
- ;
27948
- if (status === 200) {
27949
- return response.text().then((_responseText) => {
27950
- let result200 = null;
27951
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
27952
- return result200;
27953
- });
27954
- }
27955
- else if (status !== 200 && status !== 204) {
27956
- return response.text().then((_responseText) => {
27957
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
27958
- });
27959
- }
27960
- return Promise.resolve(null);
27961
- }
27962
27872
  listMeasurementFormSchemaVersions(id) {
27963
27873
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
27964
27874
  if (id === undefined || id === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261109.354.1",
3
+ "version": "20261109.356.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",