@ignos/api-client 20250915.0.12628 → 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 +5 -0
- package/lib/ignosportal-api.js +46 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +49 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -785,6 +785,7 @@ 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[]>;
|
|
788
789
|
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
789
790
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
790
791
|
createReport(request: CreateDowntimeReasonsReportRequest | undefined): Promise<DowntimeReasonsReportDto>;
|
|
@@ -805,6 +806,8 @@ export declare class DowntimeReasonsClient extends AuthorizedApiBase implements
|
|
|
805
806
|
protected processDeleteDowntimeReason(response: Response): Promise<void>;
|
|
806
807
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
807
808
|
protected processListDowntimeReasonsForMachine(response: Response): Promise<DowntimeReasonDto[]>;
|
|
809
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]>;
|
|
810
|
+
protected processListDowntimeReasonsHierarchyForMachine(response: Response): Promise<ParentTopicDto[]>;
|
|
808
811
|
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
809
812
|
protected processListActiveDowntimeReasonsForMachine(response: Response): Promise<DowntimePeriodReasonDto[]>;
|
|
810
813
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
@@ -6407,6 +6410,7 @@ export declare class SingleMachineErpDataListDto implements ISingleMachineErpDat
|
|
|
6407
6410
|
description?: string;
|
|
6408
6411
|
activeOrders: MachineErpDataDto[];
|
|
6409
6412
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
6413
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
6410
6414
|
constructor(data?: ISingleMachineErpDataListDto);
|
|
6411
6415
|
init(_data?: any): void;
|
|
6412
6416
|
static fromJS(data: any): SingleMachineErpDataListDto;
|
|
@@ -6418,6 +6422,7 @@ export interface ISingleMachineErpDataListDto {
|
|
|
6418
6422
|
description?: string;
|
|
6419
6423
|
activeOrders: MachineErpDataDto[];
|
|
6420
6424
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
6425
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
6421
6426
|
}
|
|
6422
6427
|
export declare class MachineErpDataDto implements IMachineErpDataDto {
|
|
6423
6428
|
workOrderId: string;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -6181,6 +6181,50 @@ 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
|
+
}
|
|
6184
6228
|
listActiveDowntimeReasonsForMachine(id) {
|
|
6185
6229
|
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/active";
|
|
6186
6230
|
if (id === undefined || id === null)
|
|
@@ -31110,6 +31154,7 @@ export class SingleMachineErpDataListDto {
|
|
|
31110
31154
|
this.activeOrders.push(MachineErpDataDto.fromJS(item));
|
|
31111
31155
|
}
|
|
31112
31156
|
this.lastActiveEvent = _data["lastActiveEvent"] ? WorkorderOperationEventDto.fromJS(_data["lastActiveEvent"]) : undefined;
|
|
31157
|
+
this.downtimePeriodReason = _data["downtimePeriodReason"] ? DowntimePeriodReasonDto.fromJS(_data["downtimePeriodReason"]) : undefined;
|
|
31113
31158
|
}
|
|
31114
31159
|
}
|
|
31115
31160
|
static fromJS(data) {
|
|
@@ -31129,6 +31174,7 @@ export class SingleMachineErpDataListDto {
|
|
|
31129
31174
|
data["activeOrders"].push(item.toJSON());
|
|
31130
31175
|
}
|
|
31131
31176
|
data["lastActiveEvent"] = this.lastActiveEvent ? this.lastActiveEvent.toJSON() : undefined;
|
|
31177
|
+
data["downtimePeriodReason"] = this.downtimePeriodReason ? this.downtimePeriodReason.toJSON() : undefined;
|
|
31132
31178
|
return data;
|
|
31133
31179
|
}
|
|
31134
31180
|
}
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -6453,6 +6453,8 @@ export interface IDowntimeReasonsClient {
|
|
|
6453
6453
|
|
|
6454
6454
|
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
6455
6455
|
|
|
6456
|
+
listDowntimeReasonsHierarchyForMachine(id: number): Promise<ParentTopicDto[]>;
|
|
6457
|
+
|
|
6456
6458
|
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]>;
|
|
6457
6459
|
|
|
6458
6460
|
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
@@ -6634,6 +6636,49 @@ export class DowntimeReasonsClient extends AuthorizedApiBase implements IDowntim
|
|
|
6634
6636
|
return Promise.resolve<DowntimeReasonDto[]>(null as any);
|
|
6635
6637
|
}
|
|
6636
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
|
+
|
|
6637
6682
|
listActiveDowntimeReasonsForMachine(id: number): Promise<DowntimePeriodReasonDto[]> {
|
|
6638
6683
|
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/active";
|
|
6639
6684
|
if (id === undefined || id === null)
|
|
@@ -36264,6 +36309,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36264
36309
|
description?: string;
|
|
36265
36310
|
activeOrders!: MachineErpDataDto[];
|
|
36266
36311
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
36312
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
36267
36313
|
|
|
36268
36314
|
constructor(data?: ISingleMachineErpDataListDto) {
|
|
36269
36315
|
if (data) {
|
|
@@ -36288,6 +36334,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36288
36334
|
this.activeOrders!.push(MachineErpDataDto.fromJS(item));
|
|
36289
36335
|
}
|
|
36290
36336
|
this.lastActiveEvent = _data["lastActiveEvent"] ? WorkorderOperationEventDto.fromJS(_data["lastActiveEvent"]) : <any>undefined;
|
|
36337
|
+
this.downtimePeriodReason = _data["downtimePeriodReason"] ? DowntimePeriodReasonDto.fromJS(_data["downtimePeriodReason"]) : <any>undefined;
|
|
36291
36338
|
}
|
|
36292
36339
|
}
|
|
36293
36340
|
|
|
@@ -36309,6 +36356,7 @@ export class SingleMachineErpDataListDto implements ISingleMachineErpDataListDto
|
|
|
36309
36356
|
data["activeOrders"].push(item.toJSON());
|
|
36310
36357
|
}
|
|
36311
36358
|
data["lastActiveEvent"] = this.lastActiveEvent ? this.lastActiveEvent.toJSON() : <any>undefined;
|
|
36359
|
+
data["downtimePeriodReason"] = this.downtimePeriodReason ? this.downtimePeriodReason.toJSON() : <any>undefined;
|
|
36312
36360
|
return data;
|
|
36313
36361
|
}
|
|
36314
36362
|
}
|
|
@@ -36319,6 +36367,7 @@ export interface ISingleMachineErpDataListDto {
|
|
|
36319
36367
|
description?: string;
|
|
36320
36368
|
activeOrders: MachineErpDataDto[];
|
|
36321
36369
|
lastActiveEvent?: WorkorderOperationEventDto | null;
|
|
36370
|
+
downtimePeriodReason?: DowntimePeriodReasonDto | null;
|
|
36322
36371
|
}
|
|
36323
36372
|
|
|
36324
36373
|
export class MachineErpDataDto implements IMachineErpDataDto {
|