@ignos/api-client 20261109.356.1-alpha → 20261110.358.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/lib/ignosportal-api.d.ts +103 -49
- package/lib/ignosportal-api.js +119 -17
- package/package.json +1 -1
- package/src/ignosportal-api.ts +199 -53
package/lib/ignosportal-api.js
CHANGED
|
@@ -1350,15 +1350,16 @@ 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
|
|
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
|
+
* @param assetExternalId (optional)
|
|
1357
1358
|
*/
|
|
1358
|
-
getMachineUtilizations(
|
|
1359
|
+
getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
|
|
1359
1360
|
let url_ = this.baseUrl + "/machineutilization?";
|
|
1360
|
-
if (
|
|
1361
|
-
url_ += "
|
|
1361
|
+
if (assetId !== undefined && assetId !== null)
|
|
1362
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
1362
1363
|
if (favorites === null)
|
|
1363
1364
|
throw new globalThis.Error("The parameter 'favorites' cannot be null.");
|
|
1364
1365
|
else if (favorites !== undefined)
|
|
@@ -1367,6 +1368,8 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
|
|
|
1367
1368
|
url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
|
|
1368
1369
|
if (utcOffset !== undefined && utcOffset !== null)
|
|
1369
1370
|
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
1371
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
1372
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
1370
1373
|
url_ = url_.replace(/[?&]$/, "");
|
|
1371
1374
|
let options_ = {
|
|
1372
1375
|
method: "GET",
|
|
@@ -1665,8 +1668,10 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
|
|
|
1665
1668
|
}
|
|
1666
1669
|
return Promise.resolve(null);
|
|
1667
1670
|
}
|
|
1668
|
-
listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
|
|
1671
|
+
listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
|
|
1669
1672
|
let url_ = this.baseUrl + "/machineutilization/power-on/datapoints?";
|
|
1673
|
+
if (id !== undefined && id !== null)
|
|
1674
|
+
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
1670
1675
|
if (externalId !== undefined && externalId !== null)
|
|
1671
1676
|
url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
|
|
1672
1677
|
if (nDays !== undefined && nDays !== null)
|
|
@@ -1808,15 +1813,16 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
1808
1813
|
time zone. The current utilization is calculated starting from the start of the current date offset from UTC
|
|
1809
1814
|
by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
|
|
1810
1815
|
client and server
|
|
1811
|
-
* @param
|
|
1816
|
+
* @param assetId (optional)
|
|
1812
1817
|
* @param favorites (optional)
|
|
1813
1818
|
* @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
|
|
1814
1819
|
* @param utcOffset (optional) Explicit UTC offset for start of today's utilization
|
|
1820
|
+
* @param assetExternalId (optional)
|
|
1815
1821
|
*/
|
|
1816
|
-
getResourceUtilizations(
|
|
1822
|
+
getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
|
|
1817
1823
|
let url_ = this.baseUrl + "/resourceutilization?";
|
|
1818
|
-
if (
|
|
1819
|
-
url_ += "
|
|
1824
|
+
if (assetId !== undefined && assetId !== null)
|
|
1825
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
1820
1826
|
if (favorites === null)
|
|
1821
1827
|
throw new globalThis.Error("The parameter 'favorites' cannot be null.");
|
|
1822
1828
|
else if (favorites !== undefined)
|
|
@@ -1825,6 +1831,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
1825
1831
|
url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
|
|
1826
1832
|
if (utcOffset !== undefined && utcOffset !== null)
|
|
1827
1833
|
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
1834
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
1835
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
1828
1836
|
url_ = url_.replace(/[?&]$/, "");
|
|
1829
1837
|
let options_ = {
|
|
1830
1838
|
method: "GET",
|
|
@@ -2075,8 +2083,10 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
2075
2083
|
}
|
|
2076
2084
|
return Promise.resolve(null);
|
|
2077
2085
|
}
|
|
2078
|
-
listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
|
|
2086
|
+
listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
|
|
2079
2087
|
let url_ = this.baseUrl + "/resourceutilization/power-on/datapoints?";
|
|
2088
|
+
if (id !== undefined && id !== null)
|
|
2089
|
+
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
2080
2090
|
if (externalId !== undefined && externalId !== null)
|
|
2081
2091
|
url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
|
|
2082
2092
|
if (nDays !== undefined && nDays !== null)
|
|
@@ -2907,8 +2917,10 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
|
|
|
2907
2917
|
this.http = http ? http : window;
|
|
2908
2918
|
this.baseUrl = baseUrl ?? "";
|
|
2909
2919
|
}
|
|
2910
|
-
getMachineDataHealth(assetExternalId) {
|
|
2920
|
+
getMachineDataHealth(assetId, assetExternalId) {
|
|
2911
2921
|
let url_ = this.baseUrl + "/systemhealthdashboard?";
|
|
2922
|
+
if (assetId !== undefined && assetId !== null)
|
|
2923
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
2912
2924
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
2913
2925
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
2914
2926
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -5069,8 +5081,10 @@ export class KpiResourceClient extends AuthorizedApiBase {
|
|
|
5069
5081
|
}
|
|
5070
5082
|
return Promise.resolve(null);
|
|
5071
5083
|
}
|
|
5072
|
-
getUptimeNormalTrend(assetExternalId, date, utcOffset) {
|
|
5084
|
+
getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
|
|
5073
5085
|
let url_ = this.baseUrl + "/kpiresource/normal-day-trendline?";
|
|
5086
|
+
if (assetId !== undefined && assetId !== null)
|
|
5087
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5074
5088
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
5075
5089
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
5076
5090
|
if (date !== undefined && date !== null)
|
|
@@ -5309,8 +5323,10 @@ export class ResourcesClient extends AuthorizedApiBase {
|
|
|
5309
5323
|
}
|
|
5310
5324
|
return Promise.resolve(null);
|
|
5311
5325
|
}
|
|
5312
|
-
listCurrentMachineStates(assetExternalId) {
|
|
5326
|
+
listCurrentMachineStates(assetId, assetExternalId) {
|
|
5313
5327
|
let url_ = this.baseUrl + "/resources/states/now?";
|
|
5328
|
+
if (assetId !== undefined && assetId !== null)
|
|
5329
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5314
5330
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
5315
5331
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
5316
5332
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -6902,10 +6918,11 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
6902
6918
|
* @param startTime (optional)
|
|
6903
6919
|
* @param endTime (optional)
|
|
6904
6920
|
* @param ianaTimeZone (optional)
|
|
6921
|
+
* @param assetId (optional)
|
|
6905
6922
|
* @param assetExternalId (optional)
|
|
6906
6923
|
* @deprecated
|
|
6907
6924
|
*/
|
|
6908
|
-
getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
|
|
6925
|
+
getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
|
|
6909
6926
|
let url_ = this.baseUrl + "/utilization/datapoints?";
|
|
6910
6927
|
if (utilizationType === null)
|
|
6911
6928
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -6919,6 +6936,8 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
6919
6936
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
6920
6937
|
if (ianaTimeZone !== undefined && ianaTimeZone !== null)
|
|
6921
6938
|
url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
|
|
6939
|
+
if (assetId !== undefined && assetId !== null)
|
|
6940
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
6922
6941
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
6923
6942
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
6924
6943
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -7145,7 +7164,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
7145
7164
|
}
|
|
7146
7165
|
return Promise.resolve(null);
|
|
7147
7166
|
}
|
|
7148
|
-
getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
|
|
7167
|
+
getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetId, assetExternalId) {
|
|
7149
7168
|
let url_ = this.baseUrl + "/pulseutilization/datapoints?";
|
|
7150
7169
|
if (utilizationType === null)
|
|
7151
7170
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -7159,6 +7178,8 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
7159
7178
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
7160
7179
|
if (ianaTimeZone !== undefined && ianaTimeZone !== null)
|
|
7161
7180
|
url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
|
|
7181
|
+
if (assetId !== undefined && assetId !== null)
|
|
7182
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
7162
7183
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
7163
7184
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
7164
7185
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -11765,8 +11786,10 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
11765
11786
|
}
|
|
11766
11787
|
return Promise.resolve(null);
|
|
11767
11788
|
}
|
|
11768
|
-
getUptimeNormalTrend(assetExternalId, date, utcOffset) {
|
|
11789
|
+
getUptimeNormalTrend(assetId, assetExternalId, date, utcOffset) {
|
|
11769
11790
|
let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
|
|
11791
|
+
if (assetId !== undefined && assetId !== null)
|
|
11792
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
11770
11793
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
11771
11794
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
11772
11795
|
if (date !== undefined && date !== null)
|
|
@@ -12005,8 +12028,10 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
12005
12028
|
}
|
|
12006
12029
|
return Promise.resolve(null);
|
|
12007
12030
|
}
|
|
12008
|
-
listCurrentMachineStates(assetExternalId) {
|
|
12031
|
+
listCurrentMachineStates(assetId, assetExternalId) {
|
|
12009
12032
|
let url_ = this.baseUrl + "/machines/states/now?";
|
|
12033
|
+
if (assetId !== undefined && assetId !== null)
|
|
12034
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
12010
12035
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
12011
12036
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
12012
12037
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -26133,6 +26158,44 @@ export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
|
|
|
26133
26158
|
}
|
|
26134
26159
|
return Promise.resolve(null);
|
|
26135
26160
|
}
|
|
26161
|
+
deleteMeasurementFormSchemaFile(id, slot) {
|
|
26162
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files/{slot}";
|
|
26163
|
+
if (id === undefined || id === null)
|
|
26164
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
26165
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
26166
|
+
if (slot === undefined || slot === null)
|
|
26167
|
+
throw new globalThis.Error("The parameter 'slot' must be defined.");
|
|
26168
|
+
url_ = url_.replace("{slot}", encodeURIComponent("" + slot));
|
|
26169
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
26170
|
+
let options_ = {
|
|
26171
|
+
method: "DELETE",
|
|
26172
|
+
headers: {}
|
|
26173
|
+
};
|
|
26174
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
26175
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
26176
|
+
}).then((_response) => {
|
|
26177
|
+
return this.processDeleteMeasurementFormSchemaFile(_response);
|
|
26178
|
+
});
|
|
26179
|
+
}
|
|
26180
|
+
processDeleteMeasurementFormSchemaFile(response) {
|
|
26181
|
+
const status = response.status;
|
|
26182
|
+
let _headers = {};
|
|
26183
|
+
if (response.headers && response.headers.forEach) {
|
|
26184
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
26185
|
+
}
|
|
26186
|
+
;
|
|
26187
|
+
if (status === 204) {
|
|
26188
|
+
return response.text().then((_responseText) => {
|
|
26189
|
+
return;
|
|
26190
|
+
});
|
|
26191
|
+
}
|
|
26192
|
+
else if (status !== 200 && status !== 204) {
|
|
26193
|
+
return response.text().then((_responseText) => {
|
|
26194
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
26195
|
+
});
|
|
26196
|
+
}
|
|
26197
|
+
return Promise.resolve(null);
|
|
26198
|
+
}
|
|
26136
26199
|
getMeasurementFormImportStatus(id) {
|
|
26137
26200
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/importstatus";
|
|
26138
26201
|
if (id === undefined || id === null)
|
|
@@ -27869,6 +27932,45 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27869
27932
|
}
|
|
27870
27933
|
return Promise.resolve(null);
|
|
27871
27934
|
}
|
|
27935
|
+
listMeasurementFormSchemaFiles(id) {
|
|
27936
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files";
|
|
27937
|
+
if (id === undefined || id === null)
|
|
27938
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
27939
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
27940
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
27941
|
+
let options_ = {
|
|
27942
|
+
method: "GET",
|
|
27943
|
+
headers: {
|
|
27944
|
+
"Accept": "application/json"
|
|
27945
|
+
}
|
|
27946
|
+
};
|
|
27947
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
27948
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
27949
|
+
}).then((_response) => {
|
|
27950
|
+
return this.processListMeasurementFormSchemaFiles(_response);
|
|
27951
|
+
});
|
|
27952
|
+
}
|
|
27953
|
+
processListMeasurementFormSchemaFiles(response) {
|
|
27954
|
+
const status = response.status;
|
|
27955
|
+
let _headers = {};
|
|
27956
|
+
if (response.headers && response.headers.forEach) {
|
|
27957
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
27958
|
+
}
|
|
27959
|
+
;
|
|
27960
|
+
if (status === 200) {
|
|
27961
|
+
return response.text().then((_responseText) => {
|
|
27962
|
+
let result200 = null;
|
|
27963
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
27964
|
+
return result200;
|
|
27965
|
+
});
|
|
27966
|
+
}
|
|
27967
|
+
else if (status !== 200 && status !== 204) {
|
|
27968
|
+
return response.text().then((_responseText) => {
|
|
27969
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
27970
|
+
});
|
|
27971
|
+
}
|
|
27972
|
+
return Promise.resolve(null);
|
|
27973
|
+
}
|
|
27872
27974
|
listMeasurementFormSchemaVersions(id) {
|
|
27873
27975
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
|
|
27874
27976
|
if (id === undefined || id === null)
|