@ignos/api-client 20250214.0.11147 → 20250219.0.11204
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 +33 -17
- package/lib/ignosportal-api.js +54 -11
- package/package.json +1 -1
- package/src/ignosportal-api.ts +89 -30
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -807,7 +807,7 @@ export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdm
|
|
|
807
807
|
protected processUpdateCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto>;
|
|
808
808
|
}
|
|
809
809
|
export interface IKpiClient {
|
|
810
|
-
getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto
|
|
810
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
811
811
|
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
|
|
812
812
|
}
|
|
813
813
|
export declare class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
@@ -817,8 +817,8 @@ export declare class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
817
817
|
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
|
|
818
818
|
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
819
819
|
});
|
|
820
|
-
getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto
|
|
821
|
-
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto
|
|
820
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
821
|
+
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto>;
|
|
822
822
|
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
|
|
823
823
|
protected processGetMachineDailyUptime(response: Response): Promise<MachineDailyUptimeDto>;
|
|
824
824
|
}
|
|
@@ -5567,8 +5567,8 @@ export declare class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
5567
5567
|
machineExternalId: string;
|
|
5568
5568
|
name: string;
|
|
5569
5569
|
description?: string | null;
|
|
5570
|
-
utilizationPercent: number;
|
|
5571
5570
|
comment?: string | null;
|
|
5571
|
+
utilizationPercent: number;
|
|
5572
5572
|
capacity: MachineCapacitySettingsDto[];
|
|
5573
5573
|
created?: Date | null;
|
|
5574
5574
|
updatedBy?: string | null;
|
|
@@ -5582,8 +5582,8 @@ export interface IMachineCapacityDto {
|
|
|
5582
5582
|
machineExternalId: string;
|
|
5583
5583
|
name: string;
|
|
5584
5584
|
description?: string | null;
|
|
5585
|
-
utilizationPercent: number;
|
|
5586
5585
|
comment?: string | null;
|
|
5586
|
+
utilizationPercent: number;
|
|
5587
5587
|
capacity: MachineCapacitySettingsDto[];
|
|
5588
5588
|
created?: Date | null;
|
|
5589
5589
|
updatedBy?: string | null;
|
|
@@ -5643,20 +5643,36 @@ export interface IUpdateCalenderCapacity {
|
|
|
5643
5643
|
dayCapacity?: CalenderDayCapacityDto;
|
|
5644
5644
|
}
|
|
5645
5645
|
export declare class MachineKpiDto implements IMachineKpiDto {
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5646
|
+
uptimeToNow: number;
|
|
5647
|
+
uptimeToNowPreviousPeriod: number;
|
|
5648
|
+
averageUpTime: number;
|
|
5649
|
+
uptimeTargetReached: number;
|
|
5650
|
+
days: MachineDayKpiDto[];
|
|
5650
5651
|
constructor(data?: IMachineKpiDto);
|
|
5651
5652
|
init(_data?: any): void;
|
|
5652
5653
|
static fromJS(data: any): MachineKpiDto;
|
|
5653
5654
|
toJSON(data?: any): any;
|
|
5654
5655
|
}
|
|
5655
5656
|
export interface IMachineKpiDto {
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5657
|
+
uptimeToNow: number;
|
|
5658
|
+
uptimeToNowPreviousPeriod: number;
|
|
5659
|
+
averageUpTime: number;
|
|
5660
|
+
uptimeTargetReached: number;
|
|
5661
|
+
days: MachineDayKpiDto[];
|
|
5662
|
+
}
|
|
5663
|
+
export declare class MachineDayKpiDto implements IMachineDayKpiDto {
|
|
5664
|
+
date: Date;
|
|
5665
|
+
uptime: number;
|
|
5666
|
+
utilizationGoal: number;
|
|
5667
|
+
constructor(data?: IMachineDayKpiDto);
|
|
5668
|
+
init(_data?: any): void;
|
|
5669
|
+
static fromJS(data: any): MachineDayKpiDto;
|
|
5670
|
+
toJSON(data?: any): any;
|
|
5671
|
+
}
|
|
5672
|
+
export interface IMachineDayKpiDto {
|
|
5673
|
+
date: Date;
|
|
5674
|
+
uptime: number;
|
|
5675
|
+
utilizationGoal: number;
|
|
5660
5676
|
}
|
|
5661
5677
|
export declare class MachineDailyUptimeDto implements IMachineDailyUptimeDto {
|
|
5662
5678
|
date?: Date;
|
|
@@ -10683,8 +10699,8 @@ export interface IResourceGroupDto {
|
|
|
10683
10699
|
department?: DepartmentDto | null;
|
|
10684
10700
|
}
|
|
10685
10701
|
export declare class ProductionResourceDto implements IProductionResourceDto {
|
|
10686
|
-
id?: string;
|
|
10687
|
-
name?: string;
|
|
10702
|
+
id?: string | null;
|
|
10703
|
+
name?: string | null;
|
|
10688
10704
|
department?: DepartmentDto | null;
|
|
10689
10705
|
constructor(data?: IProductionResourceDto);
|
|
10690
10706
|
init(_data?: any): void;
|
|
@@ -10692,8 +10708,8 @@ export declare class ProductionResourceDto implements IProductionResourceDto {
|
|
|
10692
10708
|
toJSON(data?: any): any;
|
|
10693
10709
|
}
|
|
10694
10710
|
export interface IProductionResourceDto {
|
|
10695
|
-
id?: string;
|
|
10696
|
-
name?: string;
|
|
10711
|
+
id?: string | null;
|
|
10712
|
+
name?: string | null;
|
|
10697
10713
|
department?: DepartmentDto | null;
|
|
10698
10714
|
}
|
|
10699
10715
|
export declare class PagedResultOfMeasurementFormListDto implements IPagedResultOfMeasurementFormListDto {
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -6117,12 +6117,16 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6117
6117
|
this.http = http ? http : window;
|
|
6118
6118
|
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
6119
6119
|
}
|
|
6120
|
-
getMachineKpi(machineExternalId, startDate, endDate, utcOffset) {
|
|
6120
|
+
getMachineKpi(machineExternalId, previousPeriodStartDate, startDate, endDate, utcOffset) {
|
|
6121
6121
|
let url_ = this.baseUrl + "/kpi/capacity?";
|
|
6122
6122
|
if (machineExternalId === null)
|
|
6123
6123
|
throw new Error("The parameter 'machineExternalId' cannot be null.");
|
|
6124
6124
|
else if (machineExternalId !== undefined)
|
|
6125
6125
|
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
6126
|
+
if (previousPeriodStartDate === null)
|
|
6127
|
+
throw new Error("The parameter 'previousPeriodStartDate' cannot be null.");
|
|
6128
|
+
else if (previousPeriodStartDate !== undefined)
|
|
6129
|
+
url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
|
|
6126
6130
|
if (startDate === null)
|
|
6127
6131
|
throw new Error("The parameter 'startDate' cannot be null.");
|
|
6128
6132
|
else if (startDate !== undefined)
|
|
@@ -6159,11 +6163,7 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6159
6163
|
return response.text().then((_responseText) => {
|
|
6160
6164
|
let result200 = null;
|
|
6161
6165
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6162
|
-
|
|
6163
|
-
result200 = [];
|
|
6164
|
-
for (let item of resultData200)
|
|
6165
|
-
result200.push(MachineKpiDto.fromJS(item));
|
|
6166
|
-
}
|
|
6166
|
+
result200 = MachineKpiDto.fromJS(resultData200);
|
|
6167
6167
|
return result200;
|
|
6168
6168
|
});
|
|
6169
6169
|
}
|
|
@@ -27293,8 +27293,8 @@ export class MachineCapacityDto {
|
|
|
27293
27293
|
this.machineExternalId = _data["machineExternalId"];
|
|
27294
27294
|
this.name = _data["name"];
|
|
27295
27295
|
this.description = _data["description"];
|
|
27296
|
-
this.utilizationPercent = _data["utilizationPercent"];
|
|
27297
27296
|
this.comment = _data["comment"];
|
|
27297
|
+
this.utilizationPercent = _data["utilizationPercent"];
|
|
27298
27298
|
if (Array.isArray(_data["capacity"])) {
|
|
27299
27299
|
this.capacity = [];
|
|
27300
27300
|
for (let item of _data["capacity"])
|
|
@@ -27316,8 +27316,8 @@ export class MachineCapacityDto {
|
|
|
27316
27316
|
data["machineExternalId"] = this.machineExternalId;
|
|
27317
27317
|
data["name"] = this.name;
|
|
27318
27318
|
data["description"] = this.description;
|
|
27319
|
-
data["utilizationPercent"] = this.utilizationPercent;
|
|
27320
27319
|
data["comment"] = this.comment;
|
|
27320
|
+
data["utilizationPercent"] = this.utilizationPercent;
|
|
27321
27321
|
if (Array.isArray(this.capacity)) {
|
|
27322
27322
|
data["capacity"] = [];
|
|
27323
27323
|
for (let item of this.capacity)
|
|
@@ -27454,6 +27454,51 @@ export class UpdateCalenderCapacity {
|
|
|
27454
27454
|
}
|
|
27455
27455
|
}
|
|
27456
27456
|
export class MachineKpiDto {
|
|
27457
|
+
constructor(data) {
|
|
27458
|
+
if (data) {
|
|
27459
|
+
for (var property in data) {
|
|
27460
|
+
if (data.hasOwnProperty(property))
|
|
27461
|
+
this[property] = data[property];
|
|
27462
|
+
}
|
|
27463
|
+
}
|
|
27464
|
+
if (!data) {
|
|
27465
|
+
this.days = [];
|
|
27466
|
+
}
|
|
27467
|
+
}
|
|
27468
|
+
init(_data) {
|
|
27469
|
+
if (_data) {
|
|
27470
|
+
this.uptimeToNow = _data["uptimeToNow"];
|
|
27471
|
+
this.uptimeToNowPreviousPeriod = _data["uptimeToNowPreviousPeriod"];
|
|
27472
|
+
this.averageUpTime = _data["averageUpTime"];
|
|
27473
|
+
this.uptimeTargetReached = _data["uptimeTargetReached"];
|
|
27474
|
+
if (Array.isArray(_data["days"])) {
|
|
27475
|
+
this.days = [];
|
|
27476
|
+
for (let item of _data["days"])
|
|
27477
|
+
this.days.push(MachineDayKpiDto.fromJS(item));
|
|
27478
|
+
}
|
|
27479
|
+
}
|
|
27480
|
+
}
|
|
27481
|
+
static fromJS(data) {
|
|
27482
|
+
data = typeof data === 'object' ? data : {};
|
|
27483
|
+
let result = new MachineKpiDto();
|
|
27484
|
+
result.init(data);
|
|
27485
|
+
return result;
|
|
27486
|
+
}
|
|
27487
|
+
toJSON(data) {
|
|
27488
|
+
data = typeof data === 'object' ? data : {};
|
|
27489
|
+
data["uptimeToNow"] = this.uptimeToNow;
|
|
27490
|
+
data["uptimeToNowPreviousPeriod"] = this.uptimeToNowPreviousPeriod;
|
|
27491
|
+
data["averageUpTime"] = this.averageUpTime;
|
|
27492
|
+
data["uptimeTargetReached"] = this.uptimeTargetReached;
|
|
27493
|
+
if (Array.isArray(this.days)) {
|
|
27494
|
+
data["days"] = [];
|
|
27495
|
+
for (let item of this.days)
|
|
27496
|
+
data["days"].push(item.toJSON());
|
|
27497
|
+
}
|
|
27498
|
+
return data;
|
|
27499
|
+
}
|
|
27500
|
+
}
|
|
27501
|
+
export class MachineDayKpiDto {
|
|
27457
27502
|
constructor(data) {
|
|
27458
27503
|
if (data) {
|
|
27459
27504
|
for (var property in data) {
|
|
@@ -27466,13 +27511,12 @@ export class MachineKpiDto {
|
|
|
27466
27511
|
if (_data) {
|
|
27467
27512
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
27468
27513
|
this.uptime = _data["uptime"];
|
|
27469
|
-
this.capacity = _data["capacity"];
|
|
27470
27514
|
this.utilizationGoal = _data["utilizationGoal"];
|
|
27471
27515
|
}
|
|
27472
27516
|
}
|
|
27473
27517
|
static fromJS(data) {
|
|
27474
27518
|
data = typeof data === 'object' ? data : {};
|
|
27475
|
-
let result = new
|
|
27519
|
+
let result = new MachineDayKpiDto();
|
|
27476
27520
|
result.init(data);
|
|
27477
27521
|
return result;
|
|
27478
27522
|
}
|
|
@@ -27480,7 +27524,6 @@ export class MachineKpiDto {
|
|
|
27480
27524
|
data = typeof data === 'object' ? data : {};
|
|
27481
27525
|
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
27482
27526
|
data["uptime"] = this.uptime;
|
|
27483
|
-
data["capacity"] = this.capacity;
|
|
27484
27527
|
data["utilizationGoal"] = this.utilizationGoal;
|
|
27485
27528
|
return data;
|
|
27486
27529
|
}
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -6560,7 +6560,7 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6560
6560
|
|
|
6561
6561
|
export interface IKpiClient {
|
|
6562
6562
|
|
|
6563
|
-
getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto
|
|
6563
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
6564
6564
|
|
|
6565
6565
|
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
|
|
6566
6566
|
}
|
|
@@ -6576,12 +6576,16 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6576
6576
|
this.baseUrl = baseUrl ?? "";
|
|
6577
6577
|
}
|
|
6578
6578
|
|
|
6579
|
-
getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto
|
|
6579
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto> {
|
|
6580
6580
|
let url_ = this.baseUrl + "/kpi/capacity?";
|
|
6581
6581
|
if (machineExternalId === null)
|
|
6582
6582
|
throw new Error("The parameter 'machineExternalId' cannot be null.");
|
|
6583
6583
|
else if (machineExternalId !== undefined)
|
|
6584
6584
|
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
6585
|
+
if (previousPeriodStartDate === null)
|
|
6586
|
+
throw new Error("The parameter 'previousPeriodStartDate' cannot be null.");
|
|
6587
|
+
else if (previousPeriodStartDate !== undefined)
|
|
6588
|
+
url_ += "previousPeriodStartDate=" + encodeURIComponent(previousPeriodStartDate ? "" + previousPeriodStartDate.toISOString() : "") + "&";
|
|
6585
6589
|
if (startDate === null)
|
|
6586
6590
|
throw new Error("The parameter 'startDate' cannot be null.");
|
|
6587
6591
|
else if (startDate !== undefined)
|
|
@@ -6610,18 +6614,14 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6610
6614
|
});
|
|
6611
6615
|
}
|
|
6612
6616
|
|
|
6613
|
-
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto
|
|
6617
|
+
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto> {
|
|
6614
6618
|
const status = response.status;
|
|
6615
6619
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6616
6620
|
if (status === 200) {
|
|
6617
6621
|
return response.text().then((_responseText) => {
|
|
6618
6622
|
let result200: any = null;
|
|
6619
6623
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6620
|
-
|
|
6621
|
-
result200 = [] as any;
|
|
6622
|
-
for (let item of resultData200)
|
|
6623
|
-
result200!.push(MachineKpiDto.fromJS(item));
|
|
6624
|
-
}
|
|
6624
|
+
result200 = MachineKpiDto.fromJS(resultData200);
|
|
6625
6625
|
return result200;
|
|
6626
6626
|
});
|
|
6627
6627
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6629,7 +6629,7 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6629
6629
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6630
6630
|
});
|
|
6631
6631
|
}
|
|
6632
|
-
return Promise.resolve<MachineKpiDto
|
|
6632
|
+
return Promise.resolve<MachineKpiDto>(null as any);
|
|
6633
6633
|
}
|
|
6634
6634
|
|
|
6635
6635
|
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto> {
|
|
@@ -31743,8 +31743,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31743
31743
|
machineExternalId!: string;
|
|
31744
31744
|
name!: string;
|
|
31745
31745
|
description?: string | null;
|
|
31746
|
-
utilizationPercent!: number;
|
|
31747
31746
|
comment?: string | null;
|
|
31747
|
+
utilizationPercent!: number;
|
|
31748
31748
|
capacity!: MachineCapacitySettingsDto[];
|
|
31749
31749
|
created?: Date | null;
|
|
31750
31750
|
updatedBy?: string | null;
|
|
@@ -31767,8 +31767,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31767
31767
|
this.machineExternalId = _data["machineExternalId"];
|
|
31768
31768
|
this.name = _data["name"];
|
|
31769
31769
|
this.description = _data["description"];
|
|
31770
|
-
this.utilizationPercent = _data["utilizationPercent"];
|
|
31771
31770
|
this.comment = _data["comment"];
|
|
31771
|
+
this.utilizationPercent = _data["utilizationPercent"];
|
|
31772
31772
|
if (Array.isArray(_data["capacity"])) {
|
|
31773
31773
|
this.capacity = [] as any;
|
|
31774
31774
|
for (let item of _data["capacity"])
|
|
@@ -31792,8 +31792,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31792
31792
|
data["machineExternalId"] = this.machineExternalId;
|
|
31793
31793
|
data["name"] = this.name;
|
|
31794
31794
|
data["description"] = this.description;
|
|
31795
|
-
data["utilizationPercent"] = this.utilizationPercent;
|
|
31796
31795
|
data["comment"] = this.comment;
|
|
31796
|
+
data["utilizationPercent"] = this.utilizationPercent;
|
|
31797
31797
|
if (Array.isArray(this.capacity)) {
|
|
31798
31798
|
data["capacity"] = [];
|
|
31799
31799
|
for (let item of this.capacity)
|
|
@@ -31810,8 +31810,8 @@ export interface IMachineCapacityDto {
|
|
|
31810
31810
|
machineExternalId: string;
|
|
31811
31811
|
name: string;
|
|
31812
31812
|
description?: string | null;
|
|
31813
|
-
utilizationPercent: number;
|
|
31814
31813
|
comment?: string | null;
|
|
31814
|
+
utilizationPercent: number;
|
|
31815
31815
|
capacity: MachineCapacitySettingsDto[];
|
|
31816
31816
|
created?: Date | null;
|
|
31817
31817
|
updatedBy?: string | null;
|
|
@@ -31997,10 +31997,11 @@ export interface IUpdateCalenderCapacity {
|
|
|
31997
31997
|
}
|
|
31998
31998
|
|
|
31999
31999
|
export class MachineKpiDto implements IMachineKpiDto {
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
|
|
32000
|
+
uptimeToNow!: number;
|
|
32001
|
+
uptimeToNowPreviousPeriod!: number;
|
|
32002
|
+
averageUpTime!: number;
|
|
32003
|
+
uptimeTargetReached!: number;
|
|
32004
|
+
days!: MachineDayKpiDto[];
|
|
32004
32005
|
|
|
32005
32006
|
constructor(data?: IMachineKpiDto) {
|
|
32006
32007
|
if (data) {
|
|
@@ -32009,20 +32010,80 @@ export class MachineKpiDto implements IMachineKpiDto {
|
|
|
32009
32010
|
(<any>this)[property] = (<any>data)[property];
|
|
32010
32011
|
}
|
|
32011
32012
|
}
|
|
32013
|
+
if (!data) {
|
|
32014
|
+
this.days = [];
|
|
32015
|
+
}
|
|
32016
|
+
}
|
|
32017
|
+
|
|
32018
|
+
init(_data?: any) {
|
|
32019
|
+
if (_data) {
|
|
32020
|
+
this.uptimeToNow = _data["uptimeToNow"];
|
|
32021
|
+
this.uptimeToNowPreviousPeriod = _data["uptimeToNowPreviousPeriod"];
|
|
32022
|
+
this.averageUpTime = _data["averageUpTime"];
|
|
32023
|
+
this.uptimeTargetReached = _data["uptimeTargetReached"];
|
|
32024
|
+
if (Array.isArray(_data["days"])) {
|
|
32025
|
+
this.days = [] as any;
|
|
32026
|
+
for (let item of _data["days"])
|
|
32027
|
+
this.days!.push(MachineDayKpiDto.fromJS(item));
|
|
32028
|
+
}
|
|
32029
|
+
}
|
|
32030
|
+
}
|
|
32031
|
+
|
|
32032
|
+
static fromJS(data: any): MachineKpiDto {
|
|
32033
|
+
data = typeof data === 'object' ? data : {};
|
|
32034
|
+
let result = new MachineKpiDto();
|
|
32035
|
+
result.init(data);
|
|
32036
|
+
return result;
|
|
32037
|
+
}
|
|
32038
|
+
|
|
32039
|
+
toJSON(data?: any) {
|
|
32040
|
+
data = typeof data === 'object' ? data : {};
|
|
32041
|
+
data["uptimeToNow"] = this.uptimeToNow;
|
|
32042
|
+
data["uptimeToNowPreviousPeriod"] = this.uptimeToNowPreviousPeriod;
|
|
32043
|
+
data["averageUpTime"] = this.averageUpTime;
|
|
32044
|
+
data["uptimeTargetReached"] = this.uptimeTargetReached;
|
|
32045
|
+
if (Array.isArray(this.days)) {
|
|
32046
|
+
data["days"] = [];
|
|
32047
|
+
for (let item of this.days)
|
|
32048
|
+
data["days"].push(item.toJSON());
|
|
32049
|
+
}
|
|
32050
|
+
return data;
|
|
32051
|
+
}
|
|
32052
|
+
}
|
|
32053
|
+
|
|
32054
|
+
export interface IMachineKpiDto {
|
|
32055
|
+
uptimeToNow: number;
|
|
32056
|
+
uptimeToNowPreviousPeriod: number;
|
|
32057
|
+
averageUpTime: number;
|
|
32058
|
+
uptimeTargetReached: number;
|
|
32059
|
+
days: MachineDayKpiDto[];
|
|
32060
|
+
}
|
|
32061
|
+
|
|
32062
|
+
export class MachineDayKpiDto implements IMachineDayKpiDto {
|
|
32063
|
+
date!: Date;
|
|
32064
|
+
uptime!: number;
|
|
32065
|
+
utilizationGoal!: number;
|
|
32066
|
+
|
|
32067
|
+
constructor(data?: IMachineDayKpiDto) {
|
|
32068
|
+
if (data) {
|
|
32069
|
+
for (var property in data) {
|
|
32070
|
+
if (data.hasOwnProperty(property))
|
|
32071
|
+
(<any>this)[property] = (<any>data)[property];
|
|
32072
|
+
}
|
|
32073
|
+
}
|
|
32012
32074
|
}
|
|
32013
32075
|
|
|
32014
32076
|
init(_data?: any) {
|
|
32015
32077
|
if (_data) {
|
|
32016
32078
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
32017
32079
|
this.uptime = _data["uptime"];
|
|
32018
|
-
this.capacity = _data["capacity"];
|
|
32019
32080
|
this.utilizationGoal = _data["utilizationGoal"];
|
|
32020
32081
|
}
|
|
32021
32082
|
}
|
|
32022
32083
|
|
|
32023
|
-
static fromJS(data: any):
|
|
32084
|
+
static fromJS(data: any): MachineDayKpiDto {
|
|
32024
32085
|
data = typeof data === 'object' ? data : {};
|
|
32025
|
-
let result = new
|
|
32086
|
+
let result = new MachineDayKpiDto();
|
|
32026
32087
|
result.init(data);
|
|
32027
32088
|
return result;
|
|
32028
32089
|
}
|
|
@@ -32031,17 +32092,15 @@ export class MachineKpiDto implements IMachineKpiDto {
|
|
|
32031
32092
|
data = typeof data === 'object' ? data : {};
|
|
32032
32093
|
data["date"] = this.date ? this.date.toISOString() : <any>undefined;
|
|
32033
32094
|
data["uptime"] = this.uptime;
|
|
32034
|
-
data["capacity"] = this.capacity;
|
|
32035
32095
|
data["utilizationGoal"] = this.utilizationGoal;
|
|
32036
32096
|
return data;
|
|
32037
32097
|
}
|
|
32038
32098
|
}
|
|
32039
32099
|
|
|
32040
|
-
export interface
|
|
32041
|
-
date
|
|
32042
|
-
uptime
|
|
32043
|
-
|
|
32044
|
-
utilizationGoal?: number;
|
|
32100
|
+
export interface IMachineDayKpiDto {
|
|
32101
|
+
date: Date;
|
|
32102
|
+
uptime: number;
|
|
32103
|
+
utilizationGoal: number;
|
|
32045
32104
|
}
|
|
32046
32105
|
|
|
32047
32106
|
export class MachineDailyUptimeDto implements IMachineDailyUptimeDto {
|
|
@@ -47351,8 +47410,8 @@ export interface IResourceGroupDto {
|
|
|
47351
47410
|
}
|
|
47352
47411
|
|
|
47353
47412
|
export class ProductionResourceDto implements IProductionResourceDto {
|
|
47354
|
-
id?: string;
|
|
47355
|
-
name?: string;
|
|
47413
|
+
id?: string | null;
|
|
47414
|
+
name?: string | null;
|
|
47356
47415
|
department?: DepartmentDto | null;
|
|
47357
47416
|
|
|
47358
47417
|
constructor(data?: IProductionResourceDto) {
|
|
@@ -47389,8 +47448,8 @@ export class ProductionResourceDto implements IProductionResourceDto {
|
|
|
47389
47448
|
}
|
|
47390
47449
|
|
|
47391
47450
|
export interface IProductionResourceDto {
|
|
47392
|
-
id?: string;
|
|
47393
|
-
name?: string;
|
|
47451
|
+
id?: string | null;
|
|
47452
|
+
name?: string | null;
|
|
47394
47453
|
department?: DepartmentDto | null;
|
|
47395
47454
|
}
|
|
47396
47455
|
|