@ignos/api-client 20250211.0.11097 → 20250214.0.11147

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.
@@ -807,8 +807,8 @@ export declare class KpiAdminClient extends AuthorizedApiBase implements IKpiAdm
807
807
  protected processUpdateCalenderCapacityAdmin(response: Response): Promise<CalenderCapacityDto>;
808
808
  }
809
809
  export interface IKpiClient {
810
- getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined): Promise<MachineKpiDto[]>;
811
- getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
810
+ getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto[]>;
811
+ getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
812
812
  }
813
813
  export declare class KpiClient extends AuthorizedApiBase implements IKpiClient {
814
814
  private http;
@@ -817,9 +817,9 @@ export declare class KpiClient extends AuthorizedApiBase implements IKpiClient {
817
817
  constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
818
818
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
819
819
  });
820
- getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined): Promise<MachineKpiDto[]>;
820
+ getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto[]>;
821
821
  protected processGetMachineKpi(response: Response): Promise<MachineKpiDto[]>;
822
- getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
822
+ getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
823
823
  protected processGetMachineDailyUptime(response: Response): Promise<MachineDailyUptimeDto>;
824
824
  }
825
825
  export interface IMachinesClient {
@@ -5811,18 +5811,18 @@ export interface IMachineStateDto {
5811
5811
  startTime?: Date;
5812
5812
  }
5813
5813
  export declare class DowntimeMachineStateDto implements IDowntimeMachineStateDto {
5814
- datapoint?: MachineStateDatapoint;
5815
- startTime?: Date;
5816
- endTime?: Date;
5814
+ datapoint: MachineStateDatapoint;
5815
+ startTime: Date;
5816
+ endTime: Date;
5817
5817
  constructor(data?: IDowntimeMachineStateDto);
5818
5818
  init(_data?: any): void;
5819
5819
  static fromJS(data: any): DowntimeMachineStateDto;
5820
5820
  toJSON(data?: any): any;
5821
5821
  }
5822
5822
  export interface IDowntimeMachineStateDto {
5823
- datapoint?: MachineStateDatapoint;
5824
- startTime?: Date;
5825
- endTime?: Date;
5823
+ datapoint: MachineStateDatapoint;
5824
+ startTime: Date;
5825
+ endTime: Date;
5826
5826
  }
5827
5827
  export declare class MachineErpDataListDto implements IMachineErpDataListDto {
5828
5828
  machines?: SingleMachineErpDataListDto[];
@@ -10667,8 +10667,8 @@ export interface IErpUserDto {
10667
10667
  email?: string | null;
10668
10668
  }
10669
10669
  export declare class ResourceGroupDto implements IResourceGroupDto {
10670
- id?: string;
10671
- name?: string;
10670
+ id: string;
10671
+ name?: string | null;
10672
10672
  resources: ProductionResourceDto[];
10673
10673
  department?: DepartmentDto | null;
10674
10674
  constructor(data?: IResourceGroupDto);
@@ -10677,8 +10677,8 @@ export declare class ResourceGroupDto implements IResourceGroupDto {
10677
10677
  toJSON(data?: any): any;
10678
10678
  }
10679
10679
  export interface IResourceGroupDto {
10680
- id?: string;
10681
- name?: string;
10680
+ id: string;
10681
+ name?: string | null;
10682
10682
  resources: ProductionResourceDto[];
10683
10683
  department?: DepartmentDto | null;
10684
10684
  }
@@ -6117,7 +6117,7 @@ export class KpiClient extends AuthorizedApiBase {
6117
6117
  this.http = http ? http : window;
6118
6118
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
6119
6119
  }
6120
- getMachineKpi(machineExternalId, startDate, endDate) {
6120
+ getMachineKpi(machineExternalId, startDate, endDate, utcOffset) {
6121
6121
  let url_ = this.baseUrl + "/kpi/capacity?";
6122
6122
  if (machineExternalId === null)
6123
6123
  throw new Error("The parameter 'machineExternalId' cannot be null.");
@@ -6131,6 +6131,10 @@ export class KpiClient extends AuthorizedApiBase {
6131
6131
  throw new Error("The parameter 'endDate' cannot be null.");
6132
6132
  else if (endDate !== undefined)
6133
6133
  url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
6134
+ if (utcOffset === null)
6135
+ throw new Error("The parameter 'utcOffset' cannot be null.");
6136
+ else if (utcOffset !== undefined)
6137
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
6134
6138
  url_ = url_.replace(/[?&]$/, "");
6135
6139
  let options_ = {
6136
6140
  method: "GET",
@@ -6170,7 +6174,7 @@ export class KpiClient extends AuthorizedApiBase {
6170
6174
  }
6171
6175
  return Promise.resolve(null);
6172
6176
  }
6173
- getMachineDailyUptime(machineExternalId, date) {
6177
+ getMachineDailyUptime(machineExternalId, date, utcOffset) {
6174
6178
  let url_ = this.baseUrl + "/kpi/daily-uptime?";
6175
6179
  if (machineExternalId === null)
6176
6180
  throw new Error("The parameter 'machineExternalId' cannot be null.");
@@ -6180,6 +6184,10 @@ export class KpiClient extends AuthorizedApiBase {
6180
6184
  throw new Error("The parameter 'date' cannot be null.");
6181
6185
  else if (date !== undefined)
6182
6186
  url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
6187
+ if (utcOffset === null)
6188
+ throw new Error("The parameter 'utcOffset' cannot be null.");
6189
+ else if (utcOffset !== undefined)
6190
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
6183
6191
  url_ = url_.replace(/[?&]$/, "");
6184
6192
  let options_ = {
6185
6193
  method: "GET",
@@ -27856,10 +27864,13 @@ export class DowntimeMachineStateDto {
27856
27864
  this[property] = data[property];
27857
27865
  }
27858
27866
  }
27867
+ if (!data) {
27868
+ this.datapoint = new MachineStateDatapoint();
27869
+ }
27859
27870
  }
27860
27871
  init(_data) {
27861
27872
  if (_data) {
27862
- this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : undefined;
27873
+ this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : new MachineStateDatapoint();
27863
27874
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
27864
27875
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
27865
27876
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250211.0.11097",
3
+ "version": "20250214.0.11147",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -6560,9 +6560,9 @@ export class KpiAdminClient extends AuthorizedApiBase implements IKpiAdminClient
6560
6560
 
6561
6561
  export interface IKpiClient {
6562
6562
 
6563
- getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined): Promise<MachineKpiDto[]>;
6563
+ getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto[]>;
6564
6564
 
6565
- getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto>;
6565
+ getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto>;
6566
6566
  }
6567
6567
 
6568
6568
  export class KpiClient extends AuthorizedApiBase implements IKpiClient {
@@ -6576,7 +6576,7 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
6576
6576
  this.baseUrl = baseUrl ?? "";
6577
6577
  }
6578
6578
 
6579
- getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined): Promise<MachineKpiDto[]> {
6579
+ getMachineKpi(machineExternalId: string | undefined, startDate: Date | undefined, endDate: Date | undefined, utcOffset: number | undefined): Promise<MachineKpiDto[]> {
6580
6580
  let url_ = this.baseUrl + "/kpi/capacity?";
6581
6581
  if (machineExternalId === null)
6582
6582
  throw new Error("The parameter 'machineExternalId' cannot be null.");
@@ -6590,6 +6590,10 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
6590
6590
  throw new Error("The parameter 'endDate' cannot be null.");
6591
6591
  else if (endDate !== undefined)
6592
6592
  url_ += "endDate=" + encodeURIComponent(endDate ? "" + endDate.toISOString() : "") + "&";
6593
+ if (utcOffset === null)
6594
+ throw new Error("The parameter 'utcOffset' cannot be null.");
6595
+ else if (utcOffset !== undefined)
6596
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
6593
6597
  url_ = url_.replace(/[?&]$/, "");
6594
6598
 
6595
6599
  let options_: RequestInit = {
@@ -6628,7 +6632,7 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
6628
6632
  return Promise.resolve<MachineKpiDto[]>(null as any);
6629
6633
  }
6630
6634
 
6631
- getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined): Promise<MachineDailyUptimeDto> {
6635
+ getMachineDailyUptime(machineExternalId: string | undefined, date: Date | undefined, utcOffset: number | undefined): Promise<MachineDailyUptimeDto> {
6632
6636
  let url_ = this.baseUrl + "/kpi/daily-uptime?";
6633
6637
  if (machineExternalId === null)
6634
6638
  throw new Error("The parameter 'machineExternalId' cannot be null.");
@@ -6638,6 +6642,10 @@ export class KpiClient extends AuthorizedApiBase implements IKpiClient {
6638
6642
  throw new Error("The parameter 'date' cannot be null.");
6639
6643
  else if (date !== undefined)
6640
6644
  url_ += "date=" + encodeURIComponent(date ? "" + date.toISOString() : "") + "&";
6645
+ if (utcOffset === null)
6646
+ throw new Error("The parameter 'utcOffset' cannot be null.");
6647
+ else if (utcOffset !== undefined)
6648
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
6641
6649
  url_ = url_.replace(/[?&]$/, "");
6642
6650
 
6643
6651
  let options_: RequestInit = {
@@ -32560,9 +32568,9 @@ export interface IMachineStateDto {
32560
32568
  }
32561
32569
 
32562
32570
  export class DowntimeMachineStateDto implements IDowntimeMachineStateDto {
32563
- datapoint?: MachineStateDatapoint;
32564
- startTime?: Date;
32565
- endTime?: Date;
32571
+ datapoint!: MachineStateDatapoint;
32572
+ startTime!: Date;
32573
+ endTime!: Date;
32566
32574
 
32567
32575
  constructor(data?: IDowntimeMachineStateDto) {
32568
32576
  if (data) {
@@ -32571,11 +32579,14 @@ export class DowntimeMachineStateDto implements IDowntimeMachineStateDto {
32571
32579
  (<any>this)[property] = (<any>data)[property];
32572
32580
  }
32573
32581
  }
32582
+ if (!data) {
32583
+ this.datapoint = new MachineStateDatapoint();
32584
+ }
32574
32585
  }
32575
32586
 
32576
32587
  init(_data?: any) {
32577
32588
  if (_data) {
32578
- this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : <any>undefined;
32589
+ this.datapoint = _data["datapoint"] ? MachineStateDatapoint.fromJS(_data["datapoint"]) : new MachineStateDatapoint();
32579
32590
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
32580
32591
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
32581
32592
  }
@@ -32598,9 +32609,9 @@ export class DowntimeMachineStateDto implements IDowntimeMachineStateDto {
32598
32609
  }
32599
32610
 
32600
32611
  export interface IDowntimeMachineStateDto {
32601
- datapoint?: MachineStateDatapoint;
32602
- startTime?: Date;
32603
- endTime?: Date;
32612
+ datapoint: MachineStateDatapoint;
32613
+ startTime: Date;
32614
+ endTime: Date;
32604
32615
  }
32605
32616
 
32606
32617
  export class MachineErpDataListDto implements IMachineErpDataListDto {
@@ -47281,8 +47292,8 @@ export interface IErpUserDto {
47281
47292
  }
47282
47293
 
47283
47294
  export class ResourceGroupDto implements IResourceGroupDto {
47284
- id?: string;
47285
- name?: string;
47295
+ id!: string;
47296
+ name?: string | null;
47286
47297
  resources!: ProductionResourceDto[];
47287
47298
  department?: DepartmentDto | null;
47288
47299
 
@@ -47333,8 +47344,8 @@ export class ResourceGroupDto implements IResourceGroupDto {
47333
47344
  }
47334
47345
 
47335
47346
  export interface IResourceGroupDto {
47336
- id?: string;
47337
- name?: string;
47347
+ id: string;
47348
+ name?: string | null;
47338
47349
  resources: ProductionResourceDto[];
47339
47350
  department?: DepartmentDto | null;
47340
47351
  }