@ignos/api-client 20260621.159.1-alpha → 20260626.160.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 +145 -103
- package/lib/ignosportal-api.js +258 -47
- package/package.json +1 -1
- package/src/ignosportal-api.ts +400 -149
package/lib/ignosportal-api.js
CHANGED
|
@@ -11520,6 +11520,149 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
11520
11520
|
return Promise.resolve(null);
|
|
11521
11521
|
}
|
|
11522
11522
|
}
|
|
11523
|
+
export class MachineDataClient extends AuthorizedApiBase {
|
|
11524
|
+
constructor(configuration, baseUrl, http) {
|
|
11525
|
+
super(configuration);
|
|
11526
|
+
this.http = http ? http : window;
|
|
11527
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
11528
|
+
}
|
|
11529
|
+
getLiveMachineData(assetId, externalIds) {
|
|
11530
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/live-machinedata?";
|
|
11531
|
+
if (assetId === undefined || assetId === null)
|
|
11532
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11533
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11534
|
+
if (externalIds === null)
|
|
11535
|
+
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
11536
|
+
else if (externalIds !== undefined)
|
|
11537
|
+
externalIds && externalIds.forEach(item => { url_ += "externalIds=" + encodeURIComponent("" + item) + "&"; });
|
|
11538
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11539
|
+
let options_ = {
|
|
11540
|
+
method: "GET",
|
|
11541
|
+
headers: {
|
|
11542
|
+
"Accept": "application/json"
|
|
11543
|
+
}
|
|
11544
|
+
};
|
|
11545
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11546
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11547
|
+
}).then((_response) => {
|
|
11548
|
+
return this.processGetLiveMachineData(_response);
|
|
11549
|
+
});
|
|
11550
|
+
}
|
|
11551
|
+
processGetLiveMachineData(response) {
|
|
11552
|
+
const status = response.status;
|
|
11553
|
+
let _headers = {};
|
|
11554
|
+
if (response.headers && response.headers.forEach) {
|
|
11555
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11556
|
+
}
|
|
11557
|
+
;
|
|
11558
|
+
if (status === 200) {
|
|
11559
|
+
return response.text().then((_responseText) => {
|
|
11560
|
+
let result200 = null;
|
|
11561
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11562
|
+
return result200;
|
|
11563
|
+
});
|
|
11564
|
+
}
|
|
11565
|
+
else if (status !== 200 && status !== 204) {
|
|
11566
|
+
return response.text().then((_responseText) => {
|
|
11567
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11568
|
+
});
|
|
11569
|
+
}
|
|
11570
|
+
return Promise.resolve(null);
|
|
11571
|
+
}
|
|
11572
|
+
getTimeseriesGraph(assetId, externalIds, startTime, endTime) {
|
|
11573
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph?";
|
|
11574
|
+
if (assetId === undefined || assetId === null)
|
|
11575
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11576
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11577
|
+
if (externalIds === null)
|
|
11578
|
+
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
11579
|
+
else if (externalIds !== undefined)
|
|
11580
|
+
externalIds && externalIds.forEach(item => { url_ += "externalIds=" + encodeURIComponent("" + item) + "&"; });
|
|
11581
|
+
if (startTime === null)
|
|
11582
|
+
throw new globalThis.Error("The parameter 'startTime' cannot be null.");
|
|
11583
|
+
else if (startTime !== undefined)
|
|
11584
|
+
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
11585
|
+
if (endTime === null)
|
|
11586
|
+
throw new globalThis.Error("The parameter 'endTime' cannot be null.");
|
|
11587
|
+
else if (endTime !== undefined)
|
|
11588
|
+
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
11589
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11590
|
+
let options_ = {
|
|
11591
|
+
method: "GET",
|
|
11592
|
+
headers: {
|
|
11593
|
+
"Accept": "application/json"
|
|
11594
|
+
}
|
|
11595
|
+
};
|
|
11596
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11597
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11598
|
+
}).then((_response) => {
|
|
11599
|
+
return this.processGetTimeseriesGraph(_response);
|
|
11600
|
+
});
|
|
11601
|
+
}
|
|
11602
|
+
processGetTimeseriesGraph(response) {
|
|
11603
|
+
const status = response.status;
|
|
11604
|
+
let _headers = {};
|
|
11605
|
+
if (response.headers && response.headers.forEach) {
|
|
11606
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11607
|
+
}
|
|
11608
|
+
;
|
|
11609
|
+
if (status === 200) {
|
|
11610
|
+
return response.text().then((_responseText) => {
|
|
11611
|
+
let result200 = null;
|
|
11612
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11613
|
+
return result200;
|
|
11614
|
+
});
|
|
11615
|
+
}
|
|
11616
|
+
else if (status !== 200 && status !== 204) {
|
|
11617
|
+
return response.text().then((_responseText) => {
|
|
11618
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11619
|
+
});
|
|
11620
|
+
}
|
|
11621
|
+
return Promise.resolve(null);
|
|
11622
|
+
}
|
|
11623
|
+
exportTimeseriesGraph(assetId, request) {
|
|
11624
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph/export-csv";
|
|
11625
|
+
if (assetId === undefined || assetId === null)
|
|
11626
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11627
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11628
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11629
|
+
const content_ = JSON.stringify(request);
|
|
11630
|
+
let options_ = {
|
|
11631
|
+
body: content_,
|
|
11632
|
+
method: "POST",
|
|
11633
|
+
headers: {
|
|
11634
|
+
"Content-Type": "application/json",
|
|
11635
|
+
"Accept": "application/json"
|
|
11636
|
+
}
|
|
11637
|
+
};
|
|
11638
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11639
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11640
|
+
}).then((_response) => {
|
|
11641
|
+
return this.processExportTimeseriesGraph(_response);
|
|
11642
|
+
});
|
|
11643
|
+
}
|
|
11644
|
+
processExportTimeseriesGraph(response) {
|
|
11645
|
+
const status = response.status;
|
|
11646
|
+
let _headers = {};
|
|
11647
|
+
if (response.headers && response.headers.forEach) {
|
|
11648
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11649
|
+
}
|
|
11650
|
+
;
|
|
11651
|
+
if (status === 200) {
|
|
11652
|
+
return response.text().then((_responseText) => {
|
|
11653
|
+
let result200 = null;
|
|
11654
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11655
|
+
return result200;
|
|
11656
|
+
});
|
|
11657
|
+
}
|
|
11658
|
+
else if (status !== 200 && status !== 204) {
|
|
11659
|
+
return response.text().then((_responseText) => {
|
|
11660
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11661
|
+
});
|
|
11662
|
+
}
|
|
11663
|
+
return Promise.resolve(null);
|
|
11664
|
+
}
|
|
11665
|
+
}
|
|
11523
11666
|
export class LinksClient extends AuthorizedApiBase {
|
|
11524
11667
|
constructor(configuration, baseUrl, http) {
|
|
11525
11668
|
super(configuration);
|
|
@@ -20012,6 +20155,121 @@ export class MesEngineeringChangeOrdersClient extends AuthorizedApiBase {
|
|
|
20012
20155
|
return Promise.resolve(null);
|
|
20013
20156
|
}
|
|
20014
20157
|
}
|
|
20158
|
+
export class MesIndirectActivitiesClient extends AuthorizedApiBase {
|
|
20159
|
+
constructor(configuration, baseUrl, http) {
|
|
20160
|
+
super(configuration);
|
|
20161
|
+
this.http = http ? http : window;
|
|
20162
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20163
|
+
}
|
|
20164
|
+
listIndirectActivities() {
|
|
20165
|
+
let url_ = this.baseUrl + "/mes/indirect-activities";
|
|
20166
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20167
|
+
let options_ = {
|
|
20168
|
+
method: "GET",
|
|
20169
|
+
headers: {
|
|
20170
|
+
"Accept": "application/json"
|
|
20171
|
+
}
|
|
20172
|
+
};
|
|
20173
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20174
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20175
|
+
}).then((_response) => {
|
|
20176
|
+
return this.processListIndirectActivities(_response);
|
|
20177
|
+
});
|
|
20178
|
+
}
|
|
20179
|
+
processListIndirectActivities(response) {
|
|
20180
|
+
const status = response.status;
|
|
20181
|
+
let _headers = {};
|
|
20182
|
+
if (response.headers && response.headers.forEach) {
|
|
20183
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20184
|
+
}
|
|
20185
|
+
;
|
|
20186
|
+
if (status === 200) {
|
|
20187
|
+
return response.text().then((_responseText) => {
|
|
20188
|
+
let result200 = null;
|
|
20189
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20190
|
+
return result200;
|
|
20191
|
+
});
|
|
20192
|
+
}
|
|
20193
|
+
else if (status !== 200 && status !== 204) {
|
|
20194
|
+
return response.text().then((_responseText) => {
|
|
20195
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20196
|
+
});
|
|
20197
|
+
}
|
|
20198
|
+
return Promise.resolve(null);
|
|
20199
|
+
}
|
|
20200
|
+
getMyActiveIndirectActivity() {
|
|
20201
|
+
let url_ = this.baseUrl + "/mes/myactiveindirectactivity";
|
|
20202
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20203
|
+
let options_ = {
|
|
20204
|
+
method: "GET",
|
|
20205
|
+
headers: {
|
|
20206
|
+
"Accept": "application/json"
|
|
20207
|
+
}
|
|
20208
|
+
};
|
|
20209
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20210
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20211
|
+
}).then((_response) => {
|
|
20212
|
+
return this.processGetMyActiveIndirectActivity(_response);
|
|
20213
|
+
});
|
|
20214
|
+
}
|
|
20215
|
+
processGetMyActiveIndirectActivity(response) {
|
|
20216
|
+
const status = response.status;
|
|
20217
|
+
let _headers = {};
|
|
20218
|
+
if (response.headers && response.headers.forEach) {
|
|
20219
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20220
|
+
}
|
|
20221
|
+
;
|
|
20222
|
+
if (status === 200) {
|
|
20223
|
+
return response.text().then((_responseText) => {
|
|
20224
|
+
let result200 = null;
|
|
20225
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20226
|
+
return result200;
|
|
20227
|
+
});
|
|
20228
|
+
}
|
|
20229
|
+
else if (status !== 200 && status !== 204) {
|
|
20230
|
+
return response.text().then((_responseText) => {
|
|
20231
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20232
|
+
});
|
|
20233
|
+
}
|
|
20234
|
+
return Promise.resolve(null);
|
|
20235
|
+
}
|
|
20236
|
+
startIndirectActivity(request) {
|
|
20237
|
+
let url_ = this.baseUrl + "/mes/start-indirect-activity";
|
|
20238
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
20239
|
+
const content_ = JSON.stringify(request);
|
|
20240
|
+
let options_ = {
|
|
20241
|
+
body: content_,
|
|
20242
|
+
method: "POST",
|
|
20243
|
+
headers: {
|
|
20244
|
+
"Content-Type": "application/json",
|
|
20245
|
+
}
|
|
20246
|
+
};
|
|
20247
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20248
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
20249
|
+
}).then((_response) => {
|
|
20250
|
+
return this.processStartIndirectActivity(_response);
|
|
20251
|
+
});
|
|
20252
|
+
}
|
|
20253
|
+
processStartIndirectActivity(response) {
|
|
20254
|
+
const status = response.status;
|
|
20255
|
+
let _headers = {};
|
|
20256
|
+
if (response.headers && response.headers.forEach) {
|
|
20257
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20258
|
+
}
|
|
20259
|
+
;
|
|
20260
|
+
if (status === 204) {
|
|
20261
|
+
return response.text().then((_responseText) => {
|
|
20262
|
+
return;
|
|
20263
|
+
});
|
|
20264
|
+
}
|
|
20265
|
+
else if (status !== 200 && status !== 204) {
|
|
20266
|
+
return response.text().then((_responseText) => {
|
|
20267
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20268
|
+
});
|
|
20269
|
+
}
|
|
20270
|
+
return Promise.resolve(null);
|
|
20271
|
+
}
|
|
20272
|
+
}
|
|
20015
20273
|
export class MesLinksClient extends AuthorizedApiBase {
|
|
20016
20274
|
constructor(configuration, baseUrl, http) {
|
|
20017
20275
|
super(configuration);
|
|
@@ -20298,53 +20556,6 @@ export class MesOrMoveClient extends AuthorizedApiBase {
|
|
|
20298
20556
|
return Promise.resolve(null);
|
|
20299
20557
|
}
|
|
20300
20558
|
}
|
|
20301
|
-
export class MesPlannerClient extends AuthorizedApiBase {
|
|
20302
|
-
constructor(configuration, baseUrl, http) {
|
|
20303
|
-
super(configuration);
|
|
20304
|
-
this.http = http ? http : window;
|
|
20305
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20306
|
-
}
|
|
20307
|
-
getPlan(resourceGroupId) {
|
|
20308
|
-
let url_ = this.baseUrl + "/mes/planner/plan?";
|
|
20309
|
-
if (resourceGroupId === null)
|
|
20310
|
-
throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
|
|
20311
|
-
else if (resourceGroupId !== undefined)
|
|
20312
|
-
url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
|
|
20313
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
20314
|
-
let options_ = {
|
|
20315
|
-
method: "GET",
|
|
20316
|
-
headers: {
|
|
20317
|
-
"Accept": "application/json"
|
|
20318
|
-
}
|
|
20319
|
-
};
|
|
20320
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20321
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
20322
|
-
}).then((_response) => {
|
|
20323
|
-
return this.processGetPlan(_response);
|
|
20324
|
-
});
|
|
20325
|
-
}
|
|
20326
|
-
processGetPlan(response) {
|
|
20327
|
-
const status = response.status;
|
|
20328
|
-
let _headers = {};
|
|
20329
|
-
if (response.headers && response.headers.forEach) {
|
|
20330
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20331
|
-
}
|
|
20332
|
-
;
|
|
20333
|
-
if (status === 200) {
|
|
20334
|
-
return response.text().then((_responseText) => {
|
|
20335
|
-
let result200 = null;
|
|
20336
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20337
|
-
return result200;
|
|
20338
|
-
});
|
|
20339
|
-
}
|
|
20340
|
-
else if (status !== 200 && status !== 204) {
|
|
20341
|
-
return response.text().then((_responseText) => {
|
|
20342
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20343
|
-
});
|
|
20344
|
-
}
|
|
20345
|
-
return Promise.resolve(null);
|
|
20346
|
-
}
|
|
20347
|
-
}
|
|
20348
20559
|
export class MesProductionOrderClient extends AuthorizedApiBase {
|
|
20349
20560
|
constructor(configuration, baseUrl, http) {
|
|
20350
20561
|
super(configuration);
|