@ignos/api-client 20250107.0.10915 → 20250114.0.10945
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 +174 -0
- package/lib/ignosportal-api.js +595 -1
- package/package.json +1 -1
- package/src/ignosportal-api.ts +760 -1
package/src/ignosportal-api.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//----------------------
|
|
2
2
|
// <auto-generated>
|
|
3
|
-
// Generated using the NSwag toolchain v14.
|
|
3
|
+
// Generated using the NSwag toolchain v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
|
4
4
|
// </auto-generated>
|
|
5
5
|
//----------------------
|
|
6
6
|
|
|
@@ -5728,6 +5728,8 @@ export interface IDowntimeReasonsClient {
|
|
|
5728
5728
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
5729
5729
|
|
|
5730
5730
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
5731
|
+
|
|
5732
|
+
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto>;
|
|
5731
5733
|
}
|
|
5732
5734
|
|
|
5733
5735
|
export class DowntimeReasonsClient extends AuthorizedApiBase implements IDowntimeReasonsClient {
|
|
@@ -5937,6 +5939,237 @@ export class DowntimeReasonsClient extends AuthorizedApiBase implements IDowntim
|
|
|
5937
5939
|
}
|
|
5938
5940
|
return Promise.resolve<TopDowntimeReasonsDto>(null as any);
|
|
5939
5941
|
}
|
|
5942
|
+
|
|
5943
|
+
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto> {
|
|
5944
|
+
let url_ = this.baseUrl + "/downtimereasons/report";
|
|
5945
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5946
|
+
|
|
5947
|
+
const content_ = JSON.stringify(request);
|
|
5948
|
+
|
|
5949
|
+
let options_: RequestInit = {
|
|
5950
|
+
body: content_,
|
|
5951
|
+
method: "POST",
|
|
5952
|
+
headers: {
|
|
5953
|
+
"Content-Type": "application/json",
|
|
5954
|
+
"Accept": "application/json"
|
|
5955
|
+
}
|
|
5956
|
+
};
|
|
5957
|
+
|
|
5958
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5959
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5960
|
+
}).then((_response: Response) => {
|
|
5961
|
+
return this.processCreateReport(_response);
|
|
5962
|
+
});
|
|
5963
|
+
}
|
|
5964
|
+
|
|
5965
|
+
protected processCreateReport(response: Response): Promise<DowntimeReasonsReportDto> {
|
|
5966
|
+
const status = response.status;
|
|
5967
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5968
|
+
if (status === 200) {
|
|
5969
|
+
return response.text().then((_responseText) => {
|
|
5970
|
+
let result200: any = null;
|
|
5971
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5972
|
+
result200 = DowntimeReasonsReportDto.fromJS(resultData200);
|
|
5973
|
+
return result200;
|
|
5974
|
+
});
|
|
5975
|
+
} else if (status !== 200 && status !== 204) {
|
|
5976
|
+
return response.text().then((_responseText) => {
|
|
5977
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5978
|
+
});
|
|
5979
|
+
}
|
|
5980
|
+
return Promise.resolve<DowntimeReasonsReportDto>(null as any);
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5984
|
+
export interface IKpiAdminClient {
|
|
5985
|
+
|
|
5986
|
+
getMachineCapacityAdmin(): Promise<MachineGroupCapacityDto[]>;
|
|
5987
|
+
|
|
5988
|
+
updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
|
|
5989
|
+
|
|
5990
|
+
getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]>;
|
|
5991
|
+
|
|
5992
|
+
updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto>;
|
|
5993
|
+
}
|
|
5994
|
+
|
|
5995
|
+
export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient {
|
|
5996
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
5997
|
+
private baseUrl: string;
|
|
5998
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
5999
|
+
|
|
6000
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
6001
|
+
super(configuration);
|
|
6002
|
+
this.http = http ? http : window as any;
|
|
6003
|
+
this.baseUrl = baseUrl ?? "";
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6006
|
+
getMachineCapacityAdmin(): Promise<MachineGroupCapacityDto[]> {
|
|
6007
|
+
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
6008
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6009
|
+
|
|
6010
|
+
let options_: RequestInit = {
|
|
6011
|
+
method: "GET",
|
|
6012
|
+
headers: {
|
|
6013
|
+
"Accept": "application/json"
|
|
6014
|
+
}
|
|
6015
|
+
};
|
|
6016
|
+
|
|
6017
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6018
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6019
|
+
}).then((_response: Response) => {
|
|
6020
|
+
return this.processGetMachineCapacityAdmin(_response);
|
|
6021
|
+
});
|
|
6022
|
+
}
|
|
6023
|
+
|
|
6024
|
+
protected processGetMachineCapacityAdmin(response: Response): Promise<MachineGroupCapacityDto[]> {
|
|
6025
|
+
const status = response.status;
|
|
6026
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6027
|
+
if (status === 200) {
|
|
6028
|
+
return response.text().then((_responseText) => {
|
|
6029
|
+
let result200: any = null;
|
|
6030
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6031
|
+
if (Array.isArray(resultData200)) {
|
|
6032
|
+
result200 = [] as any;
|
|
6033
|
+
for (let item of resultData200)
|
|
6034
|
+
result200!.push(MachineGroupCapacityDto.fromJS(item));
|
|
6035
|
+
}
|
|
6036
|
+
return result200;
|
|
6037
|
+
});
|
|
6038
|
+
} else if (status !== 200 && status !== 204) {
|
|
6039
|
+
return response.text().then((_responseText) => {
|
|
6040
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6041
|
+
});
|
|
6042
|
+
}
|
|
6043
|
+
return Promise.resolve<MachineGroupCapacityDto[]>(null as any);
|
|
6044
|
+
}
|
|
6045
|
+
|
|
6046
|
+
updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto> {
|
|
6047
|
+
let url_ = this.baseUrl + "/kpiadmin/capacity";
|
|
6048
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6049
|
+
|
|
6050
|
+
const content_ = JSON.stringify(request);
|
|
6051
|
+
|
|
6052
|
+
let options_: RequestInit = {
|
|
6053
|
+
body: content_,
|
|
6054
|
+
method: "PUT",
|
|
6055
|
+
headers: {
|
|
6056
|
+
"Content-Type": "application/json",
|
|
6057
|
+
"Accept": "application/json"
|
|
6058
|
+
}
|
|
6059
|
+
};
|
|
6060
|
+
|
|
6061
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6062
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6063
|
+
}).then((_response: Response) => {
|
|
6064
|
+
return this.processUpdateMachineCapacityAdmin(_response);
|
|
6065
|
+
});
|
|
6066
|
+
}
|
|
6067
|
+
|
|
6068
|
+
protected processUpdateMachineCapacityAdmin(response: Response): Promise<MachineCapacityDto> {
|
|
6069
|
+
const status = response.status;
|
|
6070
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6071
|
+
if (status === 200) {
|
|
6072
|
+
return response.text().then((_responseText) => {
|
|
6073
|
+
let result200: any = null;
|
|
6074
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6075
|
+
result200 = MachineCapacityDto.fromJS(resultData200);
|
|
6076
|
+
return result200;
|
|
6077
|
+
});
|
|
6078
|
+
} else if (status !== 200 && status !== 204) {
|
|
6079
|
+
return response.text().then((_responseText) => {
|
|
6080
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6081
|
+
});
|
|
6082
|
+
}
|
|
6083
|
+
return Promise.resolve<MachineCapacityDto>(null as any);
|
|
6084
|
+
}
|
|
6085
|
+
|
|
6086
|
+
getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]> {
|
|
6087
|
+
let url_ = this.baseUrl + "/kpiadmin/calender?";
|
|
6088
|
+
if (startDate === null)
|
|
6089
|
+
throw new Error("The parameter 'startDate' cannot be null.");
|
|
6090
|
+
else if (startDate !== undefined)
|
|
6091
|
+
url_ += "startDate=" + encodeURIComponent(startDate ? "" + startDate.toISOString() : "") + "&";
|
|
6092
|
+
if (endDate === null)
|
|
6093
|
+
throw new Error("The parameter 'endDate' cannot be null.");
|
|
6094
|
+
else if (endDate !== undefined)
|
|
6095
|
+
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
|
|
6096
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6097
|
+
|
|
6098
|
+
let options_: RequestInit = {
|
|
6099
|
+
method: "GET",
|
|
6100
|
+
headers: {
|
|
6101
|
+
"Accept": "application/json"
|
|
6102
|
+
}
|
|
6103
|
+
};
|
|
6104
|
+
|
|
6105
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6106
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6107
|
+
}).then((_response: Response) => {
|
|
6108
|
+
return this.processGetCalenderCapacityAdmin(_response);
|
|
6109
|
+
});
|
|
6110
|
+
}
|
|
6111
|
+
|
|
6112
|
+
protected processGetCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto[]> {
|
|
6113
|
+
const status = response.status;
|
|
6114
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6115
|
+
if (status === 200) {
|
|
6116
|
+
return response.text().then((_responseText) => {
|
|
6117
|
+
let result200: any = null;
|
|
6118
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6119
|
+
if (Array.isArray(resultData200)) {
|
|
6120
|
+
result200 = [] as any;
|
|
6121
|
+
for (let item of resultData200)
|
|
6122
|
+
result200!.push(CalenderCapacityDto.fromJS(item));
|
|
6123
|
+
}
|
|
6124
|
+
return result200;
|
|
6125
|
+
});
|
|
6126
|
+
} else if (status !== 200 && status !== 204) {
|
|
6127
|
+
return response.text().then((_responseText) => {
|
|
6128
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6129
|
+
});
|
|
6130
|
+
}
|
|
6131
|
+
return Promise.resolve<CalenderCapacityDto[]>(null as any);
|
|
6132
|
+
}
|
|
6133
|
+
|
|
6134
|
+
updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto> {
|
|
6135
|
+
let url_ = this.baseUrl + "/kpiadmin/calender";
|
|
6136
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6137
|
+
|
|
6138
|
+
const content_ = JSON.stringify(request);
|
|
6139
|
+
|
|
6140
|
+
let options_: RequestInit = {
|
|
6141
|
+
body: content_,
|
|
6142
|
+
method: "PUT",
|
|
6143
|
+
headers: {
|
|
6144
|
+
"Content-Type": "application/json",
|
|
6145
|
+
"Accept": "application/json"
|
|
6146
|
+
}
|
|
6147
|
+
};
|
|
6148
|
+
|
|
6149
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6150
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6151
|
+
}).then((_response: Response) => {
|
|
6152
|
+
return this.processUpdateCalenderCapacityAdmin(_response);
|
|
6153
|
+
});
|
|
6154
|
+
}
|
|
6155
|
+
|
|
6156
|
+
protected processUpdateCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto> {
|
|
6157
|
+
const status = response.status;
|
|
6158
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6159
|
+
if (status === 200) {
|
|
6160
|
+
return response.text().then((_responseText) => {
|
|
6161
|
+
let result200: any = null;
|
|
6162
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6163
|
+
result200 = CalenderCapacityDto.fromJS(resultData200);
|
|
6164
|
+
return result200;
|
|
6165
|
+
});
|
|
6166
|
+
} else if (status !== 200 && status !== 204) {
|
|
6167
|
+
return response.text().then((_responseText) => {
|
|
6168
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6169
|
+
});
|
|
6170
|
+
}
|
|
6171
|
+
return Promise.resolve<CalenderCapacityDto>(null as any);
|
|
6172
|
+
}
|
|
5940
6173
|
}
|
|
5941
6174
|
|
|
5942
6175
|
export interface IMachinesClient {
|
|
@@ -29850,6 +30083,528 @@ export interface IDowntimeReasonCountDto {
|
|
|
29850
30083
|
reason: string;
|
|
29851
30084
|
}
|
|
29852
30085
|
|
|
30086
|
+
export class DowntimeReasonsReportDto implements IDowntimeReasonsReportDto {
|
|
30087
|
+
companyId?: string | null;
|
|
30088
|
+
totalDowntimeDurationMilliseconds?: number;
|
|
30089
|
+
downtimeReasons?: DowntimeReasonReport[];
|
|
30090
|
+
|
|
30091
|
+
constructor(data?: IDowntimeReasonsReportDto) {
|
|
30092
|
+
if (data) {
|
|
30093
|
+
for (var property in data) {
|
|
30094
|
+
if (data.hasOwnProperty(property))
|
|
30095
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30096
|
+
}
|
|
30097
|
+
}
|
|
30098
|
+
}
|
|
30099
|
+
|
|
30100
|
+
init(_data?: any) {
|
|
30101
|
+
if (_data) {
|
|
30102
|
+
this.companyId = _data["companyId"];
|
|
30103
|
+
this.totalDowntimeDurationMilliseconds = _data["totalDowntimeDurationMilliseconds"];
|
|
30104
|
+
if (Array.isArray(_data["downtimeReasons"])) {
|
|
30105
|
+
this.downtimeReasons = [] as any;
|
|
30106
|
+
for (let item of _data["downtimeReasons"])
|
|
30107
|
+
this.downtimeReasons!.push(DowntimeReasonReport.fromJS(item));
|
|
30108
|
+
}
|
|
30109
|
+
}
|
|
30110
|
+
}
|
|
30111
|
+
|
|
30112
|
+
static fromJS(data: any): DowntimeReasonsReportDto {
|
|
30113
|
+
data = typeof data === 'object' ? data : {};
|
|
30114
|
+
let result = new DowntimeReasonsReportDto();
|
|
30115
|
+
result.init(data);
|
|
30116
|
+
return result;
|
|
30117
|
+
}
|
|
30118
|
+
|
|
30119
|
+
toJSON(data?: any) {
|
|
30120
|
+
data = typeof data === 'object' ? data : {};
|
|
30121
|
+
data["companyId"] = this.companyId;
|
|
30122
|
+
data["totalDowntimeDurationMilliseconds"] = this.totalDowntimeDurationMilliseconds;
|
|
30123
|
+
if (Array.isArray(this.downtimeReasons)) {
|
|
30124
|
+
data["downtimeReasons"] = [];
|
|
30125
|
+
for (let item of this.downtimeReasons)
|
|
30126
|
+
data["downtimeReasons"].push(item.toJSON());
|
|
30127
|
+
}
|
|
30128
|
+
return data;
|
|
30129
|
+
}
|
|
30130
|
+
}
|
|
30131
|
+
|
|
30132
|
+
export interface IDowntimeReasonsReportDto {
|
|
30133
|
+
companyId?: string | null;
|
|
30134
|
+
totalDowntimeDurationMilliseconds?: number;
|
|
30135
|
+
downtimeReasons?: DowntimeReasonReport[];
|
|
30136
|
+
}
|
|
30137
|
+
|
|
30138
|
+
export class DowntimeReasonReport implements IDowntimeReasonReport {
|
|
30139
|
+
reasonId!: string;
|
|
30140
|
+
reasonType!: DowntimeReasonTypeDto;
|
|
30141
|
+
reason!: string;
|
|
30142
|
+
totalDurationMilliseconds!: number;
|
|
30143
|
+
count!: number;
|
|
30144
|
+
details!: DowntimeReasonInformation[];
|
|
30145
|
+
|
|
30146
|
+
constructor(data?: IDowntimeReasonReport) {
|
|
30147
|
+
if (data) {
|
|
30148
|
+
for (var property in data) {
|
|
30149
|
+
if (data.hasOwnProperty(property))
|
|
30150
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30151
|
+
}
|
|
30152
|
+
}
|
|
30153
|
+
if (!data) {
|
|
30154
|
+
this.details = [];
|
|
30155
|
+
}
|
|
30156
|
+
}
|
|
30157
|
+
|
|
30158
|
+
init(_data?: any) {
|
|
30159
|
+
if (_data) {
|
|
30160
|
+
this.reasonId = _data["reasonId"];
|
|
30161
|
+
this.reasonType = _data["reasonType"];
|
|
30162
|
+
this.reason = _data["reason"];
|
|
30163
|
+
this.totalDurationMilliseconds = _data["totalDurationMilliseconds"];
|
|
30164
|
+
this.count = _data["count"];
|
|
30165
|
+
if (Array.isArray(_data["details"])) {
|
|
30166
|
+
this.details = [] as any;
|
|
30167
|
+
for (let item of _data["details"])
|
|
30168
|
+
this.details!.push(DowntimeReasonInformation.fromJS(item));
|
|
30169
|
+
}
|
|
30170
|
+
}
|
|
30171
|
+
}
|
|
30172
|
+
|
|
30173
|
+
static fromJS(data: any): DowntimeReasonReport {
|
|
30174
|
+
data = typeof data === 'object' ? data : {};
|
|
30175
|
+
let result = new DowntimeReasonReport();
|
|
30176
|
+
result.init(data);
|
|
30177
|
+
return result;
|
|
30178
|
+
}
|
|
30179
|
+
|
|
30180
|
+
toJSON(data?: any) {
|
|
30181
|
+
data = typeof data === 'object' ? data : {};
|
|
30182
|
+
data["reasonId"] = this.reasonId;
|
|
30183
|
+
data["reasonType"] = this.reasonType;
|
|
30184
|
+
data["reason"] = this.reason;
|
|
30185
|
+
data["totalDurationMilliseconds"] = this.totalDurationMilliseconds;
|
|
30186
|
+
data["count"] = this.count;
|
|
30187
|
+
if (Array.isArray(this.details)) {
|
|
30188
|
+
data["details"] = [];
|
|
30189
|
+
for (let item of this.details)
|
|
30190
|
+
data["details"].push(item.toJSON());
|
|
30191
|
+
}
|
|
30192
|
+
return data;
|
|
30193
|
+
}
|
|
30194
|
+
}
|
|
30195
|
+
|
|
30196
|
+
export interface IDowntimeReasonReport {
|
|
30197
|
+
reasonId: string;
|
|
30198
|
+
reasonType: DowntimeReasonTypeDto;
|
|
30199
|
+
reason: string;
|
|
30200
|
+
totalDurationMilliseconds: number;
|
|
30201
|
+
count: number;
|
|
30202
|
+
details: DowntimeReasonInformation[];
|
|
30203
|
+
}
|
|
30204
|
+
|
|
30205
|
+
export class DowntimeReasonInformation implements IDowntimeReasonInformation {
|
|
30206
|
+
downtimeReason!: DowntimePeriodReasonDto;
|
|
30207
|
+
machine!: string;
|
|
30208
|
+
|
|
30209
|
+
constructor(data?: IDowntimeReasonInformation) {
|
|
30210
|
+
if (data) {
|
|
30211
|
+
for (var property in data) {
|
|
30212
|
+
if (data.hasOwnProperty(property))
|
|
30213
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30214
|
+
}
|
|
30215
|
+
}
|
|
30216
|
+
if (!data) {
|
|
30217
|
+
this.downtimeReason = new DowntimePeriodReasonDto();
|
|
30218
|
+
}
|
|
30219
|
+
}
|
|
30220
|
+
|
|
30221
|
+
init(_data?: any) {
|
|
30222
|
+
if (_data) {
|
|
30223
|
+
this.downtimeReason = _data["downtimeReason"] ? DowntimePeriodReasonDto.fromJS(_data["downtimeReason"]) : new DowntimePeriodReasonDto();
|
|
30224
|
+
this.machine = _data["machine"];
|
|
30225
|
+
}
|
|
30226
|
+
}
|
|
30227
|
+
|
|
30228
|
+
static fromJS(data: any): DowntimeReasonInformation {
|
|
30229
|
+
data = typeof data === 'object' ? data : {};
|
|
30230
|
+
let result = new DowntimeReasonInformation();
|
|
30231
|
+
result.init(data);
|
|
30232
|
+
return result;
|
|
30233
|
+
}
|
|
30234
|
+
|
|
30235
|
+
toJSON(data?: any) {
|
|
30236
|
+
data = typeof data === 'object' ? data : {};
|
|
30237
|
+
data["downtimeReason"] = this.downtimeReason ? this.downtimeReason.toJSON() : <any>undefined;
|
|
30238
|
+
data["machine"] = this.machine;
|
|
30239
|
+
return data;
|
|
30240
|
+
}
|
|
30241
|
+
}
|
|
30242
|
+
|
|
30243
|
+
export interface IDowntimeReasonInformation {
|
|
30244
|
+
downtimeReason: DowntimePeriodReasonDto;
|
|
30245
|
+
machine: string;
|
|
30246
|
+
}
|
|
30247
|
+
|
|
30248
|
+
export class CreateDowntimeReasonsReportRequest implements ICreateDowntimeReasonsReportRequest {
|
|
30249
|
+
machineExternalIds?: string[] | null;
|
|
30250
|
+
machineGroupNames?: string[] | null;
|
|
30251
|
+
startTime?: Date | null;
|
|
30252
|
+
endTime?: Date | null;
|
|
30253
|
+
|
|
30254
|
+
constructor(data?: ICreateDowntimeReasonsReportRequest) {
|
|
30255
|
+
if (data) {
|
|
30256
|
+
for (var property in data) {
|
|
30257
|
+
if (data.hasOwnProperty(property))
|
|
30258
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30259
|
+
}
|
|
30260
|
+
}
|
|
30261
|
+
}
|
|
30262
|
+
|
|
30263
|
+
init(_data?: any) {
|
|
30264
|
+
if (_data) {
|
|
30265
|
+
if (Array.isArray(_data["machineExternalIds"])) {
|
|
30266
|
+
this.machineExternalIds = [] as any;
|
|
30267
|
+
for (let item of _data["machineExternalIds"])
|
|
30268
|
+
this.machineExternalIds!.push(item);
|
|
30269
|
+
}
|
|
30270
|
+
if (Array.isArray(_data["machineGroupNames"])) {
|
|
30271
|
+
this.machineGroupNames = [] as any;
|
|
30272
|
+
for (let item of _data["machineGroupNames"])
|
|
30273
|
+
this.machineGroupNames!.push(item);
|
|
30274
|
+
}
|
|
30275
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
30276
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
30277
|
+
}
|
|
30278
|
+
}
|
|
30279
|
+
|
|
30280
|
+
static fromJS(data: any): CreateDowntimeReasonsReportRequest {
|
|
30281
|
+
data = typeof data === 'object' ? data : {};
|
|
30282
|
+
let result = new CreateDowntimeReasonsReportRequest();
|
|
30283
|
+
result.init(data);
|
|
30284
|
+
return result;
|
|
30285
|
+
}
|
|
30286
|
+
|
|
30287
|
+
toJSON(data?: any) {
|
|
30288
|
+
data = typeof data === 'object' ? data : {};
|
|
30289
|
+
if (Array.isArray(this.machineExternalIds)) {
|
|
30290
|
+
data["machineExternalIds"] = [];
|
|
30291
|
+
for (let item of this.machineExternalIds)
|
|
30292
|
+
data["machineExternalIds"].push(item);
|
|
30293
|
+
}
|
|
30294
|
+
if (Array.isArray(this.machineGroupNames)) {
|
|
30295
|
+
data["machineGroupNames"] = [];
|
|
30296
|
+
for (let item of this.machineGroupNames)
|
|
30297
|
+
data["machineGroupNames"].push(item);
|
|
30298
|
+
}
|
|
30299
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
30300
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
30301
|
+
return data;
|
|
30302
|
+
}
|
|
30303
|
+
}
|
|
30304
|
+
|
|
30305
|
+
export interface ICreateDowntimeReasonsReportRequest {
|
|
30306
|
+
machineExternalIds?: string[] | null;
|
|
30307
|
+
machineGroupNames?: string[] | null;
|
|
30308
|
+
startTime?: Date | null;
|
|
30309
|
+
endTime?: Date | null;
|
|
30310
|
+
}
|
|
30311
|
+
|
|
30312
|
+
export class MachineGroupCapacityDto implements IMachineGroupCapacityDto {
|
|
30313
|
+
machineGroupName!: string;
|
|
30314
|
+
machine!: MachineCapacityDto[];
|
|
30315
|
+
|
|
30316
|
+
constructor(data?: IMachineGroupCapacityDto) {
|
|
30317
|
+
if (data) {
|
|
30318
|
+
for (var property in data) {
|
|
30319
|
+
if (data.hasOwnProperty(property))
|
|
30320
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30321
|
+
}
|
|
30322
|
+
}
|
|
30323
|
+
if (!data) {
|
|
30324
|
+
this.machine = [];
|
|
30325
|
+
}
|
|
30326
|
+
}
|
|
30327
|
+
|
|
30328
|
+
init(_data?: any) {
|
|
30329
|
+
if (_data) {
|
|
30330
|
+
this.machineGroupName = _data["machineGroupName"];
|
|
30331
|
+
if (Array.isArray(_data["machine"])) {
|
|
30332
|
+
this.machine = [] as any;
|
|
30333
|
+
for (let item of _data["machine"])
|
|
30334
|
+
this.machine!.push(MachineCapacityDto.fromJS(item));
|
|
30335
|
+
}
|
|
30336
|
+
}
|
|
30337
|
+
}
|
|
30338
|
+
|
|
30339
|
+
static fromJS(data: any): MachineGroupCapacityDto {
|
|
30340
|
+
data = typeof data === 'object' ? data : {};
|
|
30341
|
+
let result = new MachineGroupCapacityDto();
|
|
30342
|
+
result.init(data);
|
|
30343
|
+
return result;
|
|
30344
|
+
}
|
|
30345
|
+
|
|
30346
|
+
toJSON(data?: any) {
|
|
30347
|
+
data = typeof data === 'object' ? data : {};
|
|
30348
|
+
data["machineGroupName"] = this.machineGroupName;
|
|
30349
|
+
if (Array.isArray(this.machine)) {
|
|
30350
|
+
data["machine"] = [];
|
|
30351
|
+
for (let item of this.machine)
|
|
30352
|
+
data["machine"].push(item.toJSON());
|
|
30353
|
+
}
|
|
30354
|
+
return data;
|
|
30355
|
+
}
|
|
30356
|
+
}
|
|
30357
|
+
|
|
30358
|
+
export interface IMachineGroupCapacityDto {
|
|
30359
|
+
machineGroupName: string;
|
|
30360
|
+
machine: MachineCapacityDto[];
|
|
30361
|
+
}
|
|
30362
|
+
|
|
30363
|
+
export class MachineCapacityDto implements IMachineCapacityDto {
|
|
30364
|
+
machineExternalId!: string;
|
|
30365
|
+
name!: string;
|
|
30366
|
+
comment?: string | null;
|
|
30367
|
+
capacity?: MachineCapacitySettingsDto[] | null;
|
|
30368
|
+
created?: Date | null;
|
|
30369
|
+
updatedBy?: string | null;
|
|
30370
|
+
updatedById?: string | null;
|
|
30371
|
+
|
|
30372
|
+
constructor(data?: IMachineCapacityDto) {
|
|
30373
|
+
if (data) {
|
|
30374
|
+
for (var property in data) {
|
|
30375
|
+
if (data.hasOwnProperty(property))
|
|
30376
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30377
|
+
}
|
|
30378
|
+
}
|
|
30379
|
+
}
|
|
30380
|
+
|
|
30381
|
+
init(_data?: any) {
|
|
30382
|
+
if (_data) {
|
|
30383
|
+
this.machineExternalId = _data["machineExternalId"];
|
|
30384
|
+
this.name = _data["name"];
|
|
30385
|
+
this.comment = _data["comment"];
|
|
30386
|
+
if (Array.isArray(_data["capacity"])) {
|
|
30387
|
+
this.capacity = [] as any;
|
|
30388
|
+
for (let item of _data["capacity"])
|
|
30389
|
+
this.capacity!.push(MachineCapacitySettingsDto.fromJS(item));
|
|
30390
|
+
}
|
|
30391
|
+
this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
|
|
30392
|
+
this.updatedBy = _data["updatedBy"];
|
|
30393
|
+
this.updatedById = _data["updatedById"];
|
|
30394
|
+
}
|
|
30395
|
+
}
|
|
30396
|
+
|
|
30397
|
+
static fromJS(data: any): MachineCapacityDto {
|
|
30398
|
+
data = typeof data === 'object' ? data : {};
|
|
30399
|
+
let result = new MachineCapacityDto();
|
|
30400
|
+
result.init(data);
|
|
30401
|
+
return result;
|
|
30402
|
+
}
|
|
30403
|
+
|
|
30404
|
+
toJSON(data?: any) {
|
|
30405
|
+
data = typeof data === 'object' ? data : {};
|
|
30406
|
+
data["machineExternalId"] = this.machineExternalId;
|
|
30407
|
+
data["name"] = this.name;
|
|
30408
|
+
data["comment"] = this.comment;
|
|
30409
|
+
if (Array.isArray(this.capacity)) {
|
|
30410
|
+
data["capacity"] = [];
|
|
30411
|
+
for (let item of this.capacity)
|
|
30412
|
+
data["capacity"].push(item.toJSON());
|
|
30413
|
+
}
|
|
30414
|
+
data["created"] = this.created ? this.created.toISOString() : <any>undefined;
|
|
30415
|
+
data["updatedBy"] = this.updatedBy;
|
|
30416
|
+
data["updatedById"] = this.updatedById;
|
|
30417
|
+
return data;
|
|
30418
|
+
}
|
|
30419
|
+
}
|
|
30420
|
+
|
|
30421
|
+
export interface IMachineCapacityDto {
|
|
30422
|
+
machineExternalId: string;
|
|
30423
|
+
name: string;
|
|
30424
|
+
comment?: string | null;
|
|
30425
|
+
capacity?: MachineCapacitySettingsDto[] | null;
|
|
30426
|
+
created?: Date | null;
|
|
30427
|
+
updatedBy?: string | null;
|
|
30428
|
+
updatedById?: string | null;
|
|
30429
|
+
}
|
|
30430
|
+
|
|
30431
|
+
export class MachineCapacitySettingsDto implements IMachineCapacitySettingsDto {
|
|
30432
|
+
capacityHours!: number;
|
|
30433
|
+
utilizationPercent!: number;
|
|
30434
|
+
|
|
30435
|
+
constructor(data?: IMachineCapacitySettingsDto) {
|
|
30436
|
+
if (data) {
|
|
30437
|
+
for (var property in data) {
|
|
30438
|
+
if (data.hasOwnProperty(property))
|
|
30439
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30440
|
+
}
|
|
30441
|
+
}
|
|
30442
|
+
}
|
|
30443
|
+
|
|
30444
|
+
init(_data?: any) {
|
|
30445
|
+
if (_data) {
|
|
30446
|
+
this.capacityHours = _data["capacityHours"];
|
|
30447
|
+
this.utilizationPercent = _data["utilizationPercent"];
|
|
30448
|
+
}
|
|
30449
|
+
}
|
|
30450
|
+
|
|
30451
|
+
static fromJS(data: any): MachineCapacitySettingsDto {
|
|
30452
|
+
data = typeof data === 'object' ? data : {};
|
|
30453
|
+
let result = new MachineCapacitySettingsDto();
|
|
30454
|
+
result.init(data);
|
|
30455
|
+
return result;
|
|
30456
|
+
}
|
|
30457
|
+
|
|
30458
|
+
toJSON(data?: any) {
|
|
30459
|
+
data = typeof data === 'object' ? data : {};
|
|
30460
|
+
data["capacityHours"] = this.capacityHours;
|
|
30461
|
+
data["utilizationPercent"] = this.utilizationPercent;
|
|
30462
|
+
return data;
|
|
30463
|
+
}
|
|
30464
|
+
}
|
|
30465
|
+
|
|
30466
|
+
export interface IMachineCapacitySettingsDto {
|
|
30467
|
+
capacityHours: number;
|
|
30468
|
+
utilizationPercent: number;
|
|
30469
|
+
}
|
|
30470
|
+
|
|
30471
|
+
export class UpdateMachinesCapacity implements IUpdateMachinesCapacity {
|
|
30472
|
+
machineExternalId!: string;
|
|
30473
|
+
comment?: string | null;
|
|
30474
|
+
capacity!: MachineCapacitySettingsDto[];
|
|
30475
|
+
|
|
30476
|
+
constructor(data?: IUpdateMachinesCapacity) {
|
|
30477
|
+
if (data) {
|
|
30478
|
+
for (var property in data) {
|
|
30479
|
+
if (data.hasOwnProperty(property))
|
|
30480
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30481
|
+
}
|
|
30482
|
+
}
|
|
30483
|
+
if (!data) {
|
|
30484
|
+
this.capacity = [];
|
|
30485
|
+
}
|
|
30486
|
+
}
|
|
30487
|
+
|
|
30488
|
+
init(_data?: any) {
|
|
30489
|
+
if (_data) {
|
|
30490
|
+
this.machineExternalId = _data["machineExternalId"];
|
|
30491
|
+
this.comment = _data["comment"];
|
|
30492
|
+
if (Array.isArray(_data["capacity"])) {
|
|
30493
|
+
this.capacity = [] as any;
|
|
30494
|
+
for (let item of _data["capacity"])
|
|
30495
|
+
this.capacity!.push(MachineCapacitySettingsDto.fromJS(item));
|
|
30496
|
+
}
|
|
30497
|
+
}
|
|
30498
|
+
}
|
|
30499
|
+
|
|
30500
|
+
static fromJS(data: any): UpdateMachinesCapacity {
|
|
30501
|
+
data = typeof data === 'object' ? data : {};
|
|
30502
|
+
let result = new UpdateMachinesCapacity();
|
|
30503
|
+
result.init(data);
|
|
30504
|
+
return result;
|
|
30505
|
+
}
|
|
30506
|
+
|
|
30507
|
+
toJSON(data?: any) {
|
|
30508
|
+
data = typeof data === 'object' ? data : {};
|
|
30509
|
+
data["machineExternalId"] = this.machineExternalId;
|
|
30510
|
+
data["comment"] = this.comment;
|
|
30511
|
+
if (Array.isArray(this.capacity)) {
|
|
30512
|
+
data["capacity"] = [];
|
|
30513
|
+
for (let item of this.capacity)
|
|
30514
|
+
data["capacity"].push(item.toJSON());
|
|
30515
|
+
}
|
|
30516
|
+
return data;
|
|
30517
|
+
}
|
|
30518
|
+
}
|
|
30519
|
+
|
|
30520
|
+
export interface IUpdateMachinesCapacity {
|
|
30521
|
+
machineExternalId: string;
|
|
30522
|
+
comment?: string | null;
|
|
30523
|
+
capacity: MachineCapacitySettingsDto[];
|
|
30524
|
+
}
|
|
30525
|
+
|
|
30526
|
+
export class CalenderCapacityDto implements ICalenderCapacityDto {
|
|
30527
|
+
date?: Date;
|
|
30528
|
+
dayCapacity?: CalenderDayCapacityDto;
|
|
30529
|
+
|
|
30530
|
+
constructor(data?: ICalenderCapacityDto) {
|
|
30531
|
+
if (data) {
|
|
30532
|
+
for (var property in data) {
|
|
30533
|
+
if (data.hasOwnProperty(property))
|
|
30534
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30535
|
+
}
|
|
30536
|
+
}
|
|
30537
|
+
}
|
|
30538
|
+
|
|
30539
|
+
init(_data?: any) {
|
|
30540
|
+
if (_data) {
|
|
30541
|
+
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
30542
|
+
this.dayCapacity = _data["dayCapacity"];
|
|
30543
|
+
}
|
|
30544
|
+
}
|
|
30545
|
+
|
|
30546
|
+
static fromJS(data: any): CalenderCapacityDto {
|
|
30547
|
+
data = typeof data === 'object' ? data : {};
|
|
30548
|
+
let result = new CalenderCapacityDto();
|
|
30549
|
+
result.init(data);
|
|
30550
|
+
return result;
|
|
30551
|
+
}
|
|
30552
|
+
|
|
30553
|
+
toJSON(data?: any) {
|
|
30554
|
+
data = typeof data === 'object' ? data : {};
|
|
30555
|
+
data["date"] = this.date ? formatDate(this.date) : <any>undefined;
|
|
30556
|
+
data["dayCapacity"] = this.dayCapacity;
|
|
30557
|
+
return data;
|
|
30558
|
+
}
|
|
30559
|
+
}
|
|
30560
|
+
|
|
30561
|
+
export interface ICalenderCapacityDto {
|
|
30562
|
+
date?: Date;
|
|
30563
|
+
dayCapacity?: CalenderDayCapacityDto;
|
|
30564
|
+
}
|
|
30565
|
+
|
|
30566
|
+
export type CalenderDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
|
|
30567
|
+
|
|
30568
|
+
export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
|
|
30569
|
+
date!: Date;
|
|
30570
|
+
dayCapacity!: CalenderDayCapacityDto;
|
|
30571
|
+
|
|
30572
|
+
constructor(data?: IUpdateCalenderCapacity) {
|
|
30573
|
+
if (data) {
|
|
30574
|
+
for (var property in data) {
|
|
30575
|
+
if (data.hasOwnProperty(property))
|
|
30576
|
+
(<any>this)[property] = (<any>data)[property];
|
|
30577
|
+
}
|
|
30578
|
+
}
|
|
30579
|
+
}
|
|
30580
|
+
|
|
30581
|
+
init(_data?: any) {
|
|
30582
|
+
if (_data) {
|
|
30583
|
+
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
30584
|
+
this.dayCapacity = _data["dayCapacity"];
|
|
30585
|
+
}
|
|
30586
|
+
}
|
|
30587
|
+
|
|
30588
|
+
static fromJS(data: any): UpdateCalenderCapacity {
|
|
30589
|
+
data = typeof data === 'object' ? data : {};
|
|
30590
|
+
let result = new UpdateCalenderCapacity();
|
|
30591
|
+
result.init(data);
|
|
30592
|
+
return result;
|
|
30593
|
+
}
|
|
30594
|
+
|
|
30595
|
+
toJSON(data?: any) {
|
|
30596
|
+
data = typeof data === 'object' ? data : {};
|
|
30597
|
+
data["date"] = this.date ? formatDate(this.date) : <any>undefined;
|
|
30598
|
+
data["dayCapacity"] = this.dayCapacity;
|
|
30599
|
+
return data;
|
|
30600
|
+
}
|
|
30601
|
+
}
|
|
30602
|
+
|
|
30603
|
+
export interface IUpdateCalenderCapacity {
|
|
30604
|
+
date: Date;
|
|
30605
|
+
dayCapacity: CalenderDayCapacityDto;
|
|
30606
|
+
}
|
|
30607
|
+
|
|
29853
30608
|
export class MachineDto implements IMachineDto {
|
|
29854
30609
|
id!: number;
|
|
29855
30610
|
externalId!: string;
|
|
@@ -38519,6 +39274,7 @@ export class BookingParcelDto implements IBookingParcelDto {
|
|
|
38519
39274
|
materialOperation?: number | null;
|
|
38520
39275
|
materialLine?: number | null;
|
|
38521
39276
|
materialQuantity?: number | null;
|
|
39277
|
+
materialUnit?: string | null;
|
|
38522
39278
|
materialPartName?: string | null;
|
|
38523
39279
|
materialPartNumber?: string | null;
|
|
38524
39280
|
covered!: MaterialCoveredDto;
|
|
@@ -38544,6 +39300,7 @@ export class BookingParcelDto implements IBookingParcelDto {
|
|
|
38544
39300
|
this.materialOperation = _data["materialOperation"];
|
|
38545
39301
|
this.materialLine = _data["materialLine"];
|
|
38546
39302
|
this.materialQuantity = _data["materialQuantity"];
|
|
39303
|
+
this.materialUnit = _data["materialUnit"];
|
|
38547
39304
|
this.materialPartName = _data["materialPartName"];
|
|
38548
39305
|
this.materialPartNumber = _data["materialPartNumber"];
|
|
38549
39306
|
this.covered = _data["covered"];
|
|
@@ -38569,6 +39326,7 @@ export class BookingParcelDto implements IBookingParcelDto {
|
|
|
38569
39326
|
data["materialOperation"] = this.materialOperation;
|
|
38570
39327
|
data["materialLine"] = this.materialLine;
|
|
38571
39328
|
data["materialQuantity"] = this.materialQuantity;
|
|
39329
|
+
data["materialUnit"] = this.materialUnit;
|
|
38572
39330
|
data["materialPartName"] = this.materialPartName;
|
|
38573
39331
|
data["materialPartNumber"] = this.materialPartNumber;
|
|
38574
39332
|
data["covered"] = this.covered;
|
|
@@ -38587,6 +39345,7 @@ export interface IBookingParcelDto {
|
|
|
38587
39345
|
materialOperation?: number | null;
|
|
38588
39346
|
materialLine?: number | null;
|
|
38589
39347
|
materialQuantity?: number | null;
|
|
39348
|
+
materialUnit?: string | null;
|
|
38590
39349
|
materialPartName?: string | null;
|
|
38591
39350
|
materialPartNumber?: string | null;
|
|
38592
39351
|
covered: MaterialCoveredDto;
|