@ignos/api-client 20261110.361.1-alpha → 20261111.363.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 +120 -67
- package/lib/ignosportal-api.js +166 -5
- package/package.json +1 -1
- package/src/ignosportal-api.ts +277 -67
package/lib/ignosportal-api.js
CHANGED
|
@@ -1354,8 +1354,9 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
|
|
|
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(assetId, favorites, startTimeToday, utcOffset) {
|
|
1359
|
+
getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
|
|
1359
1360
|
let url_ = this.baseUrl + "/machineutilization?";
|
|
1360
1361
|
if (assetId !== undefined && assetId !== null)
|
|
1361
1362
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
@@ -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",
|
|
@@ -1814,8 +1817,9 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
1814
1817
|
* @param favorites (optional)
|
|
1815
1818
|
* @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
|
|
1816
1819
|
* @param utcOffset (optional) Explicit UTC offset for start of today's utilization
|
|
1820
|
+
* @param assetExternalId (optional)
|
|
1817
1821
|
*/
|
|
1818
|
-
getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset) {
|
|
1822
|
+
getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
|
|
1819
1823
|
let url_ = this.baseUrl + "/resourceutilization?";
|
|
1820
1824
|
if (assetId !== undefined && assetId !== null)
|
|
1821
1825
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
@@ -1827,6 +1831,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
1827
1831
|
url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
|
|
1828
1832
|
if (utcOffset !== undefined && utcOffset !== null)
|
|
1829
1833
|
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
1834
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
1835
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
1830
1836
|
url_ = url_.replace(/[?&]$/, "");
|
|
1831
1837
|
let options_ = {
|
|
1832
1838
|
method: "GET",
|
|
@@ -2818,6 +2824,78 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
2818
2824
|
}
|
|
2819
2825
|
return Promise.resolve(null);
|
|
2820
2826
|
}
|
|
2827
|
+
getFavoriteRoutesUserSettings() {
|
|
2828
|
+
let url_ = this.baseUrl + "/userappsettings/favorite-routes";
|
|
2829
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2830
|
+
let options_ = {
|
|
2831
|
+
method: "GET",
|
|
2832
|
+
headers: {
|
|
2833
|
+
"Accept": "application/json"
|
|
2834
|
+
}
|
|
2835
|
+
};
|
|
2836
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2837
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
2838
|
+
}).then((_response) => {
|
|
2839
|
+
return this.processGetFavoriteRoutesUserSettings(_response);
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
processGetFavoriteRoutesUserSettings(response) {
|
|
2843
|
+
const status = response.status;
|
|
2844
|
+
let _headers = {};
|
|
2845
|
+
if (response.headers && response.headers.forEach) {
|
|
2846
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
2847
|
+
}
|
|
2848
|
+
;
|
|
2849
|
+
if (status === 200) {
|
|
2850
|
+
return response.text().then((_responseText) => {
|
|
2851
|
+
let result200 = null;
|
|
2852
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
2853
|
+
return result200;
|
|
2854
|
+
});
|
|
2855
|
+
}
|
|
2856
|
+
else if (status !== 200 && status !== 204) {
|
|
2857
|
+
return response.text().then((_responseText) => {
|
|
2858
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2859
|
+
});
|
|
2860
|
+
}
|
|
2861
|
+
return Promise.resolve(null);
|
|
2862
|
+
}
|
|
2863
|
+
setFavoriteRoutesUserSettings(settings) {
|
|
2864
|
+
let url_ = this.baseUrl + "/userappsettings/favorite-routes";
|
|
2865
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2866
|
+
const content_ = JSON.stringify(settings);
|
|
2867
|
+
let options_ = {
|
|
2868
|
+
body: content_,
|
|
2869
|
+
method: "PUT",
|
|
2870
|
+
headers: {
|
|
2871
|
+
"Content-Type": "application/json",
|
|
2872
|
+
}
|
|
2873
|
+
};
|
|
2874
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2875
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
2876
|
+
}).then((_response) => {
|
|
2877
|
+
return this.processSetFavoriteRoutesUserSettings(_response);
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
processSetFavoriteRoutesUserSettings(response) {
|
|
2881
|
+
const status = response.status;
|
|
2882
|
+
let _headers = {};
|
|
2883
|
+
if (response.headers && response.headers.forEach) {
|
|
2884
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
2885
|
+
}
|
|
2886
|
+
;
|
|
2887
|
+
if (status === 204) {
|
|
2888
|
+
return response.text().then((_responseText) => {
|
|
2889
|
+
return;
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
else if (status !== 200 && status !== 204) {
|
|
2893
|
+
return response.text().then((_responseText) => {
|
|
2894
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2895
|
+
});
|
|
2896
|
+
}
|
|
2897
|
+
return Promise.resolve(null);
|
|
2898
|
+
}
|
|
2821
2899
|
}
|
|
2822
2900
|
export class UploadClient extends AuthorizedApiBase {
|
|
2823
2901
|
http;
|
|
@@ -2911,10 +2989,12 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
|
|
|
2911
2989
|
this.http = http ? http : window;
|
|
2912
2990
|
this.baseUrl = baseUrl ?? "";
|
|
2913
2991
|
}
|
|
2914
|
-
getMachineDataHealth(assetId) {
|
|
2992
|
+
getMachineDataHealth(assetId, assetExternalId) {
|
|
2915
2993
|
let url_ = this.baseUrl + "/systemhealthdashboard?";
|
|
2916
2994
|
if (assetId !== undefined && assetId !== null)
|
|
2917
2995
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
2996
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
2997
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
2918
2998
|
url_ = url_.replace(/[?&]$/, "");
|
|
2919
2999
|
let options_ = {
|
|
2920
3000
|
method: "GET",
|
|
@@ -5315,10 +5395,12 @@ export class ResourcesClient extends AuthorizedApiBase {
|
|
|
5315
5395
|
}
|
|
5316
5396
|
return Promise.resolve(null);
|
|
5317
5397
|
}
|
|
5318
|
-
listCurrentMachineStates(assetId) {
|
|
5398
|
+
listCurrentMachineStates(assetId, assetExternalId) {
|
|
5319
5399
|
let url_ = this.baseUrl + "/resources/states/now?";
|
|
5320
5400
|
if (assetId !== undefined && assetId !== null)
|
|
5321
5401
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5402
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
5403
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
5322
5404
|
url_ = url_.replace(/[?&]$/, "");
|
|
5323
5405
|
let options_ = {
|
|
5324
5406
|
method: "GET",
|
|
@@ -12200,10 +12282,12 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
12200
12282
|
}
|
|
12201
12283
|
return Promise.resolve(null);
|
|
12202
12284
|
}
|
|
12203
|
-
listCurrentMachineStates(assetId) {
|
|
12285
|
+
listCurrentMachineStates(assetId, assetExternalId) {
|
|
12204
12286
|
let url_ = this.baseUrl + "/machines/states/now?";
|
|
12205
12287
|
if (assetId !== undefined && assetId !== null)
|
|
12206
12288
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
12289
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
12290
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
12207
12291
|
url_ = url_.replace(/[?&]$/, "");
|
|
12208
12292
|
let options_ = {
|
|
12209
12293
|
method: "GET",
|
|
@@ -26328,6 +26412,44 @@ export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
|
|
|
26328
26412
|
}
|
|
26329
26413
|
return Promise.resolve(null);
|
|
26330
26414
|
}
|
|
26415
|
+
deleteMeasurementFormSchemaFile(id, slot) {
|
|
26416
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files/{slot}";
|
|
26417
|
+
if (id === undefined || id === null)
|
|
26418
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
26419
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
26420
|
+
if (slot === undefined || slot === null)
|
|
26421
|
+
throw new globalThis.Error("The parameter 'slot' must be defined.");
|
|
26422
|
+
url_ = url_.replace("{slot}", encodeURIComponent("" + slot));
|
|
26423
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
26424
|
+
let options_ = {
|
|
26425
|
+
method: "DELETE",
|
|
26426
|
+
headers: {}
|
|
26427
|
+
};
|
|
26428
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
26429
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
26430
|
+
}).then((_response) => {
|
|
26431
|
+
return this.processDeleteMeasurementFormSchemaFile(_response);
|
|
26432
|
+
});
|
|
26433
|
+
}
|
|
26434
|
+
processDeleteMeasurementFormSchemaFile(response) {
|
|
26435
|
+
const status = response.status;
|
|
26436
|
+
let _headers = {};
|
|
26437
|
+
if (response.headers && response.headers.forEach) {
|
|
26438
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
26439
|
+
}
|
|
26440
|
+
;
|
|
26441
|
+
if (status === 204) {
|
|
26442
|
+
return response.text().then((_responseText) => {
|
|
26443
|
+
return;
|
|
26444
|
+
});
|
|
26445
|
+
}
|
|
26446
|
+
else if (status !== 200 && status !== 204) {
|
|
26447
|
+
return response.text().then((_responseText) => {
|
|
26448
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
26449
|
+
});
|
|
26450
|
+
}
|
|
26451
|
+
return Promise.resolve(null);
|
|
26452
|
+
}
|
|
26331
26453
|
getMeasurementFormImportStatus(id) {
|
|
26332
26454
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/importstatus";
|
|
26333
26455
|
if (id === undefined || id === null)
|
|
@@ -28064,6 +28186,45 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
28064
28186
|
}
|
|
28065
28187
|
return Promise.resolve(null);
|
|
28066
28188
|
}
|
|
28189
|
+
listMeasurementFormSchemaFiles(id) {
|
|
28190
|
+
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files";
|
|
28191
|
+
if (id === undefined || id === null)
|
|
28192
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
28193
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
28194
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
28195
|
+
let options_ = {
|
|
28196
|
+
method: "GET",
|
|
28197
|
+
headers: {
|
|
28198
|
+
"Accept": "application/json"
|
|
28199
|
+
}
|
|
28200
|
+
};
|
|
28201
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
28202
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
28203
|
+
}).then((_response) => {
|
|
28204
|
+
return this.processListMeasurementFormSchemaFiles(_response);
|
|
28205
|
+
});
|
|
28206
|
+
}
|
|
28207
|
+
processListMeasurementFormSchemaFiles(response) {
|
|
28208
|
+
const status = response.status;
|
|
28209
|
+
let _headers = {};
|
|
28210
|
+
if (response.headers && response.headers.forEach) {
|
|
28211
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
28212
|
+
}
|
|
28213
|
+
;
|
|
28214
|
+
if (status === 200) {
|
|
28215
|
+
return response.text().then((_responseText) => {
|
|
28216
|
+
let result200 = null;
|
|
28217
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
28218
|
+
return result200;
|
|
28219
|
+
});
|
|
28220
|
+
}
|
|
28221
|
+
else if (status !== 200 && status !== 204) {
|
|
28222
|
+
return response.text().then((_responseText) => {
|
|
28223
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
28224
|
+
});
|
|
28225
|
+
}
|
|
28226
|
+
return Promise.resolve(null);
|
|
28227
|
+
}
|
|
28067
28228
|
listMeasurementFormSchemaVersions(id) {
|
|
28068
28229
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
|
|
28069
28230
|
if (id === undefined || id === null)
|