@ignos/api-client 20250311.0.11347 → 20250312.0.11355
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 +11 -10
- package/lib/ignosportal-api.js +44 -2
- package/package.json +1 -1
- package/src/ignosportal-api.ts +53 -12
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -834,6 +834,7 @@ export interface IMachinesClient {
|
|
|
834
834
|
listCurrentMachineStates(assetId: number | null | undefined): Promise<MachineStateListDto>;
|
|
835
835
|
listMachineStates(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStateDatapoint[]>;
|
|
836
836
|
listLastDowntimeMachineStates(id: number, endTime: Date | null | undefined, maxStates: number | null | undefined): Promise<DowntimeMachineStateDto[]>;
|
|
837
|
+
getMachineStateWithDowntimePeriods(id: number, timestamp: number | undefined): Promise<DowntimeMachineStateDto>;
|
|
837
838
|
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto>;
|
|
838
839
|
listMachineErpData(): Promise<MachineErpDataListDto>;
|
|
839
840
|
getMachineErpData(id: number): Promise<MachineErpDataDto>;
|
|
@@ -868,6 +869,8 @@ export declare class MachinesClient extends AuthorizedApiBase implements IMachin
|
|
|
868
869
|
protected processListMachineStates(response: Response): Promise<MachineStateDatapoint[]>;
|
|
869
870
|
listLastDowntimeMachineStates(id: number, endTime: Date | null | undefined, maxStates: number | null | undefined): Promise<DowntimeMachineStateDto[]>;
|
|
870
871
|
protected processListLastDowntimeMachineStates(response: Response): Promise<DowntimeMachineStateDto[]>;
|
|
872
|
+
getMachineStateWithDowntimePeriods(id: number, timestamp: number | undefined): Promise<DowntimeMachineStateDto>;
|
|
873
|
+
protected processGetMachineStateWithDowntimePeriods(response: Response): Promise<DowntimeMachineStateDto>;
|
|
871
874
|
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto>;
|
|
872
875
|
protected processGetMachineStatesSummary(response: Response): Promise<MachineStatesSummaryDto>;
|
|
873
876
|
listMachineErpData(): Promise<MachineErpDataListDto>;
|
|
@@ -11099,15 +11102,14 @@ export declare class UpdateSchemaGroupedElementRowDto implements IUpdateSchemaGr
|
|
|
11099
11102
|
section?: string | null;
|
|
11100
11103
|
pageNumber?: number | null;
|
|
11101
11104
|
measurements?: number | null;
|
|
11102
|
-
nominal?: number | null;
|
|
11103
11105
|
nominalText?: string | null;
|
|
11104
11106
|
type?: string | null;
|
|
11105
11107
|
subType?: string | null;
|
|
11106
11108
|
unitOfMeasure?: string | null;
|
|
11107
|
-
plusTolerance?:
|
|
11108
|
-
minusTolerance?:
|
|
11109
|
-
upperLimit?:
|
|
11110
|
-
lowerLimit?:
|
|
11109
|
+
plusTolerance?: string | null;
|
|
11110
|
+
minusTolerance?: string | null;
|
|
11111
|
+
upperLimit?: string | null;
|
|
11112
|
+
lowerLimit?: string | null;
|
|
11111
11113
|
coatingThickness?: number | null;
|
|
11112
11114
|
comments?: string | null;
|
|
11113
11115
|
frequency: MeasurementFrequency;
|
|
@@ -11125,15 +11127,14 @@ export interface IUpdateSchemaGroupedElementRowDto {
|
|
|
11125
11127
|
section?: string | null;
|
|
11126
11128
|
pageNumber?: number | null;
|
|
11127
11129
|
measurements?: number | null;
|
|
11128
|
-
nominal?: number | null;
|
|
11129
11130
|
nominalText?: string | null;
|
|
11130
11131
|
type?: string | null;
|
|
11131
11132
|
subType?: string | null;
|
|
11132
11133
|
unitOfMeasure?: string | null;
|
|
11133
|
-
plusTolerance?:
|
|
11134
|
-
minusTolerance?:
|
|
11135
|
-
upperLimit?:
|
|
11136
|
-
lowerLimit?:
|
|
11134
|
+
plusTolerance?: string | null;
|
|
11135
|
+
minusTolerance?: string | null;
|
|
11136
|
+
upperLimit?: string | null;
|
|
11137
|
+
lowerLimit?: string | null;
|
|
11137
11138
|
coatingThickness?: number | null;
|
|
11138
11139
|
comments?: string | null;
|
|
11139
11140
|
frequency: MeasurementFrequency;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -6615,6 +6615,50 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
6615
6615
|
}
|
|
6616
6616
|
return Promise.resolve(null);
|
|
6617
6617
|
}
|
|
6618
|
+
getMachineStateWithDowntimePeriods(id, timestamp) {
|
|
6619
|
+
let url_ = this.baseUrl + "/machines/{id}/statewithdowntimeperiods?";
|
|
6620
|
+
if (id === undefined || id === null)
|
|
6621
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6622
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6623
|
+
if (timestamp === null)
|
|
6624
|
+
throw new Error("The parameter 'timestamp' cannot be null.");
|
|
6625
|
+
else if (timestamp !== undefined)
|
|
6626
|
+
url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
|
|
6627
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6628
|
+
let options_ = {
|
|
6629
|
+
method: "GET",
|
|
6630
|
+
headers: {
|
|
6631
|
+
"Accept": "application/json"
|
|
6632
|
+
}
|
|
6633
|
+
};
|
|
6634
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6635
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6636
|
+
}).then((_response) => {
|
|
6637
|
+
return this.processGetMachineStateWithDowntimePeriods(_response);
|
|
6638
|
+
});
|
|
6639
|
+
}
|
|
6640
|
+
processGetMachineStateWithDowntimePeriods(response) {
|
|
6641
|
+
const status = response.status;
|
|
6642
|
+
let _headers = {};
|
|
6643
|
+
if (response.headers && response.headers.forEach) {
|
|
6644
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6645
|
+
}
|
|
6646
|
+
;
|
|
6647
|
+
if (status === 200) {
|
|
6648
|
+
return response.text().then((_responseText) => {
|
|
6649
|
+
let result200 = null;
|
|
6650
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6651
|
+
result200 = DowntimeMachineStateDto.fromJS(resultData200);
|
|
6652
|
+
return result200;
|
|
6653
|
+
});
|
|
6654
|
+
}
|
|
6655
|
+
else if (status !== 200 && status !== 204) {
|
|
6656
|
+
return response.text().then((_responseText) => {
|
|
6657
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6658
|
+
});
|
|
6659
|
+
}
|
|
6660
|
+
return Promise.resolve(null);
|
|
6661
|
+
}
|
|
6618
6662
|
getMachineStatesSummary(id, startTime, endTime) {
|
|
6619
6663
|
let url_ = this.baseUrl + "/machines/{id}/states/summary?";
|
|
6620
6664
|
if (id === undefined || id === null)
|
|
@@ -38646,7 +38690,6 @@ export class UpdateSchemaGroupedElementRowDto {
|
|
|
38646
38690
|
this.section = _data["section"];
|
|
38647
38691
|
this.pageNumber = _data["pageNumber"];
|
|
38648
38692
|
this.measurements = _data["measurements"];
|
|
38649
|
-
this.nominal = _data["nominal"];
|
|
38650
38693
|
this.nominalText = _data["nominalText"];
|
|
38651
38694
|
this.type = _data["type"];
|
|
38652
38695
|
this.subType = _data["subType"];
|
|
@@ -38676,7 +38719,6 @@ export class UpdateSchemaGroupedElementRowDto {
|
|
|
38676
38719
|
data["section"] = this.section;
|
|
38677
38720
|
data["pageNumber"] = this.pageNumber;
|
|
38678
38721
|
data["measurements"] = this.measurements;
|
|
38679
|
-
data["nominal"] = this.nominal;
|
|
38680
38722
|
data["nominalText"] = this.nominalText;
|
|
38681
38723
|
data["type"] = this.type;
|
|
38682
38724
|
data["subType"] = this.subType;
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -6749,6 +6749,8 @@ export interface IMachinesClient {
|
|
|
6749
6749
|
|
|
6750
6750
|
listLastDowntimeMachineStates(id: number, endTime: Date | null | undefined, maxStates: number | null | undefined): Promise<DowntimeMachineStateDto[]>;
|
|
6751
6751
|
|
|
6752
|
+
getMachineStateWithDowntimePeriods(id: number, timestamp: number | undefined): Promise<DowntimeMachineStateDto>;
|
|
6753
|
+
|
|
6752
6754
|
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto>;
|
|
6753
6755
|
|
|
6754
6756
|
listMachineErpData(): Promise<MachineErpDataListDto>;
|
|
@@ -7111,6 +7113,49 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
7111
7113
|
return Promise.resolve<DowntimeMachineStateDto[]>(null as any);
|
|
7112
7114
|
}
|
|
7113
7115
|
|
|
7116
|
+
getMachineStateWithDowntimePeriods(id: number, timestamp: number | undefined): Promise<DowntimeMachineStateDto> {
|
|
7117
|
+
let url_ = this.baseUrl + "/machines/{id}/statewithdowntimeperiods?";
|
|
7118
|
+
if (id === undefined || id === null)
|
|
7119
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7120
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7121
|
+
if (timestamp === null)
|
|
7122
|
+
throw new Error("The parameter 'timestamp' cannot be null.");
|
|
7123
|
+
else if (timestamp !== undefined)
|
|
7124
|
+
url_ += "timestamp=" + encodeURIComponent("" + timestamp) + "&";
|
|
7125
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7126
|
+
|
|
7127
|
+
let options_: RequestInit = {
|
|
7128
|
+
method: "GET",
|
|
7129
|
+
headers: {
|
|
7130
|
+
"Accept": "application/json"
|
|
7131
|
+
}
|
|
7132
|
+
};
|
|
7133
|
+
|
|
7134
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7135
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7136
|
+
}).then((_response: Response) => {
|
|
7137
|
+
return this.processGetMachineStateWithDowntimePeriods(_response);
|
|
7138
|
+
});
|
|
7139
|
+
}
|
|
7140
|
+
|
|
7141
|
+
protected processGetMachineStateWithDowntimePeriods(response: Response): Promise<DowntimeMachineStateDto> {
|
|
7142
|
+
const status = response.status;
|
|
7143
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7144
|
+
if (status === 200) {
|
|
7145
|
+
return response.text().then((_responseText) => {
|
|
7146
|
+
let result200: any = null;
|
|
7147
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7148
|
+
result200 = DowntimeMachineStateDto.fromJS(resultData200);
|
|
7149
|
+
return result200;
|
|
7150
|
+
});
|
|
7151
|
+
} else if (status !== 200 && status !== 204) {
|
|
7152
|
+
return response.text().then((_responseText) => {
|
|
7153
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7154
|
+
});
|
|
7155
|
+
}
|
|
7156
|
+
return Promise.resolve<DowntimeMachineStateDto>(null as any);
|
|
7157
|
+
}
|
|
7158
|
+
|
|
7114
7159
|
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto> {
|
|
7115
7160
|
let url_ = this.baseUrl + "/machines/{id}/states/summary?";
|
|
7116
7161
|
if (id === undefined || id === null)
|
|
@@ -48657,15 +48702,14 @@ export class UpdateSchemaGroupedElementRowDto implements IUpdateSchemaGroupedEle
|
|
|
48657
48702
|
section?: string | null;
|
|
48658
48703
|
pageNumber?: number | null;
|
|
48659
48704
|
measurements?: number | null;
|
|
48660
|
-
nominal?: number | null;
|
|
48661
48705
|
nominalText?: string | null;
|
|
48662
48706
|
type?: string | null;
|
|
48663
48707
|
subType?: string | null;
|
|
48664
48708
|
unitOfMeasure?: string | null;
|
|
48665
|
-
plusTolerance?:
|
|
48666
|
-
minusTolerance?:
|
|
48667
|
-
upperLimit?:
|
|
48668
|
-
lowerLimit?:
|
|
48709
|
+
plusTolerance?: string | null;
|
|
48710
|
+
minusTolerance?: string | null;
|
|
48711
|
+
upperLimit?: string | null;
|
|
48712
|
+
lowerLimit?: string | null;
|
|
48669
48713
|
coatingThickness?: number | null;
|
|
48670
48714
|
comments?: string | null;
|
|
48671
48715
|
frequency!: MeasurementFrequency;
|
|
@@ -48689,7 +48733,6 @@ export class UpdateSchemaGroupedElementRowDto implements IUpdateSchemaGroupedEle
|
|
|
48689
48733
|
this.section = _data["section"];
|
|
48690
48734
|
this.pageNumber = _data["pageNumber"];
|
|
48691
48735
|
this.measurements = _data["measurements"];
|
|
48692
|
-
this.nominal = _data["nominal"];
|
|
48693
48736
|
this.nominalText = _data["nominalText"];
|
|
48694
48737
|
this.type = _data["type"];
|
|
48695
48738
|
this.subType = _data["subType"];
|
|
@@ -48721,7 +48764,6 @@ export class UpdateSchemaGroupedElementRowDto implements IUpdateSchemaGroupedEle
|
|
|
48721
48764
|
data["section"] = this.section;
|
|
48722
48765
|
data["pageNumber"] = this.pageNumber;
|
|
48723
48766
|
data["measurements"] = this.measurements;
|
|
48724
|
-
data["nominal"] = this.nominal;
|
|
48725
48767
|
data["nominalText"] = this.nominalText;
|
|
48726
48768
|
data["type"] = this.type;
|
|
48727
48769
|
data["subType"] = this.subType;
|
|
@@ -48746,15 +48788,14 @@ export interface IUpdateSchemaGroupedElementRowDto {
|
|
|
48746
48788
|
section?: string | null;
|
|
48747
48789
|
pageNumber?: number | null;
|
|
48748
48790
|
measurements?: number | null;
|
|
48749
|
-
nominal?: number | null;
|
|
48750
48791
|
nominalText?: string | null;
|
|
48751
48792
|
type?: string | null;
|
|
48752
48793
|
subType?: string | null;
|
|
48753
48794
|
unitOfMeasure?: string | null;
|
|
48754
|
-
plusTolerance?:
|
|
48755
|
-
minusTolerance?:
|
|
48756
|
-
upperLimit?:
|
|
48757
|
-
lowerLimit?:
|
|
48795
|
+
plusTolerance?: string | null;
|
|
48796
|
+
minusTolerance?: string | null;
|
|
48797
|
+
upperLimit?: string | null;
|
|
48798
|
+
lowerLimit?: string | null;
|
|
48758
48799
|
coatingThickness?: number | null;
|
|
48759
48800
|
comments?: string | null;
|
|
48760
48801
|
frequency: MeasurementFrequency;
|