@ignos/api-client 20261110.362.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 +82 -57
- package/lib/ignosportal-api.js +262 -8
- package/package.json +1 -1
- package/src/ignosportal-api.ts +340 -64
package/lib/ignosportal-api.js
CHANGED
|
@@ -2824,6 +2824,78 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
return Promise.resolve(null);
|
|
2826
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
|
+
}
|
|
2827
2899
|
}
|
|
2828
2900
|
export class UploadClient extends AuthorizedApiBase {
|
|
2829
2901
|
http;
|
|
@@ -3295,11 +3367,13 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
|
|
|
3295
3367
|
this.http = http ? http : window;
|
|
3296
3368
|
this.baseUrl = baseUrl ?? "";
|
|
3297
3369
|
}
|
|
3298
|
-
listMachineAlarms(alarmType, assetId, startTime, endTime, subType, nativeCode, nativeSeverity, name, sequence, limit, continuationToken, orderBy, sortDirection
|
|
3370
|
+
listMachineAlarms(alarmType, assetId, startTime, endTime, subType, nativeCode, nativeSeverity, name, sequence, limit, continuationToken, orderBy, sortDirection) {
|
|
3299
3371
|
let url_ = this.baseUrl + "/machinealarms?";
|
|
3300
3372
|
if (alarmType !== undefined && alarmType !== null)
|
|
3301
3373
|
url_ += "alarmType=" + encodeURIComponent("" + alarmType) + "&";
|
|
3302
|
-
if (assetId
|
|
3374
|
+
if (assetId === null)
|
|
3375
|
+
throw new globalThis.Error("The parameter 'assetId' cannot be null.");
|
|
3376
|
+
else if (assetId !== undefined)
|
|
3303
3377
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
3304
3378
|
if (startTime === null)
|
|
3305
3379
|
throw new globalThis.Error("The parameter 'startTime' cannot be null.");
|
|
@@ -3327,8 +3401,6 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
|
|
|
3327
3401
|
url_ += "orderBy=" + encodeURIComponent("" + orderBy) + "&";
|
|
3328
3402
|
if (sortDirection !== undefined && sortDirection !== null)
|
|
3329
3403
|
url_ += "sortDirection=" + encodeURIComponent("" + sortDirection) + "&";
|
|
3330
|
-
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
3331
|
-
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
3332
3404
|
url_ = url_.replace(/[?&]$/, "");
|
|
3333
3405
|
let options_ = {
|
|
3334
3406
|
method: "GET",
|
|
@@ -3486,11 +3558,13 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
|
|
|
3486
3558
|
}
|
|
3487
3559
|
return Promise.resolve(null);
|
|
3488
3560
|
}
|
|
3489
|
-
countMachineAlarms(alarmType, assetId, startTime, endTime, subType, nativeCode, nativeSeverity, name, sequence
|
|
3561
|
+
countMachineAlarms(alarmType, assetId, startTime, endTime, subType, nativeCode, nativeSeverity, name, sequence) {
|
|
3490
3562
|
let url_ = this.baseUrl + "/machinealarms/alarmcount?";
|
|
3491
3563
|
if (alarmType !== undefined && alarmType !== null)
|
|
3492
3564
|
url_ += "alarmType=" + encodeURIComponent("" + alarmType) + "&";
|
|
3493
|
-
if (assetId
|
|
3565
|
+
if (assetId === null)
|
|
3566
|
+
throw new globalThis.Error("The parameter 'assetId' cannot be null.");
|
|
3567
|
+
else if (assetId !== undefined)
|
|
3494
3568
|
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
3495
3569
|
if (startTime === null)
|
|
3496
3570
|
throw new globalThis.Error("The parameter 'startTime' cannot be null.");
|
|
@@ -3508,8 +3582,6 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
|
|
|
3508
3582
|
url_ += "name=" + encodeURIComponent("" + name) + "&";
|
|
3509
3583
|
if (sequence !== undefined && sequence !== null)
|
|
3510
3584
|
url_ += "sequence=" + encodeURIComponent("" + sequence) + "&";
|
|
3511
|
-
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
3512
|
-
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
3513
3585
|
url_ = url_.replace(/[?&]$/, "");
|
|
3514
3586
|
let options_ = {
|
|
3515
3587
|
method: "GET",
|
|
@@ -6450,6 +6522,188 @@ export class PulseJournalClient extends AuthorizedApiBase {
|
|
|
6450
6522
|
}
|
|
6451
6523
|
return Promise.resolve(null);
|
|
6452
6524
|
}
|
|
6525
|
+
setNowLinePinned(resourceId, lineId, request) {
|
|
6526
|
+
let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/pin";
|
|
6527
|
+
if (resourceId === undefined || resourceId === null)
|
|
6528
|
+
throw new globalThis.Error("The parameter 'resourceId' must be defined.");
|
|
6529
|
+
url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
|
|
6530
|
+
if (lineId === undefined || lineId === null)
|
|
6531
|
+
throw new globalThis.Error("The parameter 'lineId' must be defined.");
|
|
6532
|
+
url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
|
|
6533
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6534
|
+
const content_ = JSON.stringify(request);
|
|
6535
|
+
let options_ = {
|
|
6536
|
+
body: content_,
|
|
6537
|
+
method: "POST",
|
|
6538
|
+
headers: {
|
|
6539
|
+
"Content-Type": "application/json",
|
|
6540
|
+
"Accept": "application/json"
|
|
6541
|
+
}
|
|
6542
|
+
};
|
|
6543
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6544
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6545
|
+
}).then((_response) => {
|
|
6546
|
+
return this.processSetNowLinePinned(_response);
|
|
6547
|
+
});
|
|
6548
|
+
}
|
|
6549
|
+
processSetNowLinePinned(response) {
|
|
6550
|
+
const status = response.status;
|
|
6551
|
+
let _headers = {};
|
|
6552
|
+
if (response.headers && response.headers.forEach) {
|
|
6553
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6554
|
+
}
|
|
6555
|
+
;
|
|
6556
|
+
if (status === 200) {
|
|
6557
|
+
return response.text().then((_responseText) => {
|
|
6558
|
+
let result200 = null;
|
|
6559
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6560
|
+
return result200;
|
|
6561
|
+
});
|
|
6562
|
+
}
|
|
6563
|
+
else if (status !== 200 && status !== 204) {
|
|
6564
|
+
return response.text().then((_responseText) => {
|
|
6565
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6566
|
+
});
|
|
6567
|
+
}
|
|
6568
|
+
return Promise.resolve(null);
|
|
6569
|
+
}
|
|
6570
|
+
setNowLineImportant(resourceId, lineId, request) {
|
|
6571
|
+
let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/important";
|
|
6572
|
+
if (resourceId === undefined || resourceId === null)
|
|
6573
|
+
throw new globalThis.Error("The parameter 'resourceId' must be defined.");
|
|
6574
|
+
url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
|
|
6575
|
+
if (lineId === undefined || lineId === null)
|
|
6576
|
+
throw new globalThis.Error("The parameter 'lineId' must be defined.");
|
|
6577
|
+
url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
|
|
6578
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6579
|
+
const content_ = JSON.stringify(request);
|
|
6580
|
+
let options_ = {
|
|
6581
|
+
body: content_,
|
|
6582
|
+
method: "POST",
|
|
6583
|
+
headers: {
|
|
6584
|
+
"Content-Type": "application/json",
|
|
6585
|
+
"Accept": "application/json"
|
|
6586
|
+
}
|
|
6587
|
+
};
|
|
6588
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6589
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6590
|
+
}).then((_response) => {
|
|
6591
|
+
return this.processSetNowLineImportant(_response);
|
|
6592
|
+
});
|
|
6593
|
+
}
|
|
6594
|
+
processSetNowLineImportant(response) {
|
|
6595
|
+
const status = response.status;
|
|
6596
|
+
let _headers = {};
|
|
6597
|
+
if (response.headers && response.headers.forEach) {
|
|
6598
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6599
|
+
}
|
|
6600
|
+
;
|
|
6601
|
+
if (status === 200) {
|
|
6602
|
+
return response.text().then((_responseText) => {
|
|
6603
|
+
let result200 = null;
|
|
6604
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6605
|
+
return result200;
|
|
6606
|
+
});
|
|
6607
|
+
}
|
|
6608
|
+
else if (status !== 200 && status !== 204) {
|
|
6609
|
+
return response.text().then((_responseText) => {
|
|
6610
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6611
|
+
});
|
|
6612
|
+
}
|
|
6613
|
+
return Promise.resolve(null);
|
|
6614
|
+
}
|
|
6615
|
+
addNowAttachment(resourceId, lineId, request) {
|
|
6616
|
+
let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/attachments";
|
|
6617
|
+
if (resourceId === undefined || resourceId === null)
|
|
6618
|
+
throw new globalThis.Error("The parameter 'resourceId' must be defined.");
|
|
6619
|
+
url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
|
|
6620
|
+
if (lineId === undefined || lineId === null)
|
|
6621
|
+
throw new globalThis.Error("The parameter 'lineId' must be defined.");
|
|
6622
|
+
url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
|
|
6623
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6624
|
+
const content_ = JSON.stringify(request);
|
|
6625
|
+
let options_ = {
|
|
6626
|
+
body: content_,
|
|
6627
|
+
method: "POST",
|
|
6628
|
+
headers: {
|
|
6629
|
+
"Content-Type": "application/json",
|
|
6630
|
+
"Accept": "application/json"
|
|
6631
|
+
}
|
|
6632
|
+
};
|
|
6633
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6634
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6635
|
+
}).then((_response) => {
|
|
6636
|
+
return this.processAddNowAttachment(_response);
|
|
6637
|
+
});
|
|
6638
|
+
}
|
|
6639
|
+
processAddNowAttachment(response) {
|
|
6640
|
+
const status = response.status;
|
|
6641
|
+
let _headers = {};
|
|
6642
|
+
if (response.headers && response.headers.forEach) {
|
|
6643
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6644
|
+
}
|
|
6645
|
+
;
|
|
6646
|
+
if (status === 200) {
|
|
6647
|
+
return response.text().then((_responseText) => {
|
|
6648
|
+
let result200 = null;
|
|
6649
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6650
|
+
return result200;
|
|
6651
|
+
});
|
|
6652
|
+
}
|
|
6653
|
+
else if (status !== 200 && status !== 204) {
|
|
6654
|
+
return response.text().then((_responseText) => {
|
|
6655
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6656
|
+
});
|
|
6657
|
+
}
|
|
6658
|
+
return Promise.resolve(null);
|
|
6659
|
+
}
|
|
6660
|
+
removeNowAttachment(resourceId, lineId, attachmentId, eTag) {
|
|
6661
|
+
let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/attachments/{attachmentId}?";
|
|
6662
|
+
if (resourceId === undefined || resourceId === null)
|
|
6663
|
+
throw new globalThis.Error("The parameter 'resourceId' must be defined.");
|
|
6664
|
+
url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
|
|
6665
|
+
if (lineId === undefined || lineId === null)
|
|
6666
|
+
throw new globalThis.Error("The parameter 'lineId' must be defined.");
|
|
6667
|
+
url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
|
|
6668
|
+
if (attachmentId === undefined || attachmentId === null)
|
|
6669
|
+
throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
|
|
6670
|
+
url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
|
|
6671
|
+
if (eTag !== undefined && eTag !== null)
|
|
6672
|
+
url_ += "eTag=" + encodeURIComponent("" + eTag) + "&";
|
|
6673
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6674
|
+
let options_ = {
|
|
6675
|
+
method: "DELETE",
|
|
6676
|
+
headers: {
|
|
6677
|
+
"Accept": "application/json"
|
|
6678
|
+
}
|
|
6679
|
+
};
|
|
6680
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6681
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6682
|
+
}).then((_response) => {
|
|
6683
|
+
return this.processRemoveNowAttachment(_response);
|
|
6684
|
+
});
|
|
6685
|
+
}
|
|
6686
|
+
processRemoveNowAttachment(response) {
|
|
6687
|
+
const status = response.status;
|
|
6688
|
+
let _headers = {};
|
|
6689
|
+
if (response.headers && response.headers.forEach) {
|
|
6690
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6691
|
+
}
|
|
6692
|
+
;
|
|
6693
|
+
if (status === 200) {
|
|
6694
|
+
return response.text().then((_responseText) => {
|
|
6695
|
+
let result200 = null;
|
|
6696
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6697
|
+
return result200;
|
|
6698
|
+
});
|
|
6699
|
+
}
|
|
6700
|
+
else if (status !== 200 && status !== 204) {
|
|
6701
|
+
return response.text().then((_responseText) => {
|
|
6702
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6703
|
+
});
|
|
6704
|
+
}
|
|
6705
|
+
return Promise.resolve(null);
|
|
6706
|
+
}
|
|
6453
6707
|
createAlwaysLine(resourceId, request) {
|
|
6454
6708
|
let url_ = this.baseUrl + "/pulsejournal/{resourceId}/always/lines";
|
|
6455
6709
|
if (resourceId === undefined || resourceId === null)
|