@ignos/api-client 20250911.0.12594 → 20250917.0.12649
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 +18 -4
- package/lib/ignosportal-api.js +96 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +110 -4
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -785,6 +785,8 @@ export interface IDowntimeReasonsClient {
|
|
|
785
785
|
updateDowntimePeriodReason(id: number, request: UpdateDowntimePeriodReasonRequest): Promise<DowntimePeriodReasonDto>;
|
|
786
786
|
deleteDowntimeReason(id: number): Promise<void>;
|
|
787
787
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
788
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]>;
|
|
789
|
+
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
788
790
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
789
791
|
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto>;
|
|
790
792
|
exportReportToCsv(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportCsvDto>;
|
|
@@ -804,6 +806,10 @@ export declare class DowntimeReasonsClient extends AuthorizedApiBase implements
|
|
|
804
806
|
protected processDeleteDowntimeReason(response: Response): Promise<void>;
|
|
805
807
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
806
808
|
protected processListDowntimeReasonsForMachine(response: Response): Promise<DowntimeReasonDto[]>;
|
|
809
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]>;
|
|
810
|
+
protected processListDowntimeReasonsHierarchyForMachine(response: Response): Promise<ParentTopicDto[]>;
|
|
811
|
+
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
812
|
+
protected processListActiveDowntimeReasonsForMachine(response: Response): Promise<DowntimePeriodReasonDto[]>;
|
|
807
813
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
808
814
|
protected processListTopDowntimeReasons(response: Response): Promise<TopDowntimeReasonsDto>;
|
|
809
815
|
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto>;
|
|
@@ -3063,11 +3069,12 @@ export declare class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto
|
|
|
3063
3069
|
reason: string;
|
|
3064
3070
|
reasonType: DowntimeReasonTypeDto;
|
|
3065
3071
|
startTime: Date;
|
|
3066
|
-
endTime
|
|
3072
|
+
endTime?: Date | null;
|
|
3067
3073
|
assetId: number;
|
|
3068
3074
|
comment?: string | null;
|
|
3069
3075
|
companyId?: string | null;
|
|
3070
3076
|
reasonId: string;
|
|
3077
|
+
autoCompleteDowntime?: boolean | null;
|
|
3071
3078
|
createdBy?: EmployeeDto | null;
|
|
3072
3079
|
updatedBy?: EmployeeDto | null;
|
|
3073
3080
|
constructor(data?: IDowntimePeriodReasonDto);
|
|
@@ -3080,11 +3087,12 @@ export interface IDowntimePeriodReasonDto {
|
|
|
3080
3087
|
reason: string;
|
|
3081
3088
|
reasonType: DowntimeReasonTypeDto;
|
|
3082
3089
|
startTime: Date;
|
|
3083
|
-
endTime
|
|
3090
|
+
endTime?: Date | null;
|
|
3084
3091
|
assetId: number;
|
|
3085
3092
|
comment?: string | null;
|
|
3086
3093
|
companyId?: string | null;
|
|
3087
3094
|
reasonId: string;
|
|
3095
|
+
autoCompleteDowntime?: boolean | null;
|
|
3088
3096
|
createdBy?: EmployeeDto | null;
|
|
3089
3097
|
updatedBy?: EmployeeDto | null;
|
|
3090
3098
|
}
|
|
@@ -5896,7 +5904,8 @@ export declare class CreateDowntimePeriodReason implements ICreateDowntimePeriod
|
|
|
5896
5904
|
reasonId: string;
|
|
5897
5905
|
assetId: number;
|
|
5898
5906
|
startTime: Date;
|
|
5899
|
-
endTime
|
|
5907
|
+
endTime?: Date | null;
|
|
5908
|
+
autoCompleteDowntime?: boolean | null;
|
|
5900
5909
|
comment?: string | null;
|
|
5901
5910
|
constructor(data?: ICreateDowntimePeriodReason);
|
|
5902
5911
|
init(_data?: any): void;
|
|
@@ -5907,7 +5916,8 @@ export interface ICreateDowntimePeriodReason {
|
|
|
5907
5916
|
reasonId: string;
|
|
5908
5917
|
assetId: number;
|
|
5909
5918
|
startTime: Date;
|
|
5910
|
-
endTime
|
|
5919
|
+
endTime?: Date | null;
|
|
5920
|
+
autoCompleteDowntime?: boolean | null;
|
|
5911
5921
|
comment?: string | null;
|
|
5912
5922
|
}
|
|
5913
5923
|
export declare class UpdateDowntimePeriodReasonRequest implements IUpdateDowntimePeriodReasonRequest {
|
|
@@ -5915,6 +5925,7 @@ export declare class UpdateDowntimePeriodReasonRequest implements IUpdateDowntim
|
|
|
5915
5925
|
assetId?: number | null;
|
|
5916
5926
|
startTime?: Date | null;
|
|
5917
5927
|
endTime?: Date | null;
|
|
5928
|
+
autoCompleteDowntime?: boolean | null;
|
|
5918
5929
|
comment?: string | null;
|
|
5919
5930
|
constructor(data?: IUpdateDowntimePeriodReasonRequest);
|
|
5920
5931
|
init(_data?: any): void;
|
|
@@ -5926,6 +5937,7 @@ export interface IUpdateDowntimePeriodReasonRequest {
|
|
|
5926
5937
|
assetId?: number | null;
|
|
5927
5938
|
startTime?: Date | null;
|
|
5928
5939
|
endTime?: Date | null;
|
|
5940
|
+
autoCompleteDowntime?: boolean | null;
|
|
5929
5941
|
comment?: string | null;
|
|
5930
5942
|
}
|
|
5931
5943
|
export declare class TopDowntimeReasonsDto implements ITopDowntimeReasonsDto {
|
|
@@ -6398,6 +6410,7 @@ export declare class SingleMachineErpDataListDto implements ISingleMachineErpDat
|
|
|
6398
6410
|
description?: string;
|
|
6399
6411
|
activeOrders: MachineErpDataDto[];
|
|
6400
6412
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
6413
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
6401
6414
|
constructor(data?: ISingleMachineErpDataListDto);
|
|
6402
6415
|
init(_data?: any): void;
|
|
6403
6416
|
static fromJS(data: any): SingleMachineErpDataListDto;
|
|
@@ -6409,6 +6422,7 @@ export interface ISingleMachineErpDataListDto {
|
|
|
6409
6422
|
description?: string;
|
|
6410
6423
|
activeOrders: MachineErpDataDto[];
|
|
6411
6424
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
6425
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
6412
6426
|
}
|
|
6413
6427
|
export declare class MachineErpDataDto implements IMachineErpDataDto {
|
|
6414
6428
|
workOrderId: string;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -6181,6 +6181,94 @@ export class DowntimeReasonsClient extends AuthorizedApiBase {
|
|
|
6181
6181
|
}
|
|
6182
6182
|
return Promise.resolve(null);
|
|
6183
6183
|
}
|
|
6184
|
+
listDowntimeReasonsHierarchyForMachine(id) {
|
|
6185
|
+
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/downtimereasonshierarchy";
|
|
6186
|
+
if (id === undefined || id === null)
|
|
6187
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6188
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6189
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6190
|
+
let options_ = {
|
|
6191
|
+
method: "GET",
|
|
6192
|
+
headers: {
|
|
6193
|
+
"Accept": "application/json"
|
|
6194
|
+
}
|
|
6195
|
+
};
|
|
6196
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6197
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6198
|
+
}).then((_response) => {
|
|
6199
|
+
return this.processListDowntimeReasonsHierarchyForMachine(_response);
|
|
6200
|
+
});
|
|
6201
|
+
}
|
|
6202
|
+
processListDowntimeReasonsHierarchyForMachine(response) {
|
|
6203
|
+
const status = response.status;
|
|
6204
|
+
let _headers = {};
|
|
6205
|
+
if (response.headers && response.headers.forEach) {
|
|
6206
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6207
|
+
}
|
|
6208
|
+
;
|
|
6209
|
+
if (status === 200) {
|
|
6210
|
+
return response.text().then((_responseText) => {
|
|
6211
|
+
let result200 = null;
|
|
6212
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6213
|
+
if (Array.isArray(resultData200)) {
|
|
6214
|
+
result200 = [];
|
|
6215
|
+
for (let item of resultData200)
|
|
6216
|
+
result200.push(ParentTopicDto.fromJS(item));
|
|
6217
|
+
}
|
|
6218
|
+
return result200;
|
|
6219
|
+
});
|
|
6220
|
+
}
|
|
6221
|
+
else if (status !== 200 && status !== 204) {
|
|
6222
|
+
return response.text().then((_responseText) => {
|
|
6223
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6224
|
+
});
|
|
6225
|
+
}
|
|
6226
|
+
return Promise.resolve(null);
|
|
6227
|
+
}
|
|
6228
|
+
listActiveDowntimeReasonsForMachine(id) {
|
|
6229
|
+
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/active";
|
|
6230
|
+
if (id === undefined || id === null)
|
|
6231
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6232
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6233
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6234
|
+
let options_ = {
|
|
6235
|
+
method: "GET",
|
|
6236
|
+
headers: {
|
|
6237
|
+
"Accept": "application/json"
|
|
6238
|
+
}
|
|
6239
|
+
};
|
|
6240
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6241
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6242
|
+
}).then((_response) => {
|
|
6243
|
+
return this.processListActiveDowntimeReasonsForMachine(_response);
|
|
6244
|
+
});
|
|
6245
|
+
}
|
|
6246
|
+
processListActiveDowntimeReasonsForMachine(response) {
|
|
6247
|
+
const status = response.status;
|
|
6248
|
+
let _headers = {};
|
|
6249
|
+
if (response.headers && response.headers.forEach) {
|
|
6250
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6251
|
+
}
|
|
6252
|
+
;
|
|
6253
|
+
if (status === 200) {
|
|
6254
|
+
return response.text().then((_responseText) => {
|
|
6255
|
+
let result200 = null;
|
|
6256
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6257
|
+
if (Array.isArray(resultData200)) {
|
|
6258
|
+
result200 = [];
|
|
6259
|
+
for (let item of resultData200)
|
|
6260
|
+
result200.push(DowntimePeriodReasonDto.fromJS(item));
|
|
6261
|
+
}
|
|
6262
|
+
return result200;
|
|
6263
|
+
});
|
|
6264
|
+
}
|
|
6265
|
+
else if (status !== 200 && status !== 204) {
|
|
6266
|
+
return response.text().then((_responseText) => {
|
|
6267
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6268
|
+
});
|
|
6269
|
+
}
|
|
6270
|
+
return Promise.resolve(null);
|
|
6271
|
+
}
|
|
6184
6272
|
listTopDowntimeReasons() {
|
|
6185
6273
|
let url_ = this.baseUrl + "/downtimereasons/topreasons";
|
|
6186
6274
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -23837,6 +23925,7 @@ export class DowntimePeriodReasonDto {
|
|
|
23837
23925
|
this.comment = _data["comment"];
|
|
23838
23926
|
this.companyId = _data["companyId"];
|
|
23839
23927
|
this.reasonId = _data["reasonId"];
|
|
23928
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
23840
23929
|
this.createdBy = _data["createdBy"] ? EmployeeDto.fromJS(_data["createdBy"]) : undefined;
|
|
23841
23930
|
this.updatedBy = _data["updatedBy"] ? EmployeeDto.fromJS(_data["updatedBy"]) : undefined;
|
|
23842
23931
|
}
|
|
@@ -23858,6 +23947,7 @@ export class DowntimePeriodReasonDto {
|
|
|
23858
23947
|
data["comment"] = this.comment;
|
|
23859
23948
|
data["companyId"] = this.companyId;
|
|
23860
23949
|
data["reasonId"] = this.reasonId;
|
|
23950
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
23861
23951
|
data["createdBy"] = this.createdBy ? this.createdBy.toJSON() : undefined;
|
|
23862
23952
|
data["updatedBy"] = this.updatedBy ? this.updatedBy.toJSON() : undefined;
|
|
23863
23953
|
return data;
|
|
@@ -29838,6 +29928,7 @@ export class CreateDowntimePeriodReason {
|
|
|
29838
29928
|
this.assetId = _data["assetId"];
|
|
29839
29929
|
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
|
|
29840
29930
|
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
|
|
29931
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
29841
29932
|
this.comment = _data["comment"];
|
|
29842
29933
|
}
|
|
29843
29934
|
}
|
|
@@ -29853,6 +29944,7 @@ export class CreateDowntimePeriodReason {
|
|
|
29853
29944
|
data["assetId"] = this.assetId;
|
|
29854
29945
|
data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
|
|
29855
29946
|
data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
|
|
29947
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
29856
29948
|
data["comment"] = this.comment;
|
|
29857
29949
|
return data;
|
|
29858
29950
|
}
|
|
@@ -29872,6 +29964,7 @@ export class UpdateDowntimePeriodReasonRequest {
|
|
|
29872
29964
|
this.assetId = _data["assetId"];
|
|
29873
29965
|
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
|
|
29874
29966
|
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
|
|
29967
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
29875
29968
|
this.comment = _data["comment"];
|
|
29876
29969
|
}
|
|
29877
29970
|
}
|
|
@@ -29887,6 +29980,7 @@ export class UpdateDowntimePeriodReasonRequest {
|
|
|
29887
29980
|
data["assetId"] = this.assetId;
|
|
29888
29981
|
data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
|
|
29889
29982
|
data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
|
|
29983
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
29890
29984
|
data["comment"] = this.comment;
|
|
29891
29985
|
return data;
|
|
29892
29986
|
}
|
|
@@ -31060,6 +31154,7 @@ export class SingleMachineErpDataListDto {
|
|
|
31060
31154
|
this.activeOrders.push(MachineErpDataDto.fromJS(item));
|
|
31061
31155
|
}
|
|
31062
31156
|
this.lastActiveEvent = _data["lastActiveEvent"] ? WorkorderOperationEventDto.fromJS(_data["lastActiveEvent"]) : undefined;
|
|
31157
|
+
this.downtimePeriodReason = _data["downtimePeriodReason"] ? DowntimePeriodReasonDto.fromJS(_data["downtimePeriodReason"]) : undefined;
|
|
31063
31158
|
}
|
|
31064
31159
|
}
|
|
31065
31160
|
static fromJS(data) {
|
|
@@ -31079,6 +31174,7 @@ export class SingleMachineErpDataListDto {
|
|
|
31079
31174
|
data["activeOrders"].push(item.toJSON());
|
|
31080
31175
|
}
|
|
31081
31176
|
data["lastActiveEvent"] = this.lastActiveEvent ? this.lastActiveEvent.toJSON() : undefined;
|
|
31177
|
+
data["downtimePeriodReason"] = this.downtimePeriodReason ? this.downtimePeriodReason.toJSON() : undefined;
|
|
31082
31178
|
return data;
|
|
31083
31179
|
}
|
|
31084
31180
|
}
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -6453,6 +6453,10 @@ export interface IDowntimeReasonsClient {
|
|
|
6453
6453
|
|
|
6454
6454
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
6455
6455
|
|
|
6456
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]>;
|
|
6457
|
+
|
|
6458
|
+
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
6459
|
+
|
|
6456
6460
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
6457
6461
|
|
|
6458
6462
|
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto>;
|
|
@@ -6632,6 +6636,92 @@ export class DowntimeReasonsClient extends AuthorizedApiBase implements IDowntim
|
|
|
6632
6636
|
return Promise.resolve<DowntimeReasonDto[]>(null as any);
|
|
6633
6637
|
}
|
|
6634
6638
|
|
|
6639
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]> {
|
|
6640
|
+
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/downtimereasonshierarchy";
|
|
6641
|
+
if (id === undefined || id === null)
|
|
6642
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6643
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6644
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6645
|
+
|
|
6646
|
+
let options_: RequestInit = {
|
|
6647
|
+
method: "GET",
|
|
6648
|
+
headers: {
|
|
6649
|
+
"Accept": "application/json"
|
|
6650
|
+
}
|
|
6651
|
+
};
|
|
6652
|
+
|
|
6653
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6654
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6655
|
+
}).then((_response: Response) => {
|
|
6656
|
+
return this.processListDowntimeReasonsHierarchyForMachine(_response);
|
|
6657
|
+
});
|
|
6658
|
+
}
|
|
6659
|
+
|
|
6660
|
+
protected processListDowntimeReasonsHierarchyForMachine(response: Response): Promise<ParentTopicDto[]> {
|
|
6661
|
+
const status = response.status;
|
|
6662
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6663
|
+
if (status === 200) {
|
|
6664
|
+
return response.text().then((_responseText) => {
|
|
6665
|
+
let result200: any = null;
|
|
6666
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6667
|
+
if (Array.isArray(resultData200)) {
|
|
6668
|
+
result200 = [] as any;
|
|
6669
|
+
for (let item of resultData200)
|
|
6670
|
+
result200!.push(ParentTopicDto.fromJS(item));
|
|
6671
|
+
}
|
|
6672
|
+
return result200;
|
|
6673
|
+
});
|
|
6674
|
+
} else if (status !== 200 && status !== 204) {
|
|
6675
|
+
return response.text().then((_responseText) => {
|
|
6676
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6677
|
+
});
|
|
6678
|
+
}
|
|
6679
|
+
return Promise.resolve<ParentTopicDto[]>(null as any);
|
|
6680
|
+
}
|
|
6681
|
+
|
|
6682
|
+
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]> {
|
|
6683
|
+
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/active";
|
|
6684
|
+
if (id === undefined || id === null)
|
|
6685
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6686
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6687
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6688
|
+
|
|
6689
|
+
let options_: RequestInit = {
|
|
6690
|
+
method: "GET",
|
|
6691
|
+
headers: {
|
|
6692
|
+
"Accept": "application/json"
|
|
6693
|
+
}
|
|
6694
|
+
};
|
|
6695
|
+
|
|
6696
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6697
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6698
|
+
}).then((_response: Response) => {
|
|
6699
|
+
return this.processListActiveDowntimeReasonsForMachine(_response);
|
|
6700
|
+
});
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6703
|
+
protected processListActiveDowntimeReasonsForMachine(response: Response): Promise<DowntimePeriodReasonDto[]> {
|
|
6704
|
+
const status = response.status;
|
|
6705
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6706
|
+
if (status === 200) {
|
|
6707
|
+
return response.text().then((_responseText) => {
|
|
6708
|
+
let result200: any = null;
|
|
6709
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6710
|
+
if (Array.isArray(resultData200)) {
|
|
6711
|
+
result200 = [] as any;
|
|
6712
|
+
for (let item of resultData200)
|
|
6713
|
+
result200!.push(DowntimePeriodReasonDto.fromJS(item));
|
|
6714
|
+
}
|
|
6715
|
+
return result200;
|
|
6716
|
+
});
|
|
6717
|
+
} else if (status !== 200 && status !== 204) {
|
|
6718
|
+
return response.text().then((_responseText) => {
|
|
6719
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6720
|
+
});
|
|
6721
|
+
}
|
|
6722
|
+
return Promise.resolve<DowntimePeriodReasonDto[]>(null as any);
|
|
6723
|
+
}
|
|
6724
|
+
|
|
6635
6725
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto> {
|
|
6636
6726
|
let url_ = this.baseUrl + "/downtimereasons/topreasons";
|
|
6637
6727
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -25642,11 +25732,12 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
|
|
|
25642
25732
|
reason!: string;
|
|
25643
25733
|
reasonType!: DowntimeReasonTypeDto;
|
|
25644
25734
|
startTime!: Date;
|
|
25645
|
-
endTime
|
|
25735
|
+
endTime?: Date | null;
|
|
25646
25736
|
assetId!: number;
|
|
25647
25737
|
comment?: string | null;
|
|
25648
25738
|
companyId?: string | null;
|
|
25649
25739
|
reasonId!: string;
|
|
25740
|
+
autoCompleteDowntime?: boolean | null;
|
|
25650
25741
|
createdBy?: EmployeeDto | null;
|
|
25651
25742
|
updatedBy?: EmployeeDto | null;
|
|
25652
25743
|
|
|
@@ -25670,6 +25761,7 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
|
|
|
25670
25761
|
this.comment = _data["comment"];
|
|
25671
25762
|
this.companyId = _data["companyId"];
|
|
25672
25763
|
this.reasonId = _data["reasonId"];
|
|
25764
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
25673
25765
|
this.createdBy = _data["createdBy"] ? EmployeeDto.fromJS(_data["createdBy"]) : <any>undefined;
|
|
25674
25766
|
this.updatedBy = _data["updatedBy"] ? EmployeeDto.fromJS(_data["updatedBy"]) : <any>undefined;
|
|
25675
25767
|
}
|
|
@@ -25693,6 +25785,7 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
|
|
|
25693
25785
|
data["comment"] = this.comment;
|
|
25694
25786
|
data["companyId"] = this.companyId;
|
|
25695
25787
|
data["reasonId"] = this.reasonId;
|
|
25788
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
25696
25789
|
data["createdBy"] = this.createdBy ? this.createdBy.toJSON() : <any>undefined;
|
|
25697
25790
|
data["updatedBy"] = this.updatedBy ? this.updatedBy.toJSON() : <any>undefined;
|
|
25698
25791
|
return data;
|
|
@@ -25704,11 +25797,12 @@ export interface IDowntimePeriodReasonDto {
|
|
|
25704
25797
|
reason: string;
|
|
25705
25798
|
reasonType: DowntimeReasonTypeDto;
|
|
25706
25799
|
startTime: Date;
|
|
25707
|
-
endTime
|
|
25800
|
+
endTime?: Date | null;
|
|
25708
25801
|
assetId: number;
|
|
25709
25802
|
comment?: string | null;
|
|
25710
25803
|
companyId?: string | null;
|
|
25711
25804
|
reasonId: string;
|
|
25805
|
+
autoCompleteDowntime?: boolean | null;
|
|
25712
25806
|
createdBy?: EmployeeDto | null;
|
|
25713
25807
|
updatedBy?: EmployeeDto | null;
|
|
25714
25808
|
}
|
|
@@ -34497,7 +34591,8 @@ export class CreateDowntimePeriodReason implements ICreateDowntimePeriodReason {
|
|
|
34497
34591
|
reasonId!: string;
|
|
34498
34592
|
assetId!: number;
|
|
34499
34593
|
startTime!: Date;
|
|
34500
|
-
endTime
|
|
34594
|
+
endTime?: Date | null;
|
|
34595
|
+
autoCompleteDowntime?: boolean | null;
|
|
34501
34596
|
comment?: string | null;
|
|
34502
34597
|
|
|
34503
34598
|
constructor(data?: ICreateDowntimePeriodReason) {
|
|
@@ -34515,6 +34610,7 @@ export class CreateDowntimePeriodReason implements ICreateDowntimePeriodReason {
|
|
|
34515
34610
|
this.assetId = _data["assetId"];
|
|
34516
34611
|
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
34517
34612
|
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
34613
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
34518
34614
|
this.comment = _data["comment"];
|
|
34519
34615
|
}
|
|
34520
34616
|
}
|
|
@@ -34532,6 +34628,7 @@ export class CreateDowntimePeriodReason implements ICreateDowntimePeriodReason {
|
|
|
34532
34628
|
data["assetId"] = this.assetId;
|
|
34533
34629
|
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
34534
34630
|
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
34631
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
34535
34632
|
data["comment"] = this.comment;
|
|
34536
34633
|
return data;
|
|
34537
34634
|
}
|
|
@@ -34541,7 +34638,8 @@ export interface ICreateDowntimePeriodReason {
|
|
|
34541
34638
|
reasonId: string;
|
|
34542
34639
|
assetId: number;
|
|
34543
34640
|
startTime: Date;
|
|
34544
|
-
endTime
|
|
34641
|
+
endTime?: Date | null;
|
|
34642
|
+
autoCompleteDowntime?: boolean | null;
|
|
34545
34643
|
comment?: string | null;
|
|
34546
34644
|
}
|
|
34547
34645
|
|
|
@@ -34550,6 +34648,7 @@ export class UpdateDowntimePeriodReasonRequest implements IUpdateDowntimePeriodR
|
|
|
34550
34648
|
assetId?: number | null;
|
|
34551
34649
|
startTime?: Date | null;
|
|
34552
34650
|
endTime?: Date | null;
|
|
34651
|
+
autoCompleteDowntime?: boolean | null;
|
|
34553
34652
|
comment?: string | null;
|
|
34554
34653
|
|
|
34555
34654
|
constructor(data?: IUpdateDowntimePeriodReasonRequest) {
|
|
@@ -34567,6 +34666,7 @@ export class UpdateDowntimePeriodReasonRequest implements IUpdateDowntimePeriodR
|
|
|
34567
34666
|
this.assetId = _data["assetId"];
|
|
34568
34667
|
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
34569
34668
|
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
34669
|
+
this.autoCompleteDowntime = _data["autoCompleteDowntime"];
|
|
34570
34670
|
this.comment = _data["comment"];
|
|
34571
34671
|
}
|
|
34572
34672
|
}
|
|
@@ -34584,6 +34684,7 @@ export class UpdateDowntimePeriodReasonRequest implements IUpdateDowntimePeriodR
|
|
|
34584
34684
|
data["assetId"] = this.assetId;
|
|
34585
34685
|
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
34586
34686
|
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
34687
|
+
data["autoCompleteDowntime"] = this.autoCompleteDowntime;
|
|
34587
34688
|
data["comment"] = this.comment;
|
|
34588
34689
|
return data;
|
|
34589
34690
|
}
|
|
@@ -34594,6 +34695,7 @@ export interface IUpdateDowntimePeriodReasonRequest {
|
|
|
34594
34695
|
assetId?: number | null;
|
|
34595
34696
|
startTime?: Date | null;
|
|
34596
34697
|
endTime?: Date | null;
|
|
34698
|
+
autoCompleteDowntime?: boolean | null;
|
|
34597
34699
|
comment?: string | null;
|
|
34598
34700
|
}
|
|
34599
34701
|
|
|
@@ -36207,6 +36309,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36207
36309
|
description?: string;
|
|
36208
36310
|
activeOrders!: MachineErpDataDto[];
|
|
36209
36311
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
36312
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
36210
36313
|
|
|
36211
36314
|
constructor(data?: ISingleMachineErpDataListDto) {
|
|
36212
36315
|
if (data) {
|
|
@@ -36231,6 +36334,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36231
36334
|
this.activeOrders!.push(MachineErpDataDto.fromJS(item));
|
|
36232
36335
|
}
|
|
36233
36336
|
this.lastActiveEvent = _data["lastActiveEvent"] ? WorkorderOperationEventDto.fromJS(_data["lastActiveEvent"]) : <any>undefined;
|
|
36337
|
+
this.downtimePeriodReason = _data["downtimePeriodReason"] ? DowntimePeriodReasonDto.fromJS(_data["downtimePeriodReason"]) : <any>undefined;
|
|
36234
36338
|
}
|
|
36235
36339
|
}
|
|
36236
36340
|
|
|
@@ -36252,6 +36356,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36252
36356
|
data["activeOrders"].push(item.toJSON());
|
|
36253
36357
|
}
|
|
36254
36358
|
data["lastActiveEvent"] = this.lastActiveEvent ? this.lastActiveEvent.toJSON() : <any>undefined;
|
|
36359
|
+
data["downtimePeriodReason"] = this.downtimePeriodReason ? this.downtimePeriodReason.toJSON() : <any>undefined;
|
|
36255
36360
|
return data;
|
|
36256
36361
|
}
|
|
36257
36362
|
}
|
|
@@ -36262,6 +36367,7 @@ export interface ISingleMachineErpDataListDto {
|
|
|
36262
36367
|
description?: string;
|
|
36263
36368
|
activeOrders: MachineErpDataDto[];
|
|
36264
36369
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
36370
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
36265
36371
|
}
|
|
36266
36372
|
|
|
36267
36373
|
export class MachineErpDataDto implements IMachineErpDataDto {
|