@ignos/api-client 20250213.0.11144 → 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 +35 -19
- package/lib/ignosportal-api.js +63 -12
- package/package.json +1 -1
- package/src/ignosportal-api.ts +99 -32
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -807,8 +807,8 @@ 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): Promise<MachineKpiDto
|
|
811
|
-
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
|
|
810
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
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 {
|
|
814
814
|
private http;
|
|
@@ -817,9 +817,9 @@ 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): Promise<MachineKpiDto
|
|
821
|
-
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto
|
|
822
|
-
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
|
|
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
|
+
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
|
|
823
823
|
protected processGetMachineDailyUptime(response: Response): Promise<MachineDailyUptimeDto>;
|
|
824
824
|
}
|
|
825
825
|
export interface IMachinesClient {
|
|
@@ -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) {
|
|
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)
|
|
@@ -6131,6 +6135,10 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6131
6135
|
throw new Error("The parameter 'endDate' cannot be null.");
|
|
6132
6136
|
else if (endDate !== undefined)
|
|
6133
6137
|
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
|
|
6138
|
+
if (utcOffset === null)
|
|
6139
|
+
throw new Error("The parameter 'utcOffset' cannot be null.");
|
|
6140
|
+
else if (utcOffset !== undefined)
|
|
6141
|
+
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
6134
6142
|
url_ = url_.replace(/[?&]$/, "");
|
|
6135
6143
|
let options_ = {
|
|
6136
6144
|
method: "GET",
|
|
@@ -6155,11 +6163,7 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6155
6163
|
return response.text().then((_responseText) => {
|
|
6156
6164
|
let result200 = null;
|
|
6157
6165
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6158
|
-
|
|
6159
|
-
result200 = [];
|
|
6160
|
-
for (let item of resultData200)
|
|
6161
|
-
result200.push(MachineKpiDto.fromJS(item));
|
|
6162
|
-
}
|
|
6166
|
+
result200 = MachineKpiDto.fromJS(resultData200);
|
|
6163
6167
|
return result200;
|
|
6164
6168
|
});
|
|
6165
6169
|
}
|
|
@@ -6170,7 +6174,7 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6170
6174
|
}
|
|
6171
6175
|
return Promise.resolve(null);
|
|
6172
6176
|
}
|
|
6173
|
-
getMachineDailyUptime(machineExternalId, date) {
|
|
6177
|
+
getMachineDailyUptime(machineExternalId, date, utcOffset) {
|
|
6174
6178
|
let url_ = this.baseUrl + "/kpi/daily-uptime?";
|
|
6175
6179
|
if (machineExternalId === null)
|
|
6176
6180
|
throw new Error("The parameter 'machineExternalId' cannot be null.");
|
|
@@ -6180,6 +6184,10 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
6180
6184
|
throw new Error("The parameter 'date' cannot be null.");
|
|
6181
6185
|
else if (date !== undefined)
|
|
6182
6186
|
url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
|
|
6187
|
+
if (utcOffset === null)
|
|
6188
|
+
throw new Error("The parameter 'utcOffset' cannot be null.");
|
|
6189
|
+
else if (utcOffset !== undefined)
|
|
6190
|
+
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
6183
6191
|
url_ = url_.replace(/[?&]$/, "");
|
|
6184
6192
|
let options_ = {
|
|
6185
6193
|
method: "GET",
|
|
@@ -27285,8 +27293,8 @@ export class MachineCapacityDto {
|
|
|
27285
27293
|
this.machineExternalId = _data["machineExternalId"];
|
|
27286
27294
|
this.name = _data["name"];
|
|
27287
27295
|
this.description = _data["description"];
|
|
27288
|
-
this.utilizationPercent = _data["utilizationPercent"];
|
|
27289
27296
|
this.comment = _data["comment"];
|
|
27297
|
+
this.utilizationPercent = _data["utilizationPercent"];
|
|
27290
27298
|
if (Array.isArray(_data["capacity"])) {
|
|
27291
27299
|
this.capacity = [];
|
|
27292
27300
|
for (let item of _data["capacity"])
|
|
@@ -27308,8 +27316,8 @@ export class MachineCapacityDto {
|
|
|
27308
27316
|
data["machineExternalId"] = this.machineExternalId;
|
|
27309
27317
|
data["name"] = this.name;
|
|
27310
27318
|
data["description"] = this.description;
|
|
27311
|
-
data["utilizationPercent"] = this.utilizationPercent;
|
|
27312
27319
|
data["comment"] = this.comment;
|
|
27320
|
+
data["utilizationPercent"] = this.utilizationPercent;
|
|
27313
27321
|
if (Array.isArray(this.capacity)) {
|
|
27314
27322
|
data["capacity"] = [];
|
|
27315
27323
|
for (let item of this.capacity)
|
|
@@ -27446,6 +27454,51 @@ export class UpdateCalenderCapacity {
|
|
|
27446
27454
|
}
|
|
27447
27455
|
}
|
|
27448
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 {
|
|
27449
27502
|
constructor(data) {
|
|
27450
27503
|
if (data) {
|
|
27451
27504
|
for (var property in data) {
|
|
@@ -27458,13 +27511,12 @@ export class MachineKpiDto {
|
|
|
27458
27511
|
if (_data) {
|
|
27459
27512
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
27460
27513
|
this.uptime = _data["uptime"];
|
|
27461
|
-
this.capacity = _data["capacity"];
|
|
27462
27514
|
this.utilizationGoal = _data["utilizationGoal"];
|
|
27463
27515
|
}
|
|
27464
27516
|
}
|
|
27465
27517
|
static fromJS(data) {
|
|
27466
27518
|
data = typeof data === 'object' ? data : {};
|
|
27467
|
-
let result = new
|
|
27519
|
+
let result = new MachineDayKpiDto();
|
|
27468
27520
|
result.init(data);
|
|
27469
27521
|
return result;
|
|
27470
27522
|
}
|
|
@@ -27472,7 +27524,6 @@ export class MachineKpiDto {
|
|
|
27472
27524
|
data = typeof data === 'object' ? data : {};
|
|
27473
27525
|
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
27474
27526
|
data["uptime"] = this.uptime;
|
|
27475
|
-
data["capacity"] = this.capacity;
|
|
27476
27527
|
data["utilizationGoal"] = this.utilizationGoal;
|
|
27477
27528
|
return data;
|
|
27478
27529
|
}
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -6560,9 +6560,9 @@ 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): Promise<MachineKpiDto
|
|
6563
|
+
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
6564
6564
|
|
|
6565
|
-
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
|
|
6565
|
+
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
|
|
6566
6566
|
}
|
|
6567
6567
|
|
|
6568
6568
|
export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
@@ -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): 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)
|
|
@@ -6590,6 +6594,10 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6590
6594
|
throw new Error("The parameter 'endDate' cannot be null.");
|
|
6591
6595
|
else if (endDate !== undefined)
|
|
6592
6596
|
url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
|
|
6597
|
+
if (utcOffset === null)
|
|
6598
|
+
throw new Error("The parameter 'utcOffset' cannot be null.");
|
|
6599
|
+
else if (utcOffset !== undefined)
|
|
6600
|
+
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
6593
6601
|
url_ = url_.replace(/[?&]$/, "");
|
|
6594
6602
|
|
|
6595
6603
|
let options_: RequestInit = {
|
|
@@ -6606,18 +6614,14 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6606
6614
|
});
|
|
6607
6615
|
}
|
|
6608
6616
|
|
|
6609
|
-
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto
|
|
6617
|
+
protected processGetMachineKpi(response: Response): Promise<MachineKpiDto> {
|
|
6610
6618
|
const status = response.status;
|
|
6611
6619
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6612
6620
|
if (status === 200) {
|
|
6613
6621
|
return response.text().then((_responseText) => {
|
|
6614
6622
|
let result200: any = null;
|
|
6615
6623
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6616
|
-
|
|
6617
|
-
result200 = [] as any;
|
|
6618
|
-
for (let item of resultData200)
|
|
6619
|
-
result200!.push(MachineKpiDto.fromJS(item));
|
|
6620
|
-
}
|
|
6624
|
+
result200 = MachineKpiDto.fromJS(resultData200);
|
|
6621
6625
|
return result200;
|
|
6622
6626
|
});
|
|
6623
6627
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6625,10 +6629,10 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6625
6629
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6626
6630
|
});
|
|
6627
6631
|
}
|
|
6628
|
-
return Promise.resolve<MachineKpiDto
|
|
6632
|
+
return Promise.resolve<MachineKpiDto>(null as any);
|
|
6629
6633
|
}
|
|
6630
6634
|
|
|
6631
|
-
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto> {
|
|
6635
|
+
getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto> {
|
|
6632
6636
|
let url_ = this.baseUrl + "/kpi/daily-uptime?";
|
|
6633
6637
|
if (machineExternalId === null)
|
|
6634
6638
|
throw new Error("The parameter 'machineExternalId' cannot be null.");
|
|
@@ -6638,6 +6642,10 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
|
|
|
6638
6642
|
throw new Error("The parameter 'date' cannot be null.");
|
|
6639
6643
|
else if (date !== undefined)
|
|
6640
6644
|
url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
|
|
6645
|
+
if (utcOffset === null)
|
|
6646
|
+
throw new Error("The parameter 'utcOffset' cannot be null.");
|
|
6647
|
+
else if (utcOffset !== undefined)
|
|
6648
|
+
url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
|
|
6641
6649
|
url_ = url_.replace(/[?&]$/, "");
|
|
6642
6650
|
|
|
6643
6651
|
let options_: RequestInit = {
|
|
@@ -31735,8 +31743,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31735
31743
|
machineExternalId!: string;
|
|
31736
31744
|
name!: string;
|
|
31737
31745
|
description?: string | null;
|
|
31738
|
-
utilizationPercent!: number;
|
|
31739
31746
|
comment?: string | null;
|
|
31747
|
+
utilizationPercent!: number;
|
|
31740
31748
|
capacity!: MachineCapacitySettingsDto[];
|
|
31741
31749
|
created?: Date | null;
|
|
31742
31750
|
updatedBy?: string | null;
|
|
@@ -31759,8 +31767,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31759
31767
|
this.machineExternalId = _data["machineExternalId"];
|
|
31760
31768
|
this.name = _data["name"];
|
|
31761
31769
|
this.description = _data["description"];
|
|
31762
|
-
this.utilizationPercent = _data["utilizationPercent"];
|
|
31763
31770
|
this.comment = _data["comment"];
|
|
31771
|
+
this.utilizationPercent = _data["utilizationPercent"];
|
|
31764
31772
|
if (Array.isArray(_data["capacity"])) {
|
|
31765
31773
|
this.capacity = [] as any;
|
|
31766
31774
|
for (let item of _data["capacity"])
|
|
@@ -31784,8 +31792,8 @@ export class MachineCapacityDto implements IMachineCapacityDto {
|
|
|
31784
31792
|
data["machineExternalId"] = this.machineExternalId;
|
|
31785
31793
|
data["name"] = this.name;
|
|
31786
31794
|
data["description"] = this.description;
|
|
31787
|
-
data["utilizationPercent"] = this.utilizationPercent;
|
|
31788
31795
|
data["comment"] = this.comment;
|
|
31796
|
+
data["utilizationPercent"] = this.utilizationPercent;
|
|
31789
31797
|
if (Array.isArray(this.capacity)) {
|
|
31790
31798
|
data["capacity"] = [];
|
|
31791
31799
|
for (let item of this.capacity)
|
|
@@ -31802,8 +31810,8 @@ export interface IMachineCapacityDto {
|
|
|
31802
31810
|
machineExternalId: string;
|
|
31803
31811
|
name: string;
|
|
31804
31812
|
description?: string | null;
|
|
31805
|
-
utilizationPercent: number;
|
|
31806
31813
|
comment?: string | null;
|
|
31814
|
+
utilizationPercent: number;
|
|
31807
31815
|
capacity: MachineCapacitySettingsDto[];
|
|
31808
31816
|
created?: Date | null;
|
|
31809
31817
|
updatedBy?: string | null;
|
|
@@ -31989,10 +31997,11 @@ export interface IUpdateCalenderCapacity {
|
|
|
31989
31997
|
}
|
|
31990
31998
|
|
|
31991
31999
|
export class MachineKpiDto implements IMachineKpiDto {
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
32000
|
+
uptimeToNow!: number;
|
|
32001
|
+
uptimeToNowPreviousPeriod!: number;
|
|
32002
|
+
averageUpTime!: number;
|
|
32003
|
+
uptimeTargetReached!: number;
|
|
32004
|
+
days!: MachineDayKpiDto[];
|
|
31996
32005
|
|
|
31997
32006
|
constructor(data?: IMachineKpiDto) {
|
|
31998
32007
|
if (data) {
|
|
@@ -32001,20 +32010,80 @@ export class MachineKpiDto implements IMachineKpiDto {
|
|
|
32001
32010
|
(<any>this)[property] = (<any>data)[property];
|
|
32002
32011
|
}
|
|
32003
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
|
+
}
|
|
32004
32074
|
}
|
|
32005
32075
|
|
|
32006
32076
|
init(_data?: any) {
|
|
32007
32077
|
if (_data) {
|
|
32008
32078
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
32009
32079
|
this.uptime = _data["uptime"];
|
|
32010
|
-
this.capacity = _data["capacity"];
|
|
32011
32080
|
this.utilizationGoal = _data["utilizationGoal"];
|
|
32012
32081
|
}
|
|
32013
32082
|
}
|
|
32014
32083
|
|
|
32015
|
-
static fromJS(data: any):
|
|
32084
|
+
static fromJS(data: any): MachineDayKpiDto {
|
|
32016
32085
|
data = typeof data === 'object' ? data : {};
|
|
32017
|
-
let result = new
|
|
32086
|
+
let result = new MachineDayKpiDto();
|
|
32018
32087
|
result.init(data);
|
|
32019
32088
|
return result;
|
|
32020
32089
|
}
|
|
@@ -32023,17 +32092,15 @@ export class MachineKpiDto implements IMachineKpiDto {
|
|
|
32023
32092
|
data = typeof data === 'object' ? data : {};
|
|
32024
32093
|
data["date"] = this.date ? this.date.toISOString() : <any>undefined;
|
|
32025
32094
|
data["uptime"] = this.uptime;
|
|
32026
|
-
data["capacity"] = this.capacity;
|
|
32027
32095
|
data["utilizationGoal"] = this.utilizationGoal;
|
|
32028
32096
|
return data;
|
|
32029
32097
|
}
|
|
32030
32098
|
}
|
|
32031
32099
|
|
|
32032
|
-
export interface
|
|
32033
|
-
date
|
|
32034
|
-
uptime
|
|
32035
|
-
|
|
32036
|
-
utilizationGoal?: number;
|
|
32100
|
+
export interface IMachineDayKpiDto {
|
|
32101
|
+
date: Date;
|
|
32102
|
+
uptime: number;
|
|
32103
|
+
utilizationGoal: number;
|
|
32037
32104
|
}
|
|
32038
32105
|
|
|
32039
32106
|
export class MachineDailyUptimeDto implements IMachineDailyUptimeDto {
|
|
@@ -47343,8 +47410,8 @@ export interface IResourceGroupDto {
|
|
|
47343
47410
|
}
|
|
47344
47411
|
|
|
47345
47412
|
export class ProductionResourceDto implements IProductionResourceDto {
|
|
47346
|
-
id?: string;
|
|
47347
|
-
name?: string;
|
|
47413
|
+
id?: string | null;
|
|
47414
|
+
name?: string | null;
|
|
47348
47415
|
department?: DepartmentDto | null;
|
|
47349
47416
|
|
|
47350
47417
|
constructor(data?: IProductionResourceDto) {
|
|
@@ -47381,8 +47448,8 @@ export class ProductionResourceDto implements IProductionResourceDto {
|
|
|
47381
47448
|
}
|
|
47382
47449
|
|
|
47383
47450
|
export interface IProductionResourceDto {
|
|
47384
|
-
id?: string;
|
|
47385
|
-
name?: string;
|
|
47451
|
+
id?: string | null;
|
|
47452
|
+
name?: string | null;
|
|
47386
47453
|
department?: DepartmentDto | null;
|
|
47387
47454
|
}
|
|
47388
47455
|
|