@ignos/api-client 20250707.0.12091 → 20250708.0.12105

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.
@@ -176,6 +176,7 @@ export interface IMachineUtilizationClient {
176
176
  listMachineUptimesToday(request: ListMachineUptimesTodayRequest): Promise<MachineUptimesAggregateDto>;
177
177
  listPowerOnUtilizationDatapoints(id: number | null | undefined, externalId: string | null | undefined, nDays: number | null | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<PowerOnUtilizationList>;
178
178
  getFactoryUtilization(): Promise<PowerOnUtilizationDto>;
179
+ getProgramTimeline(id: string, startTime: Date | undefined, endTime: Date | undefined): Promise<ProgramDatapoint[]>;
179
180
  }
180
181
  export declare class MachineUtilizationClient extends AuthorizedApiBase implements IMachineUtilizationClient {
181
182
  private http;
@@ -217,6 +218,8 @@ export declare class MachineUtilizationClient extends AuthorizedApiBase implemen
217
218
  protected processListPowerOnUtilizationDatapoints(response: Response): Promise<PowerOnUtilizationList>;
218
219
  getFactoryUtilization(): Promise<PowerOnUtilizationDto>;
219
220
  protected processGetFactoryUtilization(response: Response): Promise<PowerOnUtilizationDto>;
221
+ getProgramTimeline(id: string, startTime: Date | undefined, endTime: Date | undefined): Promise<ProgramDatapoint[]>;
222
+ protected processGetProgramTimeline(response: Response): Promise<ProgramDatapoint[]>;
220
223
  }
221
224
  export interface IMeClient {
222
225
  getMyApps(): Promise<UserAppDto[]>;
@@ -390,8 +393,8 @@ export declare class PulseClient extends AuthorizedApiBase implements IPulseClie
390
393
  protected processUpdatePulseSettings(response: Response): Promise<PulseSettingsDto>;
391
394
  }
392
395
  export interface IUtilizationClient {
393
- getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CompanyUtilizationDto>;
394
- getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CrossCompanyUtilizationDto>;
396
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
397
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
395
398
  getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
396
399
  getCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDatapointListDto>;
397
400
  getCrossCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDatapointListDto>;
@@ -403,9 +406,9 @@ export declare class UtilizationClient extends AuthorizedApiBase implements IUti
403
406
  constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
404
407
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
405
408
  });
406
- getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CompanyUtilizationDto>;
409
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
407
410
  protected processGetCompanyUtilization(response: Response): Promise<CompanyUtilizationDto>;
408
- getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CrossCompanyUtilizationDto>;
411
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
409
412
  protected processGetCrossCompanyUtilization(response: Response): Promise<CrossCompanyUtilizationDto>;
410
413
  getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
411
414
  protected processGetUtilizationDatapoints(response: Response): Promise<MachineUtilizationDatapointListDto>;
@@ -787,8 +790,10 @@ export declare class DowntimeReasonsClient extends AuthorizedApiBase implements
787
790
  export interface IKpiAdminClient {
788
791
  getMachineCapacityAdmin(): Promise<MachineGroupCapacityDto[]>;
789
792
  updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
790
- getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]>;
791
- updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto>;
793
+ getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
794
+ updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
795
+ getCalendarSettings(): Promise<CalendarSettingsDto>;
796
+ updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
792
797
  }
793
798
  export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient {
794
799
  private http;
@@ -801,10 +806,14 @@ export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdm
801
806
  protected processGetMachineCapacityAdmin(response: Response): Promise<MachineGroupCapacityDto[]>;
802
807
  updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
803
808
  protected processUpdateMachineCapacityAdmin(response: Response): Promise<MachineCapacityDto>;
804
- getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]>;
805
- protected processGetCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto[]>;
806
- updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto>;
807
- protected processUpdateCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto>;
809
+ getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
810
+ protected processGetCalendarCapacityAdmin(response: Response): Promise<CalendarDayDto[]>;
811
+ updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
812
+ protected processUpdateCalendarCapacityAdmin(response: Response): Promise<CalendarCapacityDto>;
813
+ getCalendarSettings(): Promise<CalendarSettingsDto>;
814
+ protected processGetCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
815
+ updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
816
+ protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
808
817
  }
809
818
  export interface IKpiClient {
810
819
  getMachineKpi(machineExternalId: string | undefined, previousPeriodStartDate: Date | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto>;
@@ -3106,6 +3115,18 @@ export interface INumericNullableValueWithTimestamp {
3106
3115
  timestamp?: number;
3107
3116
  value?: number | null;
3108
3117
  }
3118
+ export declare class ProgramDatapoint implements IProgramDatapoint {
3119
+ timestamp?: number;
3120
+ programValue?: string;
3121
+ constructor(data?: IProgramDatapoint);
3122
+ init(_data?: any): void;
3123
+ static fromJS(data: any): ProgramDatapoint;
3124
+ toJSON(data?: any): any;
3125
+ }
3126
+ export interface IProgramDatapoint {
3127
+ timestamp?: number;
3128
+ programValue?: string;
3129
+ }
3109
3130
  export declare class UserAppDto implements IUserAppDto {
3110
3131
  key: string;
3111
3132
  name: string;
@@ -5861,30 +5882,81 @@ export interface IUpdateMachinesCapacity {
5861
5882
  utilizationPercent?: number | null;
5862
5883
  capacity?: MachineCapacitySettingsDto[] | null;
5863
5884
  }
5864
- export declare class CalenderCapacityDto implements ICalenderCapacityDto {
5885
+ export declare class CalendarDayDto implements ICalendarDayDto {
5886
+ date?: Date;
5887
+ dayCapacity?: CalendarDayCapacityDto;
5888
+ capacityHours?: number;
5889
+ constructor(data?: ICalendarDayDto);
5890
+ init(_data?: any): void;
5891
+ static fromJS(data: any): CalendarDayDto;
5892
+ toJSON(data?: any): any;
5893
+ }
5894
+ export interface ICalendarDayDto {
5895
+ date?: Date;
5896
+ dayCapacity?: CalendarDayCapacityDto;
5897
+ capacityHours?: number;
5898
+ }
5899
+ export type CalendarDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
5900
+ export declare class CalendarCapacityDto implements ICalendarCapacityDto {
5865
5901
  date?: Date;
5866
- dayCapacity?: CalenderDayCapacityDto;
5867
- constructor(data?: ICalenderCapacityDto);
5902
+ dayCapacity?: CalendarDayCapacityDto;
5903
+ constructor(data?: ICalendarCapacityDto);
5868
5904
  init(_data?: any): void;
5869
- static fromJS(data: any): CalenderCapacityDto;
5905
+ static fromJS(data: any): CalendarCapacityDto;
5870
5906
  toJSON(data?: any): any;
5871
5907
  }
5872
- export interface ICalenderCapacityDto {
5908
+ export interface ICalendarCapacityDto {
5873
5909
  date?: Date;
5874
- dayCapacity?: CalenderDayCapacityDto;
5910
+ dayCapacity?: CalendarDayCapacityDto;
5875
5911
  }
5876
- export type CalenderDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
5877
- export declare class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
5912
+ export declare class UpdateCalendarCapacity implements IUpdateCalendarCapacity {
5878
5913
  date?: Date;
5879
- dayCapacity?: CalenderDayCapacityDto;
5880
- constructor(data?: IUpdateCalenderCapacity);
5914
+ dayCapacity?: CalendarDayCapacityDto;
5915
+ constructor(data?: IUpdateCalendarCapacity);
5881
5916
  init(_data?: any): void;
5882
- static fromJS(data: any): UpdateCalenderCapacity;
5917
+ static fromJS(data: any): UpdateCalendarCapacity;
5883
5918
  toJSON(data?: any): any;
5884
5919
  }
5885
- export interface IUpdateCalenderCapacity {
5920
+ export interface IUpdateCalendarCapacity {
5886
5921
  date?: Date;
5887
- dayCapacity?: CalenderDayCapacityDto;
5922
+ dayCapacity?: CalendarDayCapacityDto;
5923
+ }
5924
+ export declare class CalendarSettingsDto implements ICalendarSettingsDto {
5925
+ defaultHoursPerWeekday?: {
5926
+ [key in DayOfWeek]?: number;
5927
+ };
5928
+ halfDayHours?: number;
5929
+ holidayHours?: number;
5930
+ constructor(data?: ICalendarSettingsDto);
5931
+ init(_data?: any): void;
5932
+ static fromJS(data: any): CalendarSettingsDto;
5933
+ toJSON(data?: any): any;
5934
+ }
5935
+ export interface ICalendarSettingsDto {
5936
+ defaultHoursPerWeekday?: {
5937
+ [key in DayOfWeek]?: number;
5938
+ };
5939
+ halfDayHours?: number;
5940
+ holidayHours?: number;
5941
+ }
5942
+ export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
5943
+ export declare class UpdateCalendarSettingsCommand implements IUpdateCalendarSettingsCommand {
5944
+ defaultHoursPerWeekday?: {
5945
+ [key in DayOfWeek]?: number;
5946
+ };
5947
+ halfDayHours?: number;
5948
+ holidayHours?: number;
5949
+ constructor(data?: IUpdateCalendarSettingsCommand);
5950
+ init(_data?: any): void;
5951
+ static fromJS(data: any): UpdateCalendarSettingsCommand;
5952
+ toJSON(data?: any): any;
5953
+ }
5954
+ export interface IUpdateCalendarSettingsCommand {
5955
+ defaultHoursPerWeekday?: {
5956
+ [key in DayOfWeek]?: number;
5957
+ };
5958
+ halfDayHours?: number;
5959
+ holidayHours?: number;
5888
5960
  }
5889
5961
  export declare class MachineKpiDto implements IMachineKpiDto {
5890
5962
  uptimeToNow: number;
@@ -970,6 +970,58 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
970
970
  }
971
971
  return Promise.resolve(null);
972
972
  }
973
+ getProgramTimeline(id, startTime, endTime) {
974
+ let url_ = this.baseUrl + "/machineutilization/{id}/program-timeline?";
975
+ if (id === undefined || id === null)
976
+ throw new Error("The parameter 'id' must be defined.");
977
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
978
+ if (startTime === null)
979
+ throw new Error("The parameter 'startTime' cannot be null.");
980
+ else if (startTime !== undefined)
981
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
982
+ if (endTime === null)
983
+ throw new Error("The parameter 'endTime' cannot be null.");
984
+ else if (endTime !== undefined)
985
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
986
+ url_ = url_.replace(/[?&]$/, "");
987
+ let options_ = {
988
+ method: "GET",
989
+ headers: {
990
+ "Accept": "application/json"
991
+ }
992
+ };
993
+ return this.transformOptions(options_).then(transformedOptions_ => {
994
+ return this.http.fetch(url_, transformedOptions_);
995
+ }).then((_response) => {
996
+ return this.processGetProgramTimeline(_response);
997
+ });
998
+ }
999
+ processGetProgramTimeline(response) {
1000
+ const status = response.status;
1001
+ let _headers = {};
1002
+ if (response.headers && response.headers.forEach) {
1003
+ response.headers.forEach((v, k) => _headers[k] = v);
1004
+ }
1005
+ ;
1006
+ if (status === 200) {
1007
+ return response.text().then((_responseText) => {
1008
+ let result200 = null;
1009
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1010
+ if (Array.isArray(resultData200)) {
1011
+ result200 = [];
1012
+ for (let item of resultData200)
1013
+ result200.push(ProgramDatapoint.fromJS(item));
1014
+ }
1015
+ return result200;
1016
+ });
1017
+ }
1018
+ else if (status !== 200 && status !== 204) {
1019
+ return response.text().then((_responseText) => {
1020
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1021
+ });
1022
+ }
1023
+ return Promise.resolve(null);
1024
+ }
973
1025
  }
974
1026
  export class MeClient extends AuthorizedApiBase {
975
1027
  constructor(configuration, baseUrl, http) {
@@ -2169,7 +2221,7 @@ export class UtilizationClient extends AuthorizedApiBase {
2169
2221
  this.http = http ? http : window;
2170
2222
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
2171
2223
  }
2172
- getCompanyUtilization(utilizationType, startTime, endTime, dataPointCount) {
2224
+ getCompanyUtilization(utilizationType, startTime, endTime) {
2173
2225
  let url_ = this.baseUrl + "/utilization?";
2174
2226
  if (utilizationType === null)
2175
2227
  throw new Error("The parameter 'utilizationType' cannot be null.");
@@ -2179,10 +2231,6 @@ export class UtilizationClient extends AuthorizedApiBase {
2179
2231
  url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2180
2232
  if (endTime !== undefined && endTime !== null)
2181
2233
  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
2234
  url_ = url_.replace(/[?&]$/, "");
2187
2235
  let options_ = {
2188
2236
  method: "GET",
@@ -2218,7 +2266,7 @@ export class UtilizationClient extends AuthorizedApiBase {
2218
2266
  }
2219
2267
  return Promise.resolve(null);
2220
2268
  }
2221
- getCrossCompanyUtilization(utilizationType, startTime, endTime, dataPointCount) {
2269
+ getCrossCompanyUtilization(utilizationType, startTime, endTime) {
2222
2270
  let url_ = this.baseUrl + "/utilization/cross-company?";
2223
2271
  if (utilizationType === null)
2224
2272
  throw new Error("The parameter 'utilizationType' cannot be null.");
@@ -2228,10 +2276,6 @@ export class UtilizationClient extends AuthorizedApiBase {
2228
2276
  url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2229
2277
  if (endTime !== undefined && endTime !== null)
2230
2278
  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
2279
  url_ = url_.replace(/[?&]$/, "");
2236
2280
  let options_ = {
2237
2281
  method: "GET",
@@ -6026,8 +6070,8 @@ export class KpiAdminClient extends AuthorizedApiBase {
6026
6070
  }
6027
6071
  return Promise.resolve(null);
6028
6072
  }
6029
- getCalenderCapacityAdmin(startDate, endDate) {
6030
- let url_ = this.baseUrl + "/kpiadmin/calender?";
6073
+ getCalendarCapacityAdmin(startDate, endDate) {
6074
+ let url_ = this.baseUrl + "/kpiadmin/calendar?";
6031
6075
  if (startDate === null)
6032
6076
  throw new Error("The parameter 'startDate' cannot be null.");
6033
6077
  else if (startDate !== undefined)
@@ -6046,10 +6090,10 @@ export class KpiAdminClient extends AuthorizedApiBase {
6046
6090
  return this.transformOptions(options_).then(transformedOptions_ => {
6047
6091
  return this.http.fetch(url_, transformedOptions_);
6048
6092
  }).then((_response) => {
6049
- return this.processGetCalenderCapacityAdmin(_response);
6093
+ return this.processGetCalendarCapacityAdmin(_response);
6050
6094
  });
6051
6095
  }
6052
- processGetCalenderCapacityAdmin(response) {
6096
+ processGetCalendarCapacityAdmin(response) {
6053
6097
  const status = response.status;
6054
6098
  let _headers = {};
6055
6099
  if (response.headers && response.headers.forEach) {
@@ -6063,7 +6107,7 @@ export class KpiAdminClient extends AuthorizedApiBase {
6063
6107
  if (Array.isArray(resultData200)) {
6064
6108
  result200 = [];
6065
6109
  for (let item of resultData200)
6066
- result200.push(CalenderCapacityDto.fromJS(item));
6110
+ result200.push(CalendarDayDto.fromJS(item));
6067
6111
  }
6068
6112
  return result200;
6069
6113
  });
@@ -6075,8 +6119,8 @@ export class KpiAdminClient extends AuthorizedApiBase {
6075
6119
  }
6076
6120
  return Promise.resolve(null);
6077
6121
  }
6078
- updateCalenderCapacityAdmin(request) {
6079
- let url_ = this.baseUrl + "/kpiadmin/calender";
6122
+ updateCalendarCapacityAdmin(request) {
6123
+ let url_ = this.baseUrl + "/kpiadmin/calendar";
6080
6124
  url_ = url_.replace(/[?&]$/, "");
6081
6125
  const content_ = JSON.stringify(request);
6082
6126
  let options_ = {
@@ -6090,10 +6134,47 @@ export class KpiAdminClient extends AuthorizedApiBase {
6090
6134
  return this.transformOptions(options_).then(transformedOptions_ => {
6091
6135
  return this.http.fetch(url_, transformedOptions_);
6092
6136
  }).then((_response) => {
6093
- return this.processUpdateCalenderCapacityAdmin(_response);
6137
+ return this.processUpdateCalendarCapacityAdmin(_response);
6138
+ });
6139
+ }
6140
+ processUpdateCalendarCapacityAdmin(response) {
6141
+ const status = response.status;
6142
+ let _headers = {};
6143
+ if (response.headers && response.headers.forEach) {
6144
+ response.headers.forEach((v, k) => _headers[k] = v);
6145
+ }
6146
+ ;
6147
+ if (status === 200) {
6148
+ return response.text().then((_responseText) => {
6149
+ let result200 = null;
6150
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6151
+ result200 = CalendarCapacityDto.fromJS(resultData200);
6152
+ return result200;
6153
+ });
6154
+ }
6155
+ else if (status !== 200 && status !== 204) {
6156
+ return response.text().then((_responseText) => {
6157
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6158
+ });
6159
+ }
6160
+ return Promise.resolve(null);
6161
+ }
6162
+ getCalendarSettings() {
6163
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
6164
+ url_ = url_.replace(/[?&]$/, "");
6165
+ let options_ = {
6166
+ method: "GET",
6167
+ headers: {
6168
+ "Accept": "application/json"
6169
+ }
6170
+ };
6171
+ return this.transformOptions(options_).then(transformedOptions_ => {
6172
+ return this.http.fetch(url_, transformedOptions_);
6173
+ }).then((_response) => {
6174
+ return this.processGetCalendarSettings(_response);
6094
6175
  });
6095
6176
  }
6096
- processUpdateCalenderCapacityAdmin(response) {
6177
+ processGetCalendarSettings(response) {
6097
6178
  const status = response.status;
6098
6179
  let _headers = {};
6099
6180
  if (response.headers && response.headers.forEach) {
@@ -6104,7 +6185,47 @@ export class KpiAdminClient extends AuthorizedApiBase {
6104
6185
  return response.text().then((_responseText) => {
6105
6186
  let result200 = null;
6106
6187
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6107
- result200 = CalenderCapacityDto.fromJS(resultData200);
6188
+ result200 = CalendarSettingsDto.fromJS(resultData200);
6189
+ return result200;
6190
+ });
6191
+ }
6192
+ else if (status !== 200 && status !== 204) {
6193
+ return response.text().then((_responseText) => {
6194
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6195
+ });
6196
+ }
6197
+ return Promise.resolve(null);
6198
+ }
6199
+ updateCalendarSettings(cmd) {
6200
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
6201
+ url_ = url_.replace(/[?&]$/, "");
6202
+ const content_ = JSON.stringify(cmd);
6203
+ let options_ = {
6204
+ body: content_,
6205
+ method: "PUT",
6206
+ headers: {
6207
+ "Content-Type": "application/json",
6208
+ "Accept": "application/json"
6209
+ }
6210
+ };
6211
+ return this.transformOptions(options_).then(transformedOptions_ => {
6212
+ return this.http.fetch(url_, transformedOptions_);
6213
+ }).then((_response) => {
6214
+ return this.processUpdateCalendarSettings(_response);
6215
+ });
6216
+ }
6217
+ processUpdateCalendarSettings(response) {
6218
+ const status = response.status;
6219
+ let _headers = {};
6220
+ if (response.headers && response.headers.forEach) {
6221
+ response.headers.forEach((v, k) => _headers[k] = v);
6222
+ }
6223
+ ;
6224
+ if (status === 200) {
6225
+ return response.text().then((_responseText) => {
6226
+ let result200 = null;
6227
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6228
+ result200 = CalendarSettingsDto.fromJS(resultData200);
6108
6229
  return result200;
6109
6230
  });
6110
6231
  }
@@ -23349,6 +23470,34 @@ export class NumericNullableValueWithTimestamp {
23349
23470
  return data;
23350
23471
  }
23351
23472
  }
23473
+ export class ProgramDatapoint {
23474
+ constructor(data) {
23475
+ if (data) {
23476
+ for (var property in data) {
23477
+ if (data.hasOwnProperty(property))
23478
+ this[property] = data[property];
23479
+ }
23480
+ }
23481
+ }
23482
+ init(_data) {
23483
+ if (_data) {
23484
+ this.timestamp = _data["timestamp"];
23485
+ this.programValue = _data["programValue"];
23486
+ }
23487
+ }
23488
+ static fromJS(data) {
23489
+ data = typeof data === 'object' ? data : {};
23490
+ let result = new ProgramDatapoint();
23491
+ result.init(data);
23492
+ return result;
23493
+ }
23494
+ toJSON(data) {
23495
+ data = typeof data === 'object' ? data : {};
23496
+ data["timestamp"] = this.timestamp;
23497
+ data["programValue"] = this.programValue;
23498
+ return data;
23499
+ }
23500
+ }
23352
23501
  export class UserAppDto {
23353
23502
  constructor(data) {
23354
23503
  if (data) {
@@ -29240,7 +29389,7 @@ export class UpdateMachinesCapacity {
29240
29389
  return data;
29241
29390
  }
29242
29391
  }
29243
- export class CalenderCapacityDto {
29392
+ export class CalendarDayDto {
29244
29393
  constructor(data) {
29245
29394
  if (data) {
29246
29395
  for (var property in data) {
@@ -29253,11 +29402,12 @@ export class CalenderCapacityDto {
29253
29402
  if (_data) {
29254
29403
  this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
29255
29404
  this.dayCapacity = _data["dayCapacity"];
29405
+ this.capacityHours = _data["capacityHours"];
29256
29406
  }
29257
29407
  }
29258
29408
  static fromJS(data) {
29259
29409
  data = typeof data === 'object' ? data : {};
29260
- let result = new CalenderCapacityDto();
29410
+ let result = new CalendarDayDto();
29261
29411
  result.init(data);
29262
29412
  return result;
29263
29413
  }
@@ -29265,10 +29415,11 @@ export class CalenderCapacityDto {
29265
29415
  data = typeof data === 'object' ? data : {};
29266
29416
  data["date"] = this.date ? this.date.toISOString() : undefined;
29267
29417
  data["dayCapacity"] = this.dayCapacity;
29418
+ data["capacityHours"] = this.capacityHours;
29268
29419
  return data;
29269
29420
  }
29270
29421
  }
29271
- export class UpdateCalenderCapacity {
29422
+ export class CalendarCapacityDto {
29272
29423
  constructor(data) {
29273
29424
  if (data) {
29274
29425
  for (var property in data) {
@@ -29285,7 +29436,7 @@ export class UpdateCalenderCapacity {
29285
29436
  }
29286
29437
  static fromJS(data) {
29287
29438
  data = typeof data === 'object' ? data : {};
29288
- let result = new UpdateCalenderCapacity();
29439
+ let result = new CalendarCapacityDto();
29289
29440
  result.init(data);
29290
29441
  return result;
29291
29442
  }
@@ -29296,6 +29447,118 @@ export class UpdateCalenderCapacity {
29296
29447
  return data;
29297
29448
  }
29298
29449
  }
29450
+ export class UpdateCalendarCapacity {
29451
+ constructor(data) {
29452
+ if (data) {
29453
+ for (var property in data) {
29454
+ if (data.hasOwnProperty(property))
29455
+ this[property] = data[property];
29456
+ }
29457
+ }
29458
+ }
29459
+ init(_data) {
29460
+ if (_data) {
29461
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
29462
+ this.dayCapacity = _data["dayCapacity"];
29463
+ }
29464
+ }
29465
+ static fromJS(data) {
29466
+ data = typeof data === 'object' ? data : {};
29467
+ let result = new UpdateCalendarCapacity();
29468
+ result.init(data);
29469
+ return result;
29470
+ }
29471
+ toJSON(data) {
29472
+ data = typeof data === 'object' ? data : {};
29473
+ data["date"] = this.date ? this.date.toISOString() : undefined;
29474
+ data["dayCapacity"] = this.dayCapacity;
29475
+ return data;
29476
+ }
29477
+ }
29478
+ export class CalendarSettingsDto {
29479
+ constructor(data) {
29480
+ if (data) {
29481
+ for (var property in data) {
29482
+ if (data.hasOwnProperty(property))
29483
+ this[property] = data[property];
29484
+ }
29485
+ }
29486
+ }
29487
+ init(_data) {
29488
+ if (_data) {
29489
+ if (_data["defaultHoursPerWeekday"]) {
29490
+ this.defaultHoursPerWeekday = {};
29491
+ for (let key in _data["defaultHoursPerWeekday"]) {
29492
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
29493
+ this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
29494
+ }
29495
+ }
29496
+ this.halfDayHours = _data["halfDayHours"];
29497
+ this.holidayHours = _data["holidayHours"];
29498
+ }
29499
+ }
29500
+ static fromJS(data) {
29501
+ data = typeof data === 'object' ? data : {};
29502
+ let result = new CalendarSettingsDto();
29503
+ result.init(data);
29504
+ return result;
29505
+ }
29506
+ toJSON(data) {
29507
+ data = typeof data === 'object' ? data : {};
29508
+ if (this.defaultHoursPerWeekday) {
29509
+ data["defaultHoursPerWeekday"] = {};
29510
+ for (let key in this.defaultHoursPerWeekday) {
29511
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
29512
+ data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
29513
+ }
29514
+ }
29515
+ data["halfDayHours"] = this.halfDayHours;
29516
+ data["holidayHours"] = this.holidayHours;
29517
+ return data;
29518
+ }
29519
+ }
29520
+ export class UpdateCalendarSettingsCommand {
29521
+ constructor(data) {
29522
+ if (data) {
29523
+ for (var property in data) {
29524
+ if (data.hasOwnProperty(property))
29525
+ this[property] = data[property];
29526
+ }
29527
+ }
29528
+ }
29529
+ init(_data) {
29530
+ if (_data) {
29531
+ if (_data["defaultHoursPerWeekday"]) {
29532
+ this.defaultHoursPerWeekday = {};
29533
+ for (let key in _data["defaultHoursPerWeekday"]) {
29534
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
29535
+ this.defaultHoursPerWeekday[key] = _data["defaultHoursPerWeekday"][key];
29536
+ }
29537
+ }
29538
+ this.halfDayHours = _data["halfDayHours"];
29539
+ this.holidayHours = _data["holidayHours"];
29540
+ }
29541
+ }
29542
+ static fromJS(data) {
29543
+ data = typeof data === 'object' ? data : {};
29544
+ let result = new UpdateCalendarSettingsCommand();
29545
+ result.init(data);
29546
+ return result;
29547
+ }
29548
+ toJSON(data) {
29549
+ data = typeof data === 'object' ? data : {};
29550
+ if (this.defaultHoursPerWeekday) {
29551
+ data["defaultHoursPerWeekday"] = {};
29552
+ for (let key in this.defaultHoursPerWeekday) {
29553
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
29554
+ data["defaultHoursPerWeekday"][key] = this.defaultHoursPerWeekday[key];
29555
+ }
29556
+ }
29557
+ data["halfDayHours"] = this.halfDayHours;
29558
+ data["holidayHours"] = this.holidayHours;
29559
+ return data;
29560
+ }
29561
+ }
29299
29562
  export class MachineKpiDto {
29300
29563
  constructor(data) {
29301
29564
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250707.0.12091",
3
+ "version": "20250708.0.12105",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -716,6 +716,8 @@ export interface IMachineUtilizationClient {
716
716
  listPowerOnUtilizationDatapoints(id: number | null | undefined, externalId: string | null | undefined, nDays: number | null | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<PowerOnUtilizationList>;
717
717
 
718
718
  getFactoryUtilization(): Promise<PowerOnUtilizationDto>;
719
+
720
+ getProgramTimeline(id: string, startTime: Date | undefined, endTime: Date | undefined): Promise<ProgramDatapoint[]>;
719
721
  }
720
722
 
721
723
  export class MachineUtilizationClient extends AuthorizedApiBase implements IMachineUtilizationClient {
@@ -1091,6 +1093,57 @@ export class MachineUtilizationClient extends AuthorizedApiBase implements IMach
1091
1093
  }
1092
1094
  return Promise.resolve<PowerOnUtilizationDto>(null as any);
1093
1095
  }
1096
+
1097
+ getProgramTimeline(id: string, startTime: Date | undefined, endTime: Date | undefined): Promise<ProgramDatapoint[]> {
1098
+ let url_ = this.baseUrl + "/machineutilization/{id}/program-timeline?";
1099
+ if (id === undefined || id === null)
1100
+ throw new Error("The parameter 'id' must be defined.");
1101
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
1102
+ if (startTime === null)
1103
+ throw new Error("The parameter 'startTime' cannot be null.");
1104
+ else if (startTime !== undefined)
1105
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
1106
+ if (endTime === null)
1107
+ throw new Error("The parameter 'endTime' cannot be null.");
1108
+ else if (endTime !== undefined)
1109
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
1110
+ url_ = url_.replace(/[?&]$/, "");
1111
+
1112
+ let options_: RequestInit = {
1113
+ method: "GET",
1114
+ headers: {
1115
+ "Accept": "application/json"
1116
+ }
1117
+ };
1118
+
1119
+ return this.transformOptions(options_).then(transformedOptions_ => {
1120
+ return this.http.fetch(url_, transformedOptions_);
1121
+ }).then((_response: Response) => {
1122
+ return this.processGetProgramTimeline(_response);
1123
+ });
1124
+ }
1125
+
1126
+ protected processGetProgramTimeline(response: Response): Promise<ProgramDatapoint[]> {
1127
+ const status = response.status;
1128
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
1129
+ if (status === 200) {
1130
+ return response.text().then((_responseText) => {
1131
+ let result200: any = null;
1132
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
1133
+ if (Array.isArray(resultData200)) {
1134
+ result200 = [] as any;
1135
+ for (let item of resultData200)
1136
+ result200!.push(ProgramDatapoint.fromJS(item));
1137
+ }
1138
+ return result200;
1139
+ });
1140
+ } else if (status !== 200 && status !== 204) {
1141
+ return response.text().then((_responseText) => {
1142
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1143
+ });
1144
+ }
1145
+ return Promise.resolve<ProgramDatapoint[]>(null as any);
1146
+ }
1094
1147
  }
1095
1148
 
1096
1149
  export interface IMeClient {
@@ -2387,9 +2440,9 @@ export class PulseClient extends AuthorizedApiBase implements IPulseClient {
2387
2440
 
2388
2441
  export interface IUtilizationClient {
2389
2442
 
2390
- getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CompanyUtilizationDto>;
2443
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
2391
2444
 
2392
- getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CrossCompanyUtilizationDto>;
2445
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
2393
2446
 
2394
2447
  getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
2395
2448
 
@@ -2409,7 +2462,7 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
2409
2462
  this.baseUrl = baseUrl ?? "";
2410
2463
  }
2411
2464
 
2412
- getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CompanyUtilizationDto> {
2465
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto> {
2413
2466
  let url_ = this.baseUrl + "/utilization?";
2414
2467
  if (utilizationType === null)
2415
2468
  throw new Error("The parameter 'utilizationType' cannot be null.");
@@ -2419,10 +2472,6 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
2419
2472
  url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2420
2473
  if (endTime !== undefined && endTime !== null)
2421
2474
  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
2475
  url_ = url_.replace(/[?&]$/, "");
2427
2476
 
2428
2477
  let options_: RequestInit = {
@@ -2457,7 +2506,7 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
2457
2506
  return Promise.resolve<CompanyUtilizationDto>(null as any);
2458
2507
  }
2459
2508
 
2460
- getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, dataPointCount: number | undefined): Promise<CrossCompanyUtilizationDto> {
2509
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto> {
2461
2510
  let url_ = this.baseUrl + "/utilization/cross-company?";
2462
2511
  if (utilizationType === null)
2463
2512
  throw new Error("The parameter 'utilizationType' cannot be null.");
@@ -2467,10 +2516,6 @@ export class UtilizationClient extends AuthorizedApiBase implements IUtilization
2467
2516
  url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2468
2517
  if (endTime !== undefined && endTime !== null)
2469
2518
  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
2519
  url_ = url_.replace(/[?&]$/, "");
2475
2520
 
2476
2521
  let options_: RequestInit = {
@@ -6379,9 +6424,13 @@ export interface IKpiAdminClient {
6379
6424
 
6380
6425
  updateMachineCapacityAdmin(request: UpdateMachinesCapacity): Promise<MachineCapacityDto>;
6381
6426
 
6382
- getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]>;
6427
+ getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]>;
6428
+
6429
+ updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto>;
6430
+
6431
+ getCalendarSettings(): Promise<CalendarSettingsDto>;
6383
6432
 
6384
- updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto>;
6433
+ updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto>;
6385
6434
  }
6386
6435
 
6387
6436
  export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient {
@@ -6475,8 +6524,8 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6475
6524
  return Promise.resolve<MachineCapacityDto>(null as any);
6476
6525
  }
6477
6526
 
6478
- getCalenderCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalenderCapacityDto[]> {
6479
- let url_ = this.baseUrl + "/kpiadmin/calender?";
6527
+ getCalendarCapacityAdmin(startDate: Date | undefined, endDate: Date | undefined): Promise<CalendarDayDto[]> {
6528
+ let url_ = this.baseUrl + "/kpiadmin/calendar?";
6480
6529
  if (startDate === null)
6481
6530
  throw new Error("The parameter 'startDate' cannot be null.");
6482
6531
  else if (startDate !== undefined)
@@ -6497,11 +6546,11 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6497
6546
  return this.transformOptions(options_).then(transformedOptions_ => {
6498
6547
  return this.http.fetch(url_, transformedOptions_);
6499
6548
  }).then((_response: Response) => {
6500
- return this.processGetCalenderCapacityAdmin(_response);
6549
+ return this.processGetCalendarCapacityAdmin(_response);
6501
6550
  });
6502
6551
  }
6503
6552
 
6504
- protected processGetCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto[]> {
6553
+ protected processGetCalendarCapacityAdmin(response: Response): Promise<CalendarDayDto[]> {
6505
6554
  const status = response.status;
6506
6555
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6507
6556
  if (status === 200) {
@@ -6511,7 +6560,7 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6511
6560
  if (Array.isArray(resultData200)) {
6512
6561
  result200 = [] as any;
6513
6562
  for (let item of resultData200)
6514
- result200!.push(CalenderCapacityDto.fromJS(item));
6563
+ result200!.push(CalendarDayDto.fromJS(item));
6515
6564
  }
6516
6565
  return result200;
6517
6566
  });
@@ -6520,11 +6569,11 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6520
6569
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6521
6570
  });
6522
6571
  }
6523
- return Promise.resolve<CalenderCapacityDto[]>(null as any);
6572
+ return Promise.resolve<CalendarDayDto[]>(null as any);
6524
6573
  }
6525
6574
 
6526
- updateCalenderCapacityAdmin(request: UpdateCalenderCapacity): Promise<CalenderCapacityDto> {
6527
- let url_ = this.baseUrl + "/kpiadmin/calender";
6575
+ updateCalendarCapacityAdmin(request: UpdateCalendarCapacity): Promise<CalendarCapacityDto> {
6576
+ let url_ = this.baseUrl + "/kpiadmin/calendar";
6528
6577
  url_ = url_.replace(/[?&]$/, "");
6529
6578
 
6530
6579
  const content_ = JSON.stringify(request);
@@ -6541,18 +6590,18 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6541
6590
  return this.transformOptions(options_).then(transformedOptions_ => {
6542
6591
  return this.http.fetch(url_, transformedOptions_);
6543
6592
  }).then((_response: Response) => {
6544
- return this.processUpdateCalenderCapacityAdmin(_response);
6593
+ return this.processUpdateCalendarCapacityAdmin(_response);
6545
6594
  });
6546
6595
  }
6547
6596
 
6548
- protected processUpdateCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto> {
6597
+ protected processUpdateCalendarCapacityAdmin(response: Response): Promise<CalendarCapacityDto> {
6549
6598
  const status = response.status;
6550
6599
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6551
6600
  if (status === 200) {
6552
6601
  return response.text().then((_responseText) => {
6553
6602
  let result200: any = null;
6554
6603
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6555
- result200 = CalenderCapacityDto.fromJS(resultData200);
6604
+ result200 = CalendarCapacityDto.fromJS(resultData200);
6556
6605
  return result200;
6557
6606
  });
6558
6607
  } else if (status !== 200 && status !== 204) {
@@ -6560,7 +6609,83 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6560
6609
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6561
6610
  });
6562
6611
  }
6563
- return Promise.resolve<CalenderCapacityDto>(null as any);
6612
+ return Promise.resolve<CalendarCapacityDto>(null as any);
6613
+ }
6614
+
6615
+ getCalendarSettings(): Promise<CalendarSettingsDto> {
6616
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
6617
+ url_ = url_.replace(/[?&]$/, "");
6618
+
6619
+ let options_: RequestInit = {
6620
+ method: "GET",
6621
+ headers: {
6622
+ "Accept": "application/json"
6623
+ }
6624
+ };
6625
+
6626
+ return this.transformOptions(options_).then(transformedOptions_ => {
6627
+ return this.http.fetch(url_, transformedOptions_);
6628
+ }).then((_response: Response) => {
6629
+ return this.processGetCalendarSettings(_response);
6630
+ });
6631
+ }
6632
+
6633
+ protected processGetCalendarSettings(response: Response): Promise<CalendarSettingsDto> {
6634
+ const status = response.status;
6635
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6636
+ if (status === 200) {
6637
+ return response.text().then((_responseText) => {
6638
+ let result200: any = null;
6639
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6640
+ result200 = CalendarSettingsDto.fromJS(resultData200);
6641
+ return result200;
6642
+ });
6643
+ } else if (status !== 200 && status !== 204) {
6644
+ return response.text().then((_responseText) => {
6645
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6646
+ });
6647
+ }
6648
+ return Promise.resolve<CalendarSettingsDto>(null as any);
6649
+ }
6650
+
6651
+ updateCalendarSettings(cmd: UpdateCalendarSettingsCommand): Promise<CalendarSettingsDto> {
6652
+ let url_ = this.baseUrl + "/kpiadmin/calendar/settings";
6653
+ url_ = url_.replace(/[?&]$/, "");
6654
+
6655
+ const content_ = JSON.stringify(cmd);
6656
+
6657
+ let options_: RequestInit = {
6658
+ body: content_,
6659
+ method: "PUT",
6660
+ headers: {
6661
+ "Content-Type": "application/json",
6662
+ "Accept": "application/json"
6663
+ }
6664
+ };
6665
+
6666
+ return this.transformOptions(options_).then(transformedOptions_ => {
6667
+ return this.http.fetch(url_, transformedOptions_);
6668
+ }).then((_response: Response) => {
6669
+ return this.processUpdateCalendarSettings(_response);
6670
+ });
6671
+ }
6672
+
6673
+ protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto> {
6674
+ const status = response.status;
6675
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6676
+ if (status === 200) {
6677
+ return response.text().then((_responseText) => {
6678
+ let result200: any = null;
6679
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6680
+ result200 = CalendarSettingsDto.fromJS(resultData200);
6681
+ return result200;
6682
+ });
6683
+ } else if (status !== 200 && status !== 204) {
6684
+ return response.text().then((_responseText) => {
6685
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6686
+ });
6687
+ }
6688
+ return Promise.resolve<CalendarSettingsDto>(null as any);
6564
6689
  }
6565
6690
  }
6566
6691
 
@@ -25256,6 +25381,46 @@ export interface INumericNullableValueWithTimestamp {
25256
25381
  value?: number | null;
25257
25382
  }
25258
25383
 
25384
+ export class ProgramDatapoint implements IProgramDatapoint {
25385
+ timestamp?: number;
25386
+ programValue?: string;
25387
+
25388
+ constructor(data?: IProgramDatapoint) {
25389
+ if (data) {
25390
+ for (var property in data) {
25391
+ if (data.hasOwnProperty(property))
25392
+ (<any>this)[property] = (<any>data)[property];
25393
+ }
25394
+ }
25395
+ }
25396
+
25397
+ init(_data?: any) {
25398
+ if (_data) {
25399
+ this.timestamp = _data["timestamp"];
25400
+ this.programValue = _data["programValue"];
25401
+ }
25402
+ }
25403
+
25404
+ static fromJS(data: any): ProgramDatapoint {
25405
+ data = typeof data === 'object' ? data : {};
25406
+ let result = new ProgramDatapoint();
25407
+ result.init(data);
25408
+ return result;
25409
+ }
25410
+
25411
+ toJSON(data?: any) {
25412
+ data = typeof data === 'object' ? data : {};
25413
+ data["timestamp"] = this.timestamp;
25414
+ data["programValue"] = this.programValue;
25415
+ return data;
25416
+ }
25417
+ }
25418
+
25419
+ export interface IProgramDatapoint {
25420
+ timestamp?: number;
25421
+ programValue?: string;
25422
+ }
25423
+
25259
25424
  export class UserAppDto implements IUserAppDto {
25260
25425
  key!: string;
25261
25426
  name!: string;
@@ -33921,11 +34086,12 @@ export interface IUpdateMachinesCapacity {
33921
34086
  capacity?: MachineCapacitySettingsDto[] | null;
33922
34087
  }
33923
34088
 
33924
- export class CalenderCapacityDto implements ICalenderCapacityDto {
34089
+ export class CalendarDayDto implements ICalendarDayDto {
33925
34090
  date?: Date;
33926
- dayCapacity?: CalenderDayCapacityDto;
34091
+ dayCapacity?: CalendarDayCapacityDto;
34092
+ capacityHours?: number;
33927
34093
 
33928
- constructor(data?: ICalenderCapacityDto) {
34094
+ constructor(data?: ICalendarDayDto) {
33929
34095
  if (data) {
33930
34096
  for (var property in data) {
33931
34097
  if (data.hasOwnProperty(property))
@@ -33938,12 +34104,13 @@ export class CalenderCapacityDto implements ICalenderCapacityDto {
33938
34104
  if (_data) {
33939
34105
  this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
33940
34106
  this.dayCapacity = _data["dayCapacity"];
34107
+ this.capacityHours = _data["capacityHours"];
33941
34108
  }
33942
34109
  }
33943
34110
 
33944
- static fromJS(data: any): CalenderCapacityDto {
34111
+ static fromJS(data: any): CalendarDayDto {
33945
34112
  data = typeof data === 'object' ? data : {};
33946
- let result = new CalenderCapacityDto();
34113
+ let result = new CalendarDayDto();
33947
34114
  result.init(data);
33948
34115
  return result;
33949
34116
  }
@@ -33952,22 +34119,64 @@ export class CalenderCapacityDto implements ICalenderCapacityDto {
33952
34119
  data = typeof data === 'object' ? data : {};
33953
34120
  data["date"] = this.date ? this.date.toISOString() : <any>undefined;
33954
34121
  data["dayCapacity"] = this.dayCapacity;
34122
+ data["capacityHours"] = this.capacityHours;
33955
34123
  return data;
33956
34124
  }
33957
34125
  }
33958
34126
 
33959
- export interface ICalenderCapacityDto {
34127
+ export interface ICalendarDayDto {
33960
34128
  date?: Date;
33961
- dayCapacity?: CalenderDayCapacityDto;
34129
+ dayCapacity?: CalendarDayCapacityDto;
34130
+ capacityHours?: number;
34131
+ }
34132
+
34133
+ export type CalendarDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
34134
+
34135
+ export class CalendarCapacityDto implements ICalendarCapacityDto {
34136
+ date?: Date;
34137
+ dayCapacity?: CalendarDayCapacityDto;
34138
+
34139
+ constructor(data?: ICalendarCapacityDto) {
34140
+ if (data) {
34141
+ for (var property in data) {
34142
+ if (data.hasOwnProperty(property))
34143
+ (<any>this)[property] = (<any>data)[property];
34144
+ }
34145
+ }
34146
+ }
34147
+
34148
+ init(_data?: any) {
34149
+ if (_data) {
34150
+ this.date = _data["date"] ? new Date(_data["date"].toString()) : <any>undefined;
34151
+ this.dayCapacity = _data["dayCapacity"];
34152
+ }
34153
+ }
34154
+
34155
+ static fromJS(data: any): CalendarCapacityDto {
34156
+ data = typeof data === 'object' ? data : {};
34157
+ let result = new CalendarCapacityDto();
34158
+ result.init(data);
34159
+ return result;
34160
+ }
34161
+
34162
+ toJSON(data?: any) {
34163
+ data = typeof data === 'object' ? data : {};
34164
+ data["date"] = this.date ? this.date.toISOString() : <any>undefined;
34165
+ data["dayCapacity"] = this.dayCapacity;
34166
+ return data;
34167
+ }
33962
34168
  }
33963
34169
 
33964
- export type CalenderDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
34170
+ export interface ICalendarCapacityDto {
34171
+ date?: Date;
34172
+ dayCapacity?: CalendarDayCapacityDto;
34173
+ }
33965
34174
 
33966
- export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
34175
+ export class UpdateCalendarCapacity implements IUpdateCalendarCapacity {
33967
34176
  date?: Date;
33968
- dayCapacity?: CalenderDayCapacityDto;
34177
+ dayCapacity?: CalendarDayCapacityDto;
33969
34178
 
33970
- constructor(data?: IUpdateCalenderCapacity) {
34179
+ constructor(data?: IUpdateCalendarCapacity) {
33971
34180
  if (data) {
33972
34181
  for (var property in data) {
33973
34182
  if (data.hasOwnProperty(property))
@@ -33983,9 +34192,9 @@ export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
33983
34192
  }
33984
34193
  }
33985
34194
 
33986
- static fromJS(data: any): UpdateCalenderCapacity {
34195
+ static fromJS(data: any): UpdateCalendarCapacity {
33987
34196
  data = typeof data === 'object' ? data : {};
33988
- let result = new UpdateCalenderCapacity();
34197
+ let result = new UpdateCalendarCapacity();
33989
34198
  result.init(data);
33990
34199
  return result;
33991
34200
  }
@@ -33998,9 +34207,123 @@ export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
33998
34207
  }
33999
34208
  }
34000
34209
 
34001
- export interface IUpdateCalenderCapacity {
34210
+ export interface IUpdateCalendarCapacity {
34002
34211
  date?: Date;
34003
- dayCapacity?: CalenderDayCapacityDto;
34212
+ dayCapacity?: CalendarDayCapacityDto;
34213
+ }
34214
+
34215
+ export class CalendarSettingsDto implements ICalendarSettingsDto {
34216
+ defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
34217
+ halfDayHours?: number;
34218
+ holidayHours?: number;
34219
+
34220
+ constructor(data?: ICalendarSettingsDto) {
34221
+ if (data) {
34222
+ for (var property in data) {
34223
+ if (data.hasOwnProperty(property))
34224
+ (<any>this)[property] = (<any>data)[property];
34225
+ }
34226
+ }
34227
+ }
34228
+
34229
+ init(_data?: any) {
34230
+ if (_data) {
34231
+ if (_data["defaultHoursPerWeekday"]) {
34232
+ this.defaultHoursPerWeekday = {} as any;
34233
+ for (let key in _data["defaultHoursPerWeekday"]) {
34234
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
34235
+ (<any>this.defaultHoursPerWeekday)![key] = _data["defaultHoursPerWeekday"][key];
34236
+ }
34237
+ }
34238
+ this.halfDayHours = _data["halfDayHours"];
34239
+ this.holidayHours = _data["holidayHours"];
34240
+ }
34241
+ }
34242
+
34243
+ static fromJS(data: any): CalendarSettingsDto {
34244
+ data = typeof data === 'object' ? data : {};
34245
+ let result = new CalendarSettingsDto();
34246
+ result.init(data);
34247
+ return result;
34248
+ }
34249
+
34250
+ toJSON(data?: any) {
34251
+ data = typeof data === 'object' ? data : {};
34252
+ if (this.defaultHoursPerWeekday) {
34253
+ data["defaultHoursPerWeekday"] = {};
34254
+ for (let key in this.defaultHoursPerWeekday) {
34255
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
34256
+ (<any>data["defaultHoursPerWeekday"])[key] = (<any>this.defaultHoursPerWeekday)[key];
34257
+ }
34258
+ }
34259
+ data["halfDayHours"] = this.halfDayHours;
34260
+ data["holidayHours"] = this.holidayHours;
34261
+ return data;
34262
+ }
34263
+ }
34264
+
34265
+ export interface ICalendarSettingsDto {
34266
+ defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
34267
+ halfDayHours?: number;
34268
+ holidayHours?: number;
34269
+ }
34270
+
34271
+ export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
34272
+
34273
+ export class UpdateCalendarSettingsCommand implements IUpdateCalendarSettingsCommand {
34274
+ defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
34275
+ halfDayHours?: number;
34276
+ holidayHours?: number;
34277
+
34278
+ constructor(data?: IUpdateCalendarSettingsCommand) {
34279
+ if (data) {
34280
+ for (var property in data) {
34281
+ if (data.hasOwnProperty(property))
34282
+ (<any>this)[property] = (<any>data)[property];
34283
+ }
34284
+ }
34285
+ }
34286
+
34287
+ init(_data?: any) {
34288
+ if (_data) {
34289
+ if (_data["defaultHoursPerWeekday"]) {
34290
+ this.defaultHoursPerWeekday = {} as any;
34291
+ for (let key in _data["defaultHoursPerWeekday"]) {
34292
+ if (_data["defaultHoursPerWeekday"].hasOwnProperty(key))
34293
+ (<any>this.defaultHoursPerWeekday)![key] = _data["defaultHoursPerWeekday"][key];
34294
+ }
34295
+ }
34296
+ this.halfDayHours = _data["halfDayHours"];
34297
+ this.holidayHours = _data["holidayHours"];
34298
+ }
34299
+ }
34300
+
34301
+ static fromJS(data: any): UpdateCalendarSettingsCommand {
34302
+ data = typeof data === 'object' ? data : {};
34303
+ let result = new UpdateCalendarSettingsCommand();
34304
+ result.init(data);
34305
+ return result;
34306
+ }
34307
+
34308
+ toJSON(data?: any) {
34309
+ data = typeof data === 'object' ? data : {};
34310
+ if (this.defaultHoursPerWeekday) {
34311
+ data["defaultHoursPerWeekday"] = {};
34312
+ for (let key in this.defaultHoursPerWeekday) {
34313
+ if (this.defaultHoursPerWeekday.hasOwnProperty(key))
34314
+ (<any>data["defaultHoursPerWeekday"])[key] = (<any>this.defaultHoursPerWeekday)[key];
34315
+ }
34316
+ }
34317
+ data["halfDayHours"] = this.halfDayHours;
34318
+ data["holidayHours"] = this.holidayHours;
34319
+ return data;
34320
+ }
34321
+ }
34322
+
34323
+ export interface IUpdateCalendarSettingsCommand {
34324
+ defaultHoursPerWeekday?: { [key in DayOfWeek]?: number; };
34325
+ halfDayHours?: number;
34326
+ holidayHours?: number;
34004
34327
  }
34005
34328
 
34006
34329
  export class MachineKpiDto implements IMachineKpiDto {