@ignos/api-client 20250707.0.12091 → 20250707.0.12102
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 +80 -23
- package/lib/ignosportal-api.js +207 -24
- package/package.json +1 -1
- package/src/ignosportal-api.ts +271 -41
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -390,8 +390,8 @@ export declare class PulseClient extends AuthorizedApiBase implements IPulseClie
|
|
|
390
390
|
protected processUpdatePulseSettings(response: Response): Promise<PulseSettingsDto>;
|
|
391
391
|
}
|
|
392
392
|
export interface IUtilizationClient {
|
|
393
|
-
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
394
|
-
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
393
|
+
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
|
|
394
|
+
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
|
|
395
395
|
getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
|
|
396
396
|
getCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDatapointListDto>;
|
|
397
397
|
getCrossCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDatapointListDto>;
|
|
@@ -403,9 +403,9 @@ export declare class UtilizationClient extends AuthorizedApiBase implements IUti
|
|
|
403
403
|
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
|
|
404
404
|
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
405
405
|
});
|
|
406
|
-
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
406
|
+
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
|
|
407
407
|
protected processGetCompanyUtilization(response: Response): Promise<CompanyUtilizationDto>;
|
|
408
|
-
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
408
|
+
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
|
|
409
409
|
protected processGetCrossCompanyUtilization(response: Response): Promise<CrossCompanyUtilizationDto>;
|
|
410
410
|
getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
|
|
411
411
|
protected processGetUtilizationDatapoints(response: Response): Promise<MachineUtilizationDatapointListDto>;
|
|
@@ -787,8 +787,10 @@ export declare class DowntimeReasonsClient extends AuthorizedApiBase implements
|
|
|
787
787
|
export interface IKpiAdminClient {
|
|
788
788
|
getMachineCapacityAdmin(): Promise<MachineGroupCapacityDto[]>;
|
|
789
789
|
updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
|
|
790
|
-
|
|
791
|
-
|
|
790
|
+
getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
|
|
791
|
+
updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
|
|
792
|
+
getCalendarSettings(): Promise<CalendarSettingsDto>;
|
|
793
|
+
updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
|
|
792
794
|
}
|
|
793
795
|
export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient {
|
|
794
796
|
private http;
|
|
@@ -801,10 +803,14 @@ export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdm
|
|
|
801
803
|
protected processGetMachineCapacityAdmin(response: Response): Promise<MachineGroupCapacityDto[]>;
|
|
802
804
|
updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
|
|
803
805
|
protected processUpdateMachineCapacityAdmin(response: Response): Promise<MachineCapacityDto>;
|
|
804
|
-
|
|
805
|
-
protected
|
|
806
|
-
|
|
807
|
-
protected
|
|
806
|
+
getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
|
|
807
|
+
protected processGetCalendarCapacityAdmin(response: Response): Promise<CalendarDayDto[]>;
|
|
808
|
+
updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
|
|
809
|
+
protected processUpdateCalendarCapacityAdmin(response: Response): Promise<CalendarCapacityDto>;
|
|
810
|
+
getCalendarSettings(): Promise<CalendarSettingsDto>;
|
|
811
|
+
protected processGetCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
|
|
812
|
+
updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
|
|
813
|
+
protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
|
|
808
814
|
}
|
|
809
815
|
export interface IKpiClient {
|
|
810
816
|
getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
|
|
@@ -5861,30 +5867,81 @@ export interface IUpdateMachinesCapacity {
|
|
|
5861
5867
|
utilizationPercent?: number | null;
|
|
5862
5868
|
capacity?: MachineCapacitySettingsDto[] | null;
|
|
5863
5869
|
}
|
|
5864
|
-
export declare class
|
|
5870
|
+
export declare class CalendarDayDto implements ICalendarDayDto {
|
|
5865
5871
|
date?: Date;
|
|
5866
|
-
dayCapacity?:
|
|
5867
|
-
|
|
5872
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5873
|
+
capacityHours?: number;
|
|
5874
|
+
constructor(data?: ICalendarDayDto);
|
|
5868
5875
|
init(_data?: any): void;
|
|
5869
|
-
static fromJS(data: any):
|
|
5876
|
+
static fromJS(data: any): CalendarDayDto;
|
|
5870
5877
|
toJSON(data?: any): any;
|
|
5871
5878
|
}
|
|
5872
|
-
export interface
|
|
5879
|
+
export interface ICalendarDayDto {
|
|
5873
5880
|
date?: Date;
|
|
5874
|
-
dayCapacity?:
|
|
5881
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5882
|
+
capacityHours?: number;
|
|
5875
5883
|
}
|
|
5876
|
-
export type
|
|
5877
|
-
export declare class
|
|
5884
|
+
export type CalendarDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
|
|
5885
|
+
export declare class CalendarCapacityDto implements ICalendarCapacityDto {
|
|
5878
5886
|
date?: Date;
|
|
5879
|
-
dayCapacity?:
|
|
5880
|
-
constructor(data?:
|
|
5887
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5888
|
+
constructor(data?: ICalendarCapacityDto);
|
|
5881
5889
|
init(_data?: any): void;
|
|
5882
|
-
static fromJS(data: any):
|
|
5890
|
+
static fromJS(data: any): CalendarCapacityDto;
|
|
5883
5891
|
toJSON(data?: any): any;
|
|
5884
5892
|
}
|
|
5885
|
-
export interface
|
|
5893
|
+
export interface ICalendarCapacityDto {
|
|
5886
5894
|
date?: Date;
|
|
5887
|
-
dayCapacity?:
|
|
5895
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5896
|
+
}
|
|
5897
|
+
export declare class UpdateCalendarCapacity implements IUpdateCalendarCapacity {
|
|
5898
|
+
date?: Date;
|
|
5899
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5900
|
+
constructor(data?: IUpdateCalendarCapacity);
|
|
5901
|
+
init(_data?: any): void;
|
|
5902
|
+
static fromJS(data: any): UpdateCalendarCapacity;
|
|
5903
|
+
toJSON(data?: any): any;
|
|
5904
|
+
}
|
|
5905
|
+
export interface IUpdateCalendarCapacity {
|
|
5906
|
+
date?: Date;
|
|
5907
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
5908
|
+
}
|
|
5909
|
+
export declare class CalendarSettingsDto implements ICalendarSettingsDto {
|
|
5910
|
+
defaultHoursPerWeekday?: {
|
|
5911
|
+
[key in DayOfWeek]?: number;
|
|
5912
|
+
};
|
|
5913
|
+
halfDayHours?: number;
|
|
5914
|
+
holidayHours?: number;
|
|
5915
|
+
constructor(data?: ICalendarSettingsDto);
|
|
5916
|
+
init(_data?: any): void;
|
|
5917
|
+
static fromJS(data: any): CalendarSettingsDto;
|
|
5918
|
+
toJSON(data?: any): any;
|
|
5919
|
+
}
|
|
5920
|
+
export interface ICalendarSettingsDto {
|
|
5921
|
+
defaultHoursPerWeekday?: {
|
|
5922
|
+
[key in DayOfWeek]?: number;
|
|
5923
|
+
};
|
|
5924
|
+
halfDayHours?: number;
|
|
5925
|
+
holidayHours?: number;
|
|
5926
|
+
}
|
|
5927
|
+
export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
5928
|
+
export declare class UpdateCalendarSettingsCommand implements IUpdateCalendarSettingsCommand {
|
|
5929
|
+
defaultHoursPerWeekday?: {
|
|
5930
|
+
[key in DayOfWeek]?: number;
|
|
5931
|
+
};
|
|
5932
|
+
halfDayHours?: number;
|
|
5933
|
+
holidayHours?: number;
|
|
5934
|
+
constructor(data?: IUpdateCalendarSettingsCommand);
|
|
5935
|
+
init(_data?: any): void;
|
|
5936
|
+
static fromJS(data: any): UpdateCalendarSettingsCommand;
|
|
5937
|
+
toJSON(data?: any): any;
|
|
5938
|
+
}
|
|
5939
|
+
export interface IUpdateCalendarSettingsCommand {
|
|
5940
|
+
defaultHoursPerWeekday?: {
|
|
5941
|
+
[key in DayOfWeek]?: number;
|
|
5942
|
+
};
|
|
5943
|
+
halfDayHours?: number;
|
|
5944
|
+
holidayHours?: number;
|
|
5888
5945
|
}
|
|
5889
5946
|
export declare class MachineKpiDto implements IMachineKpiDto {
|
|
5890
5947
|
uptimeToNow: number;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -2169,7 +2169,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
2169
2169
|
this.http = http ? http : window;
|
|
2170
2170
|
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
2171
2171
|
}
|
|
2172
|
-
getCompanyUtilization(utilizationType, startTime, endTime
|
|
2172
|
+
getCompanyUtilization(utilizationType, startTime, endTime) {
|
|
2173
2173
|
let url_ = this.baseUrl + "/utilization?";
|
|
2174
2174
|
if (utilizationType === null)
|
|
2175
2175
|
throw new Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -2179,10 +2179,6 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
2179
2179
|
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
2180
2180
|
if (endTime !== undefined && endTime !== null)
|
|
2181
2181
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
2182
|
-
if (dataPointCount === null)
|
|
2183
|
-
throw new Error("The parameter 'dataPointCount' cannot be null.");
|
|
2184
|
-
else if (dataPointCount !== undefined)
|
|
2185
|
-
url_ += "dataPointCount=" + encodeURIComponent("" + dataPointCount) + "&";
|
|
2186
2182
|
url_ = url_.replace(/[?&]$/, "");
|
|
2187
2183
|
let options_ = {
|
|
2188
2184
|
method: "GET",
|
|
@@ -2218,7 +2214,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
2218
2214
|
}
|
|
2219
2215
|
return Promise.resolve(null);
|
|
2220
2216
|
}
|
|
2221
|
-
getCrossCompanyUtilization(utilizationType, startTime, endTime
|
|
2217
|
+
getCrossCompanyUtilization(utilizationType, startTime, endTime) {
|
|
2222
2218
|
let url_ = this.baseUrl + "/utilization/cross-company?";
|
|
2223
2219
|
if (utilizationType === null)
|
|
2224
2220
|
throw new Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -2228,10 +2224,6 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
2228
2224
|
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
2229
2225
|
if (endTime !== undefined && endTime !== null)
|
|
2230
2226
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
2231
|
-
if (dataPointCount === null)
|
|
2232
|
-
throw new Error("The parameter 'dataPointCount' cannot be null.");
|
|
2233
|
-
else if (dataPointCount !== undefined)
|
|
2234
|
-
url_ += "dataPointCount=" + encodeURIComponent("" + dataPointCount) + "&";
|
|
2235
2227
|
url_ = url_.replace(/[?&]$/, "");
|
|
2236
2228
|
let options_ = {
|
|
2237
2229
|
method: "GET",
|
|
@@ -6026,8 +6018,8 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6026
6018
|
}
|
|
6027
6019
|
return Promise.resolve(null);
|
|
6028
6020
|
}
|
|
6029
|
-
|
|
6030
|
-
let url_ = this.baseUrl + "/kpiadmin/
|
|
6021
|
+
getCalendarCapacityAdmin(startDate, endDate) {
|
|
6022
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar?";
|
|
6031
6023
|
if (startDate === null)
|
|
6032
6024
|
throw new Error("The parameter 'startDate' cannot be null.");
|
|
6033
6025
|
else if (startDate !== undefined)
|
|
@@ -6046,10 +6038,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6046
6038
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6047
6039
|
return this.http.fetch(url_, transformedOptions_);
|
|
6048
6040
|
}).then((_response) => {
|
|
6049
|
-
return this.
|
|
6041
|
+
return this.processGetCalendarCapacityAdmin(_response);
|
|
6050
6042
|
});
|
|
6051
6043
|
}
|
|
6052
|
-
|
|
6044
|
+
processGetCalendarCapacityAdmin(response) {
|
|
6053
6045
|
const status = response.status;
|
|
6054
6046
|
let _headers = {};
|
|
6055
6047
|
if (response.headers && response.headers.forEach) {
|
|
@@ -6063,7 +6055,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6063
6055
|
if (Array.isArray(resultData200)) {
|
|
6064
6056
|
result200 = [];
|
|
6065
6057
|
for (let item of resultData200)
|
|
6066
|
-
result200.push(
|
|
6058
|
+
result200.push(CalendarDayDto.fromJS(item));
|
|
6067
6059
|
}
|
|
6068
6060
|
return result200;
|
|
6069
6061
|
});
|
|
@@ -6075,8 +6067,8 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6075
6067
|
}
|
|
6076
6068
|
return Promise.resolve(null);
|
|
6077
6069
|
}
|
|
6078
|
-
|
|
6079
|
-
let url_ = this.baseUrl + "/kpiadmin/
|
|
6070
|
+
updateCalendarCapacityAdmin(request) {
|
|
6071
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar";
|
|
6080
6072
|
url_ = url_.replace(/[?&]$/, "");
|
|
6081
6073
|
const content_ = JSON.stringify(request);
|
|
6082
6074
|
let options_ = {
|
|
@@ -6090,10 +6082,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6090
6082
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6091
6083
|
return this.http.fetch(url_, transformedOptions_);
|
|
6092
6084
|
}).then((_response) => {
|
|
6093
|
-
return this.
|
|
6085
|
+
return this.processUpdateCalendarCapacityAdmin(_response);
|
|
6094
6086
|
});
|
|
6095
6087
|
}
|
|
6096
|
-
|
|
6088
|
+
processUpdateCalendarCapacityAdmin(response) {
|
|
6097
6089
|
const status = response.status;
|
|
6098
6090
|
let _headers = {};
|
|
6099
6091
|
if (response.headers && response.headers.forEach) {
|
|
@@ -6104,7 +6096,84 @@ export class KpiAdminClient extends AuthorizedApiBase {
|
|
|
6104
6096
|
return response.text().then((_responseText) => {
|
|
6105
6097
|
let result200 = null;
|
|
6106
6098
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6107
|
-
result200 =
|
|
6099
|
+
result200 = CalendarCapacityDto.fromJS(resultData200);
|
|
6100
|
+
return result200;
|
|
6101
|
+
});
|
|
6102
|
+
}
|
|
6103
|
+
else if (status !== 200 && status !== 204) {
|
|
6104
|
+
return response.text().then((_responseText) => {
|
|
6105
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6106
|
+
});
|
|
6107
|
+
}
|
|
6108
|
+
return Promise.resolve(null);
|
|
6109
|
+
}
|
|
6110
|
+
getCalendarSettings() {
|
|
6111
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
6112
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6113
|
+
let options_ = {
|
|
6114
|
+
method: "GET",
|
|
6115
|
+
headers: {
|
|
6116
|
+
"Accept": "application/json"
|
|
6117
|
+
}
|
|
6118
|
+
};
|
|
6119
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6120
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6121
|
+
}).then((_response) => {
|
|
6122
|
+
return this.processGetCalendarSettings(_response);
|
|
6123
|
+
});
|
|
6124
|
+
}
|
|
6125
|
+
processGetCalendarSettings(response) {
|
|
6126
|
+
const status = response.status;
|
|
6127
|
+
let _headers = {};
|
|
6128
|
+
if (response.headers && response.headers.forEach) {
|
|
6129
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6130
|
+
}
|
|
6131
|
+
;
|
|
6132
|
+
if (status === 200) {
|
|
6133
|
+
return response.text().then((_responseText) => {
|
|
6134
|
+
let result200 = null;
|
|
6135
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6136
|
+
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
6137
|
+
return result200;
|
|
6138
|
+
});
|
|
6139
|
+
}
|
|
6140
|
+
else if (status !== 200 && status !== 204) {
|
|
6141
|
+
return response.text().then((_responseText) => {
|
|
6142
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6143
|
+
});
|
|
6144
|
+
}
|
|
6145
|
+
return Promise.resolve(null);
|
|
6146
|
+
}
|
|
6147
|
+
updateCalendarSettings(cmd) {
|
|
6148
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
6149
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6150
|
+
const content_ = JSON.stringify(cmd);
|
|
6151
|
+
let options_ = {
|
|
6152
|
+
body: content_,
|
|
6153
|
+
method: "PUT",
|
|
6154
|
+
headers: {
|
|
6155
|
+
"Content-Type": "application/json",
|
|
6156
|
+
"Accept": "application/json"
|
|
6157
|
+
}
|
|
6158
|
+
};
|
|
6159
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6160
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6161
|
+
}).then((_response) => {
|
|
6162
|
+
return this.processUpdateCalendarSettings(_response);
|
|
6163
|
+
});
|
|
6164
|
+
}
|
|
6165
|
+
processUpdateCalendarSettings(response) {
|
|
6166
|
+
const status = response.status;
|
|
6167
|
+
let _headers = {};
|
|
6168
|
+
if (response.headers && response.headers.forEach) {
|
|
6169
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6170
|
+
}
|
|
6171
|
+
;
|
|
6172
|
+
if (status === 200) {
|
|
6173
|
+
return response.text().then((_responseText) => {
|
|
6174
|
+
let result200 = null;
|
|
6175
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6176
|
+
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
6108
6177
|
return result200;
|
|
6109
6178
|
});
|
|
6110
6179
|
}
|
|
@@ -29240,7 +29309,7 @@ export class UpdateMachinesCapacity {
|
|
|
29240
29309
|
return data;
|
|
29241
29310
|
}
|
|
29242
29311
|
}
|
|
29243
|
-
export class
|
|
29312
|
+
export class CalendarDayDto {
|
|
29244
29313
|
constructor(data) {
|
|
29245
29314
|
if (data) {
|
|
29246
29315
|
for (var property in data) {
|
|
@@ -29253,11 +29322,12 @@ export class CalenderCapacityDto {
|
|
|
29253
29322
|
if (_data) {
|
|
29254
29323
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
29255
29324
|
this.dayCapacity = _data["dayCapacity"];
|
|
29325
|
+
this.capacityHours = _data["capacityHours"];
|
|
29256
29326
|
}
|
|
29257
29327
|
}
|
|
29258
29328
|
static fromJS(data) {
|
|
29259
29329
|
data = typeof data === 'object' ? data : {};
|
|
29260
|
-
let result = new
|
|
29330
|
+
let result = new CalendarDayDto();
|
|
29261
29331
|
result.init(data);
|
|
29262
29332
|
return result;
|
|
29263
29333
|
}
|
|
@@ -29265,10 +29335,11 @@ export class CalenderCapacityDto {
|
|
|
29265
29335
|
data = typeof data === 'object' ? data : {};
|
|
29266
29336
|
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
29267
29337
|
data["dayCapacity"] = this.dayCapacity;
|
|
29338
|
+
data["capacityHours"] = this.capacityHours;
|
|
29268
29339
|
return data;
|
|
29269
29340
|
}
|
|
29270
29341
|
}
|
|
29271
|
-
export class
|
|
29342
|
+
export class CalendarCapacityDto {
|
|
29272
29343
|
constructor(data) {
|
|
29273
29344
|
if (data) {
|
|
29274
29345
|
for (var property in data) {
|
|
@@ -29285,7 +29356,7 @@ export class UpdateCalenderCapacity {
|
|
|
29285
29356
|
}
|
|
29286
29357
|
static fromJS(data) {
|
|
29287
29358
|
data = typeof data === 'object' ? data : {};
|
|
29288
|
-
let result = new
|
|
29359
|
+
let result = new CalendarCapacityDto();
|
|
29289
29360
|
result.init(data);
|
|
29290
29361
|
return result;
|
|
29291
29362
|
}
|
|
@@ -29296,6 +29367,118 @@ export class UpdateCalenderCapacity {
|
|
|
29296
29367
|
return data;
|
|
29297
29368
|
}
|
|
29298
29369
|
}
|
|
29370
|
+
export class UpdateCalendarCapacity {
|
|
29371
|
+
constructor(data) {
|
|
29372
|
+
if (data) {
|
|
29373
|
+
for (var property in data) {
|
|
29374
|
+
if (data.hasOwnProperty(property))
|
|
29375
|
+
this[property] = data[property];
|
|
29376
|
+
}
|
|
29377
|
+
}
|
|
29378
|
+
}
|
|
29379
|
+
init(_data) {
|
|
29380
|
+
if (_data) {
|
|
29381
|
+
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
29382
|
+
this.dayCapacity = _data["dayCapacity"];
|
|
29383
|
+
}
|
|
29384
|
+
}
|
|
29385
|
+
static fromJS(data) {
|
|
29386
|
+
data = typeof data === 'object' ? data : {};
|
|
29387
|
+
let result = new UpdateCalendarCapacity();
|
|
29388
|
+
result.init(data);
|
|
29389
|
+
return result;
|
|
29390
|
+
}
|
|
29391
|
+
toJSON(data) {
|
|
29392
|
+
data = typeof data === 'object' ? data : {};
|
|
29393
|
+
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
29394
|
+
data["dayCapacity"] = this.dayCapacity;
|
|
29395
|
+
return data;
|
|
29396
|
+
}
|
|
29397
|
+
}
|
|
29398
|
+
export class CalendarSettingsDto {
|
|
29399
|
+
constructor(data) {
|
|
29400
|
+
if (data) {
|
|
29401
|
+
for (var property in data) {
|
|
29402
|
+
if (data.hasOwnProperty(property))
|
|
29403
|
+
this[property] = data[property];
|
|
29404
|
+
}
|
|
29405
|
+
}
|
|
29406
|
+
}
|
|
29407
|
+
init(_data) {
|
|
29408
|
+
if (_data) {
|
|
29409
|
+
if (_data["defaultHoursPerWeekday"]) {
|
|
29410
|
+
this.defaultHoursPerWeekday = {};
|
|
29411
|
+
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
29412
|
+
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
29413
|
+
this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
|
|
29414
|
+
}
|
|
29415
|
+
}
|
|
29416
|
+
this.halfDayHours = _data["halfDayHours"];
|
|
29417
|
+
this.holidayHours = _data["holidayHours"];
|
|
29418
|
+
}
|
|
29419
|
+
}
|
|
29420
|
+
static fromJS(data) {
|
|
29421
|
+
data = typeof data === 'object' ? data : {};
|
|
29422
|
+
let result = new CalendarSettingsDto();
|
|
29423
|
+
result.init(data);
|
|
29424
|
+
return result;
|
|
29425
|
+
}
|
|
29426
|
+
toJSON(data) {
|
|
29427
|
+
data = typeof data === 'object' ? data : {};
|
|
29428
|
+
if (this.defaultHoursPerWeekday) {
|
|
29429
|
+
data["defaultHoursPerWeekday"] = {};
|
|
29430
|
+
for (let key in this.defaultHoursPerWeekday) {
|
|
29431
|
+
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
29432
|
+
data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
|
|
29433
|
+
}
|
|
29434
|
+
}
|
|
29435
|
+
data["halfDayHours"] = this.halfDayHours;
|
|
29436
|
+
data["holidayHours"] = this.holidayHours;
|
|
29437
|
+
return data;
|
|
29438
|
+
}
|
|
29439
|
+
}
|
|
29440
|
+
export class UpdateCalendarSettingsCommand {
|
|
29441
|
+
constructor(data) {
|
|
29442
|
+
if (data) {
|
|
29443
|
+
for (var property in data) {
|
|
29444
|
+
if (data.hasOwnProperty(property))
|
|
29445
|
+
this[property] = data[property];
|
|
29446
|
+
}
|
|
29447
|
+
}
|
|
29448
|
+
}
|
|
29449
|
+
init(_data) {
|
|
29450
|
+
if (_data) {
|
|
29451
|
+
if (_data["defaultHoursPerWeekday"]) {
|
|
29452
|
+
this.defaultHoursPerWeekday = {};
|
|
29453
|
+
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
29454
|
+
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
29455
|
+
this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
|
|
29456
|
+
}
|
|
29457
|
+
}
|
|
29458
|
+
this.halfDayHours = _data["halfDayHours"];
|
|
29459
|
+
this.holidayHours = _data["holidayHours"];
|
|
29460
|
+
}
|
|
29461
|
+
}
|
|
29462
|
+
static fromJS(data) {
|
|
29463
|
+
data = typeof data === 'object' ? data : {};
|
|
29464
|
+
let result = new UpdateCalendarSettingsCommand();
|
|
29465
|
+
result.init(data);
|
|
29466
|
+
return result;
|
|
29467
|
+
}
|
|
29468
|
+
toJSON(data) {
|
|
29469
|
+
data = typeof data === 'object' ? data : {};
|
|
29470
|
+
if (this.defaultHoursPerWeekday) {
|
|
29471
|
+
data["defaultHoursPerWeekday"] = {};
|
|
29472
|
+
for (let key in this.defaultHoursPerWeekday) {
|
|
29473
|
+
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
29474
|
+
data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
|
|
29475
|
+
}
|
|
29476
|
+
}
|
|
29477
|
+
data["halfDayHours"] = this.halfDayHours;
|
|
29478
|
+
data["holidayHours"] = this.holidayHours;
|
|
29479
|
+
return data;
|
|
29480
|
+
}
|
|
29481
|
+
}
|
|
29299
29482
|
export class MachineKpiDto {
|
|
29300
29483
|
constructor(data) {
|
|
29301
29484
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -2387,9 +2387,9 @@ export class PulseClient extends AuthorizedApiBase implements IPulseClient {
|
|
|
2387
2387
|
|
|
2388
2388
|
export interface IUtilizationClient {
|
|
2389
2389
|
|
|
2390
|
-
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
2390
|
+
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
|
|
2391
2391
|
|
|
2392
|
-
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
2392
|
+
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
|
|
2393
2393
|
|
|
2394
2394
|
getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
|
|
2395
2395
|
|
|
@@ -2409,7 +2409,7 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
|
|
|
2409
2409
|
this.baseUrl = baseUrl ?? "";
|
|
2410
2410
|
}
|
|
2411
2411
|
|
|
2412
|
-
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
2412
|
+
getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto> {
|
|
2413
2413
|
let url_ = this.baseUrl + "/utilization?";
|
|
2414
2414
|
if (utilizationType === null)
|
|
2415
2415
|
throw new Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -2419,10 +2419,6 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
|
|
|
2419
2419
|
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
2420
2420
|
if (endTime !== undefined && endTime !== null)
|
|
2421
2421
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
2422
|
-
if (dataPointCount === null)
|
|
2423
|
-
throw new Error("The parameter 'dataPointCount' cannot be null.");
|
|
2424
|
-
else if (dataPointCount !== undefined)
|
|
2425
|
-
url_ += "dataPointCount=" + encodeURIComponent("" + dataPointCount) + "&";
|
|
2426
2422
|
url_ = url_.replace(/[?&]$/, "");
|
|
2427
2423
|
|
|
2428
2424
|
let options_: RequestInit = {
|
|
@@ -2457,7 +2453,7 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
|
|
|
2457
2453
|
return Promise.resolve<CompanyUtilizationDto>(null as any);
|
|
2458
2454
|
}
|
|
2459
2455
|
|
|
2460
|
-
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined
|
|
2456
|
+
getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto> {
|
|
2461
2457
|
let url_ = this.baseUrl + "/utilization/cross-company?";
|
|
2462
2458
|
if (utilizationType === null)
|
|
2463
2459
|
throw new Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -2467,10 +2463,6 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
|
|
|
2467
2463
|
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
2468
2464
|
if (endTime !== undefined && endTime !== null)
|
|
2469
2465
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
2470
|
-
if (dataPointCount === null)
|
|
2471
|
-
throw new Error("The parameter 'dataPointCount' cannot be null.");
|
|
2472
|
-
else if (dataPointCount !== undefined)
|
|
2473
|
-
url_ += "dataPointCount=" + encodeURIComponent("" + dataPointCount) + "&";
|
|
2474
2466
|
url_ = url_.replace(/[?&]$/, "");
|
|
2475
2467
|
|
|
2476
2468
|
let options_: RequestInit = {
|
|
@@ -6379,9 +6371,13 @@ export interface IKpiAdminClient {
|
|
|
6379
6371
|
|
|
6380
6372
|
updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
|
|
6381
6373
|
|
|
6382
|
-
|
|
6374
|
+
getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
|
|
6383
6375
|
|
|
6384
|
-
|
|
6376
|
+
updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
|
|
6377
|
+
|
|
6378
|
+
getCalendarSettings(): Promise<CalendarSettingsDto>;
|
|
6379
|
+
|
|
6380
|
+
updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
|
|
6385
6381
|
}
|
|
6386
6382
|
|
|
6387
6383
|
export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient {
|
|
@@ -6475,8 +6471,8 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6475
6471
|
return Promise.resolve<MachineCapacityDto>(null as any);
|
|
6476
6472
|
}
|
|
6477
6473
|
|
|
6478
|
-
|
|
6479
|
-
let url_ = this.baseUrl + "/kpiadmin/
|
|
6474
|
+
getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]> {
|
|
6475
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar?";
|
|
6480
6476
|
if (startDate === null)
|
|
6481
6477
|
throw new Error("The parameter 'startDate' cannot be null.");
|
|
6482
6478
|
else if (startDate !== undefined)
|
|
@@ -6497,11 +6493,11 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6497
6493
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6498
6494
|
return this.http.fetch(url_, transformedOptions_);
|
|
6499
6495
|
}).then((_response: Response) => {
|
|
6500
|
-
return this.
|
|
6496
|
+
return this.processGetCalendarCapacityAdmin(_response);
|
|
6501
6497
|
});
|
|
6502
6498
|
}
|
|
6503
6499
|
|
|
6504
|
-
protected
|
|
6500
|
+
protected processGetCalendarCapacityAdmin(response: Response): Promise<CalendarDayDto[]> {
|
|
6505
6501
|
const status = response.status;
|
|
6506
6502
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6507
6503
|
if (status === 200) {
|
|
@@ -6511,7 +6507,7 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6511
6507
|
if (Array.isArray(resultData200)) {
|
|
6512
6508
|
result200 = [] as any;
|
|
6513
6509
|
for (let item of resultData200)
|
|
6514
|
-
result200!.push(
|
|
6510
|
+
result200!.push(CalendarDayDto.fromJS(item));
|
|
6515
6511
|
}
|
|
6516
6512
|
return result200;
|
|
6517
6513
|
});
|
|
@@ -6520,11 +6516,11 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6520
6516
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6521
6517
|
});
|
|
6522
6518
|
}
|
|
6523
|
-
return Promise.resolve<
|
|
6519
|
+
return Promise.resolve<CalendarDayDto[]>(null as any);
|
|
6524
6520
|
}
|
|
6525
6521
|
|
|
6526
|
-
|
|
6527
|
-
let url_ = this.baseUrl + "/kpiadmin/
|
|
6522
|
+
updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto> {
|
|
6523
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar";
|
|
6528
6524
|
url_ = url_.replace(/[?&]$/, "");
|
|
6529
6525
|
|
|
6530
6526
|
const content_ = JSON.stringify(request);
|
|
@@ -6541,18 +6537,94 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6541
6537
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6542
6538
|
return this.http.fetch(url_, transformedOptions_);
|
|
6543
6539
|
}).then((_response: Response) => {
|
|
6544
|
-
return this.
|
|
6540
|
+
return this.processUpdateCalendarCapacityAdmin(_response);
|
|
6541
|
+
});
|
|
6542
|
+
}
|
|
6543
|
+
|
|
6544
|
+
protected processUpdateCalendarCapacityAdmin(response: Response): Promise<CalendarCapacityDto> {
|
|
6545
|
+
const status = response.status;
|
|
6546
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6547
|
+
if (status === 200) {
|
|
6548
|
+
return response.text().then((_responseText) => {
|
|
6549
|
+
let result200: any = null;
|
|
6550
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6551
|
+
result200 = CalendarCapacityDto.fromJS(resultData200);
|
|
6552
|
+
return result200;
|
|
6553
|
+
});
|
|
6554
|
+
} else if (status !== 200 && status !== 204) {
|
|
6555
|
+
return response.text().then((_responseText) => {
|
|
6556
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6557
|
+
});
|
|
6558
|
+
}
|
|
6559
|
+
return Promise.resolve<CalendarCapacityDto>(null as any);
|
|
6560
|
+
}
|
|
6561
|
+
|
|
6562
|
+
getCalendarSettings(): Promise<CalendarSettingsDto> {
|
|
6563
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
6564
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6565
|
+
|
|
6566
|
+
let options_: RequestInit = {
|
|
6567
|
+
method: "GET",
|
|
6568
|
+
headers: {
|
|
6569
|
+
"Accept": "application/json"
|
|
6570
|
+
}
|
|
6571
|
+
};
|
|
6572
|
+
|
|
6573
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6574
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6575
|
+
}).then((_response: Response) => {
|
|
6576
|
+
return this.processGetCalendarSettings(_response);
|
|
6577
|
+
});
|
|
6578
|
+
}
|
|
6579
|
+
|
|
6580
|
+
protected processGetCalendarSettings(response: Response): Promise<CalendarSettingsDto> {
|
|
6581
|
+
const status = response.status;
|
|
6582
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6583
|
+
if (status === 200) {
|
|
6584
|
+
return response.text().then((_responseText) => {
|
|
6585
|
+
let result200: any = null;
|
|
6586
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6587
|
+
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
6588
|
+
return result200;
|
|
6589
|
+
});
|
|
6590
|
+
} else if (status !== 200 && status !== 204) {
|
|
6591
|
+
return response.text().then((_responseText) => {
|
|
6592
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6593
|
+
});
|
|
6594
|
+
}
|
|
6595
|
+
return Promise.resolve<CalendarSettingsDto>(null as any);
|
|
6596
|
+
}
|
|
6597
|
+
|
|
6598
|
+
updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto> {
|
|
6599
|
+
let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
|
|
6600
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6601
|
+
|
|
6602
|
+
const content_ = JSON.stringify(cmd);
|
|
6603
|
+
|
|
6604
|
+
let options_: RequestInit = {
|
|
6605
|
+
body: content_,
|
|
6606
|
+
method: "PUT",
|
|
6607
|
+
headers: {
|
|
6608
|
+
"Content-Type": "application/json",
|
|
6609
|
+
"Accept": "application/json"
|
|
6610
|
+
}
|
|
6611
|
+
};
|
|
6612
|
+
|
|
6613
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6614
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6615
|
+
}).then((_response: Response) => {
|
|
6616
|
+
return this.processUpdateCalendarSettings(_response);
|
|
6545
6617
|
});
|
|
6546
6618
|
}
|
|
6547
6619
|
|
|
6548
|
-
protected
|
|
6620
|
+
protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto> {
|
|
6549
6621
|
const status = response.status;
|
|
6550
6622
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6551
6623
|
if (status === 200) {
|
|
6552
6624
|
return response.text().then((_responseText) => {
|
|
6553
6625
|
let result200: any = null;
|
|
6554
6626
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6555
|
-
result200 =
|
|
6627
|
+
result200 = CalendarSettingsDto.fromJS(resultData200);
|
|
6556
6628
|
return result200;
|
|
6557
6629
|
});
|
|
6558
6630
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6560,7 +6632,7 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
|
|
|
6560
6632
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6561
6633
|
});
|
|
6562
6634
|
}
|
|
6563
|
-
return Promise.resolve<
|
|
6635
|
+
return Promise.resolve<CalendarSettingsDto>(null as any);
|
|
6564
6636
|
}
|
|
6565
6637
|
}
|
|
6566
6638
|
|
|
@@ -33921,11 +33993,12 @@ export interface IUpdateMachinesCapacity {
|
|
|
33921
33993
|
capacity?: MachineCapacitySettingsDto[] | null;
|
|
33922
33994
|
}
|
|
33923
33995
|
|
|
33924
|
-
export class
|
|
33996
|
+
export class CalendarDayDto implements ICalendarDayDto {
|
|
33925
33997
|
date?: Date;
|
|
33926
|
-
dayCapacity?:
|
|
33998
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
33999
|
+
capacityHours?: number;
|
|
33927
34000
|
|
|
33928
|
-
constructor(data?:
|
|
34001
|
+
constructor(data?: ICalendarDayDto) {
|
|
33929
34002
|
if (data) {
|
|
33930
34003
|
for (var property in data) {
|
|
33931
34004
|
if (data.hasOwnProperty(property))
|
|
@@ -33938,12 +34011,13 @@ export class CalenderCapacityDto implements ICalenderCapacityDto {
|
|
|
33938
34011
|
if (_data) {
|
|
33939
34012
|
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
33940
34013
|
this.dayCapacity = _data["dayCapacity"];
|
|
34014
|
+
this.capacityHours = _data["capacityHours"];
|
|
33941
34015
|
}
|
|
33942
34016
|
}
|
|
33943
34017
|
|
|
33944
|
-
static fromJS(data: any):
|
|
34018
|
+
static fromJS(data: any): CalendarDayDto {
|
|
33945
34019
|
data = typeof data === 'object' ? data : {};
|
|
33946
|
-
let result = new
|
|
34020
|
+
let result = new CalendarDayDto();
|
|
33947
34021
|
result.init(data);
|
|
33948
34022
|
return result;
|
|
33949
34023
|
}
|
|
@@ -33952,22 +34026,64 @@ export class CalenderCapacityDto implements ICalenderCapacityDto {
|
|
|
33952
34026
|
data = typeof data === 'object' ? data : {};
|
|
33953
34027
|
data["date"] = this.date ? this.date.toISOString() : <any>undefined;
|
|
33954
34028
|
data["dayCapacity"] = this.dayCapacity;
|
|
34029
|
+
data["capacityHours"] = this.capacityHours;
|
|
33955
34030
|
return data;
|
|
33956
34031
|
}
|
|
33957
34032
|
}
|
|
33958
34033
|
|
|
33959
|
-
export interface
|
|
34034
|
+
export interface ICalendarDayDto {
|
|
34035
|
+
date?: Date;
|
|
34036
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
34037
|
+
capacityHours?: number;
|
|
34038
|
+
}
|
|
34039
|
+
|
|
34040
|
+
export type CalendarDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
|
|
34041
|
+
|
|
34042
|
+
export class CalendarCapacityDto implements ICalendarCapacityDto {
|
|
33960
34043
|
date?: Date;
|
|
33961
|
-
dayCapacity?:
|
|
34044
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
34045
|
+
|
|
34046
|
+
constructor(data?: ICalendarCapacityDto) {
|
|
34047
|
+
if (data) {
|
|
34048
|
+
for (var property in data) {
|
|
34049
|
+
if (data.hasOwnProperty(property))
|
|
34050
|
+
(<any>this)[property] = (<any>data)[property];
|
|
34051
|
+
}
|
|
34052
|
+
}
|
|
34053
|
+
}
|
|
34054
|
+
|
|
34055
|
+
init(_data?: any) {
|
|
34056
|
+
if (_data) {
|
|
34057
|
+
this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
|
|
34058
|
+
this.dayCapacity = _data["dayCapacity"];
|
|
34059
|
+
}
|
|
34060
|
+
}
|
|
34061
|
+
|
|
34062
|
+
static fromJS(data: any): CalendarCapacityDto {
|
|
34063
|
+
data = typeof data === 'object' ? data : {};
|
|
34064
|
+
let result = new CalendarCapacityDto();
|
|
34065
|
+
result.init(data);
|
|
34066
|
+
return result;
|
|
34067
|
+
}
|
|
34068
|
+
|
|
34069
|
+
toJSON(data?: any) {
|
|
34070
|
+
data = typeof data === 'object' ? data : {};
|
|
34071
|
+
data["date"] = this.date ? this.date.toISOString() : <any>undefined;
|
|
34072
|
+
data["dayCapacity"] = this.dayCapacity;
|
|
34073
|
+
return data;
|
|
34074
|
+
}
|
|
33962
34075
|
}
|
|
33963
34076
|
|
|
33964
|
-
export
|
|
34077
|
+
export interface ICalendarCapacityDto {
|
|
34078
|
+
date?: Date;
|
|
34079
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
34080
|
+
}
|
|
33965
34081
|
|
|
33966
|
-
export class
|
|
34082
|
+
export class UpdateCalendarCapacity implements IUpdateCalendarCapacity {
|
|
33967
34083
|
date?: Date;
|
|
33968
|
-
dayCapacity?:
|
|
34084
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
33969
34085
|
|
|
33970
|
-
constructor(data?:
|
|
34086
|
+
constructor(data?: IUpdateCalendarCapacity) {
|
|
33971
34087
|
if (data) {
|
|
33972
34088
|
for (var property in data) {
|
|
33973
34089
|
if (data.hasOwnProperty(property))
|
|
@@ -33983,9 +34099,9 @@ export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
|
|
|
33983
34099
|
}
|
|
33984
34100
|
}
|
|
33985
34101
|
|
|
33986
|
-
static fromJS(data: any):
|
|
34102
|
+
static fromJS(data: any): UpdateCalendarCapacity {
|
|
33987
34103
|
data = typeof data === 'object' ? data : {};
|
|
33988
|
-
let result = new
|
|
34104
|
+
let result = new UpdateCalendarCapacity();
|
|
33989
34105
|
result.init(data);
|
|
33990
34106
|
return result;
|
|
33991
34107
|
}
|
|
@@ -33998,9 +34114,123 @@ export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
|
|
|
33998
34114
|
}
|
|
33999
34115
|
}
|
|
34000
34116
|
|
|
34001
|
-
export interface
|
|
34117
|
+
export interface IUpdateCalendarCapacity {
|
|
34002
34118
|
date?: Date;
|
|
34003
|
-
dayCapacity?:
|
|
34119
|
+
dayCapacity?: CalendarDayCapacityDto;
|
|
34120
|
+
}
|
|
34121
|
+
|
|
34122
|
+
export class CalendarSettingsDto implements ICalendarSettingsDto {
|
|
34123
|
+
defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
|
|
34124
|
+
halfDayHours?: number;
|
|
34125
|
+
holidayHours?: number;
|
|
34126
|
+
|
|
34127
|
+
constructor(data?: ICalendarSettingsDto) {
|
|
34128
|
+
if (data) {
|
|
34129
|
+
for (var property in data) {
|
|
34130
|
+
if (data.hasOwnProperty(property))
|
|
34131
|
+
(<any>this)[property] = (<any>data)[property];
|
|
34132
|
+
}
|
|
34133
|
+
}
|
|
34134
|
+
}
|
|
34135
|
+
|
|
34136
|
+
init(_data?: any) {
|
|
34137
|
+
if (_data) {
|
|
34138
|
+
if (_data["defaultHoursPerWeekday"]) {
|
|
34139
|
+
this.defaultHoursPerWeekday = {} as any;
|
|
34140
|
+
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
34141
|
+
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
34142
|
+
(<any>this.defaultHoursPerWeekday)![key] = _data["defaultHoursPerWeekday"][key];
|
|
34143
|
+
}
|
|
34144
|
+
}
|
|
34145
|
+
this.halfDayHours = _data["halfDayHours"];
|
|
34146
|
+
this.holidayHours = _data["holidayHours"];
|
|
34147
|
+
}
|
|
34148
|
+
}
|
|
34149
|
+
|
|
34150
|
+
static fromJS(data: any): CalendarSettingsDto {
|
|
34151
|
+
data = typeof data === 'object' ? data : {};
|
|
34152
|
+
let result = new CalendarSettingsDto();
|
|
34153
|
+
result.init(data);
|
|
34154
|
+
return result;
|
|
34155
|
+
}
|
|
34156
|
+
|
|
34157
|
+
toJSON(data?: any) {
|
|
34158
|
+
data = typeof data === 'object' ? data : {};
|
|
34159
|
+
if (this.defaultHoursPerWeekday) {
|
|
34160
|
+
data["defaultHoursPerWeekday"] = {};
|
|
34161
|
+
for (let key in this.defaultHoursPerWeekday) {
|
|
34162
|
+
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
34163
|
+
(<any>data["defaultHoursPerWeekday"])[key] = (<any>this.defaultHoursPerWeekday)[key];
|
|
34164
|
+
}
|
|
34165
|
+
}
|
|
34166
|
+
data["halfDayHours"] = this.halfDayHours;
|
|
34167
|
+
data["holidayHours"] = this.holidayHours;
|
|
34168
|
+
return data;
|
|
34169
|
+
}
|
|
34170
|
+
}
|
|
34171
|
+
|
|
34172
|
+
export interface ICalendarSettingsDto {
|
|
34173
|
+
defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
|
|
34174
|
+
halfDayHours?: number;
|
|
34175
|
+
holidayHours?: number;
|
|
34176
|
+
}
|
|
34177
|
+
|
|
34178
|
+
export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
34179
|
+
|
|
34180
|
+
export class UpdateCalendarSettingsCommand implements IUpdateCalendarSettingsCommand {
|
|
34181
|
+
defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
|
|
34182
|
+
halfDayHours?: number;
|
|
34183
|
+
holidayHours?: number;
|
|
34184
|
+
|
|
34185
|
+
constructor(data?: IUpdateCalendarSettingsCommand) {
|
|
34186
|
+
if (data) {
|
|
34187
|
+
for (var property in data) {
|
|
34188
|
+
if (data.hasOwnProperty(property))
|
|
34189
|
+
(<any>this)[property] = (<any>data)[property];
|
|
34190
|
+
}
|
|
34191
|
+
}
|
|
34192
|
+
}
|
|
34193
|
+
|
|
34194
|
+
init(_data?: any) {
|
|
34195
|
+
if (_data) {
|
|
34196
|
+
if (_data["defaultHoursPerWeekday"]) {
|
|
34197
|
+
this.defaultHoursPerWeekday = {} as any;
|
|
34198
|
+
for (let key in _data["defaultHoursPerWeekday"]) {
|
|
34199
|
+
if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
|
|
34200
|
+
(<any>this.defaultHoursPerWeekday)![key] = _data["defaultHoursPerWeekday"][key];
|
|
34201
|
+
}
|
|
34202
|
+
}
|
|
34203
|
+
this.halfDayHours = _data["halfDayHours"];
|
|
34204
|
+
this.holidayHours = _data["holidayHours"];
|
|
34205
|
+
}
|
|
34206
|
+
}
|
|
34207
|
+
|
|
34208
|
+
static fromJS(data: any): UpdateCalendarSettingsCommand {
|
|
34209
|
+
data = typeof data === 'object' ? data : {};
|
|
34210
|
+
let result = new UpdateCalendarSettingsCommand();
|
|
34211
|
+
result.init(data);
|
|
34212
|
+
return result;
|
|
34213
|
+
}
|
|
34214
|
+
|
|
34215
|
+
toJSON(data?: any) {
|
|
34216
|
+
data = typeof data === 'object' ? data : {};
|
|
34217
|
+
if (this.defaultHoursPerWeekday) {
|
|
34218
|
+
data["defaultHoursPerWeekday"] = {};
|
|
34219
|
+
for (let key in this.defaultHoursPerWeekday) {
|
|
34220
|
+
if (this.defaultHoursPerWeekday.hasOwnProperty(key))
|
|
34221
|
+
(<any>data["defaultHoursPerWeekday"])[key] = (<any>this.defaultHoursPerWeekday)[key];
|
|
34222
|
+
}
|
|
34223
|
+
}
|
|
34224
|
+
data["halfDayHours"] = this.halfDayHours;
|
|
34225
|
+
data["holidayHours"] = this.holidayHours;
|
|
34226
|
+
return data;
|
|
34227
|
+
}
|
|
34228
|
+
}
|
|
34229
|
+
|
|
34230
|
+
export interface IUpdateCalendarSettingsCommand {
|
|
34231
|
+
defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
|
|
34232
|
+
halfDayHours?: number;
|
|
34233
|
+
holidayHours?: number;
|
|
34004
34234
|
}
|
|
34005
34235
|
|
|
34006
34236
|
export class MachineKpiDto implements IMachineKpiDto {
|