@ignos/api-client 20250203.0.11067 → 20250204.0.11075

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.
@@ -1881,6 +1881,7 @@ export declare class MesPurchaseOrderClient extends AuthorizedApiBase implements
1881
1881
  export interface IMesResourceClient {
1882
1882
  listResourceGroups(includeResources: boolean | undefined): Promise<ResourceGroupDto[]>;
1883
1883
  listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
1884
+ listDepartments(): Promise<DepartmentDto[]>;
1884
1885
  }
1885
1886
  export declare class MesResourceClient extends AuthorizedApiBase implements IMesResourceClient {
1886
1887
  private http;
@@ -1893,6 +1894,8 @@ export declare class MesResourceClient extends AuthorizedApiBase implements IMes
1893
1894
  protected processListResourceGroups(response: Response): Promise<ResourceGroupDto[]>;
1894
1895
  listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
1895
1896
  protected processListResourceGroupResources(response: Response): Promise<ProductionResourceDto[]>;
1897
+ listDepartments(): Promise<DepartmentDto[]>;
1898
+ protected processListDepartments(response: Response): Promise<DepartmentDto[]>;
1896
1899
  }
1897
1900
  export interface IMeasurementFormSchemasClient {
1898
1901
  listMeasurmentFormSchemas(pageSize: number | undefined, customerId: string | null | undefined, customerName: string | null | undefined, partNumber: string | null | undefined, partRevision: string | null | undefined, drawing: string | null | undefined, drawingRevision: string | null | undefined, filter: string | null | undefined, continuationToken: string | null | undefined): Promise<PagedResultOfMeasurementFormListDto>;
@@ -3656,6 +3659,8 @@ export interface IMachineUtilizationDatapointListDto extends IUtilizationDatapoi
3656
3659
  export declare class CompanyUtilizationDatapointListDto extends UtilizationDatapointListDto implements ICompanyUtilizationDatapointListDto {
3657
3660
  companyId?: string | null;
3658
3661
  companyName?: string | null;
3662
+ groups?: MachineGroupUtilizationDatapointListDto[];
3663
+ ungroupedMachines?: MachineUtilizationDatapointListDto[];
3659
3664
  constructor(data?: ICompanyUtilizationDatapointListDto);
3660
3665
  init(_data?: any): void;
3661
3666
  static fromJS(data: any): CompanyUtilizationDatapointListDto;
@@ -3664,6 +3669,22 @@ export declare class CompanyUtilizationDatapointListDto extends UtilizationDatap
3664
3669
  export interface ICompanyUtilizationDatapointListDto extends IUtilizationDatapointListDto {
3665
3670
  companyId?: string | null;
3666
3671
  companyName?: string | null;
3672
+ groups?: MachineGroupUtilizationDatapointListDto[];
3673
+ ungroupedMachines?: MachineUtilizationDatapointListDto[];
3674
+ }
3675
+ export declare class MachineGroupUtilizationDatapointListDto extends UtilizationDatapointListDto implements IMachineGroupUtilizationDatapointListDto {
3676
+ groupId: string;
3677
+ groupName: string;
3678
+ machines?: MachineUtilizationDatapointListDto[];
3679
+ constructor(data?: IMachineGroupUtilizationDatapointListDto);
3680
+ init(_data?: any): void;
3681
+ static fromJS(data: any): MachineGroupUtilizationDatapointListDto;
3682
+ toJSON(data?: any): any;
3683
+ }
3684
+ export interface IMachineGroupUtilizationDatapointListDto extends IUtilizationDatapointListDto {
3685
+ groupId: string;
3686
+ groupName: string;
3687
+ machines?: MachineUtilizationDatapointListDto[];
3667
3688
  }
3668
3689
  export declare class CrossCompanyUtilizationDatapointListDto implements ICrossCompanyUtilizationDatapointListDto {
3669
3690
  companies?: CompanyUtilizationDatapointListDto[];
@@ -15344,6 +15344,47 @@ export class MesResourceClient extends AuthorizedApiBase {
15344
15344
  }
15345
15345
  return Promise.resolve(null);
15346
15346
  }
15347
+ listDepartments() {
15348
+ let url_ = this.baseUrl + "/mes/departments";
15349
+ url_ = url_.replace(/[?&]$/, "");
15350
+ let options_ = {
15351
+ method: "GET",
15352
+ headers: {
15353
+ "Accept": "application/json"
15354
+ }
15355
+ };
15356
+ return this.transformOptions(options_).then(transformedOptions_ => {
15357
+ return this.http.fetch(url_, transformedOptions_);
15358
+ }).then((_response) => {
15359
+ return this.processListDepartments(_response);
15360
+ });
15361
+ }
15362
+ processListDepartments(response) {
15363
+ const status = response.status;
15364
+ let _headers = {};
15365
+ if (response.headers && response.headers.forEach) {
15366
+ response.headers.forEach((v, k) => _headers[k] = v);
15367
+ }
15368
+ ;
15369
+ if (status === 200) {
15370
+ return response.text().then((_responseText) => {
15371
+ let result200 = null;
15372
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
15373
+ if (Array.isArray(resultData200)) {
15374
+ result200 = [];
15375
+ for (let item of resultData200)
15376
+ result200.push(DepartmentDto.fromJS(item));
15377
+ }
15378
+ return result200;
15379
+ });
15380
+ }
15381
+ else if (status !== 200 && status !== 204) {
15382
+ return response.text().then((_responseText) => {
15383
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
15384
+ });
15385
+ }
15386
+ return Promise.resolve(null);
15387
+ }
15347
15388
  }
15348
15389
  export class MeasurementFormSchemasClient extends AuthorizedApiBase {
15349
15390
  constructor(configuration, baseUrl, http) {
@@ -23224,6 +23265,16 @@ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointList
23224
23265
  if (_data) {
23225
23266
  this.companyId = _data["companyId"];
23226
23267
  this.companyName = _data["companyName"];
23268
+ if (Array.isArray(_data["groups"])) {
23269
+ this.groups = [];
23270
+ for (let item of _data["groups"])
23271
+ this.groups.push(MachineGroupUtilizationDatapointListDto.fromJS(item));
23272
+ }
23273
+ if (Array.isArray(_data["ungroupedMachines"])) {
23274
+ this.ungroupedMachines = [];
23275
+ for (let item of _data["ungroupedMachines"])
23276
+ this.ungroupedMachines.push(MachineUtilizationDatapointListDto.fromJS(item));
23277
+ }
23227
23278
  }
23228
23279
  }
23229
23280
  static fromJS(data) {
@@ -23236,6 +23287,51 @@ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointList
23236
23287
  data = typeof data === 'object' ? data : {};
23237
23288
  data["companyId"] = this.companyId;
23238
23289
  data["companyName"] = this.companyName;
23290
+ if (Array.isArray(this.groups)) {
23291
+ data["groups"] = [];
23292
+ for (let item of this.groups)
23293
+ data["groups"].push(item.toJSON());
23294
+ }
23295
+ if (Array.isArray(this.ungroupedMachines)) {
23296
+ data["ungroupedMachines"] = [];
23297
+ for (let item of this.ungroupedMachines)
23298
+ data["ungroupedMachines"].push(item.toJSON());
23299
+ }
23300
+ super.toJSON(data);
23301
+ return data;
23302
+ }
23303
+ }
23304
+ export class MachineGroupUtilizationDatapointListDto extends UtilizationDatapointListDto {
23305
+ constructor(data) {
23306
+ super(data);
23307
+ }
23308
+ init(_data) {
23309
+ super.init(_data);
23310
+ if (_data) {
23311
+ this.groupId = _data["groupId"];
23312
+ this.groupName = _data["groupName"];
23313
+ if (Array.isArray(_data["machines"])) {
23314
+ this.machines = [];
23315
+ for (let item of _data["machines"])
23316
+ this.machines.push(MachineUtilizationDatapointListDto.fromJS(item));
23317
+ }
23318
+ }
23319
+ }
23320
+ static fromJS(data) {
23321
+ data = typeof data === 'object' ? data : {};
23322
+ let result = new MachineGroupUtilizationDatapointListDto();
23323
+ result.init(data);
23324
+ return result;
23325
+ }
23326
+ toJSON(data) {
23327
+ data = typeof data === 'object' ? data : {};
23328
+ data["groupId"] = this.groupId;
23329
+ data["groupName"] = this.groupName;
23330
+ if (Array.isArray(this.machines)) {
23331
+ data["machines"] = [];
23332
+ for (let item of this.machines)
23333
+ data["machines"].push(item.toJSON());
23334
+ }
23239
23335
  super.toJSON(data);
23240
23336
  return data;
23241
23337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250203.0.11067",
3
+ "version": "20250204.0.11075",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -16318,6 +16318,8 @@ export interface IMesResourceClient {
16318
16318
  listResourceGroups(includeResources: boolean | undefined): Promise<ResourceGroupDto[]>;
16319
16319
 
16320
16320
  listResourceGroupResources(id: string): Promise<ProductionResourceDto[]>;
16321
+
16322
+ listDepartments(): Promise<DepartmentDto[]>;
16321
16323
  }
16322
16324
 
16323
16325
  export class MesResourceClient extends AuthorizedApiBase implements IMesResourceClient {
@@ -16417,6 +16419,46 @@ export class MesResourceClient extends AuthorizedApiBase implements IMesResource
16417
16419
  }
16418
16420
  return Promise.resolve<ProductionResourceDto[]>(null as any);
16419
16421
  }
16422
+
16423
+ listDepartments(): Promise<DepartmentDto[]> {
16424
+ let url_ = this.baseUrl + "/mes/departments";
16425
+ url_ = url_.replace(/[?&]$/, "");
16426
+
16427
+ let options_: RequestInit = {
16428
+ method: "GET",
16429
+ headers: {
16430
+ "Accept": "application/json"
16431
+ }
16432
+ };
16433
+
16434
+ return this.transformOptions(options_).then(transformedOptions_ => {
16435
+ return this.http.fetch(url_, transformedOptions_);
16436
+ }).then((_response: Response) => {
16437
+ return this.processListDepartments(_response);
16438
+ });
16439
+ }
16440
+
16441
+ protected processListDepartments(response: Response): Promise<DepartmentDto[]> {
16442
+ const status = response.status;
16443
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
16444
+ if (status === 200) {
16445
+ return response.text().then((_responseText) => {
16446
+ let result200: any = null;
16447
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
16448
+ if (Array.isArray(resultData200)) {
16449
+ result200 = [] as any;
16450
+ for (let item of resultData200)
16451
+ result200!.push(DepartmentDto.fromJS(item));
16452
+ }
16453
+ return result200;
16454
+ });
16455
+ } else if (status !== 200 && status !== 204) {
16456
+ return response.text().then((_responseText) => {
16457
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
16458
+ });
16459
+ }
16460
+ return Promise.resolve<DepartmentDto[]>(null as any);
16461
+ }
16420
16462
  }
16421
16463
 
16422
16464
  export interface IMeasurementFormSchemasClient {
@@ -25756,6 +25798,8 @@ export interface IMachineUtilizationDatapointListDto extends IUtilizationDatapoi
25756
25798
  export class CompanyUtilizationDatapointListDto extends UtilizationDatapointListDto implements ICompanyUtilizationDatapointListDto {
25757
25799
  companyId?: string | null;
25758
25800
  companyName?: string | null;
25801
+ groups?: MachineGroupUtilizationDatapointListDto[];
25802
+ ungroupedMachines?: MachineUtilizationDatapointListDto[];
25759
25803
 
25760
25804
  constructor(data?: ICompanyUtilizationDatapointListDto) {
25761
25805
  super(data);
@@ -25766,6 +25810,16 @@ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointList
25766
25810
  if (_data) {
25767
25811
  this.companyId = _data["companyId"];
25768
25812
  this.companyName = _data["companyName"];
25813
+ if (Array.isArray(_data["groups"])) {
25814
+ this.groups = [] as any;
25815
+ for (let item of _data["groups"])
25816
+ this.groups!.push(MachineGroupUtilizationDatapointListDto.fromJS(item));
25817
+ }
25818
+ if (Array.isArray(_data["ungroupedMachines"])) {
25819
+ this.ungroupedMachines = [] as any;
25820
+ for (let item of _data["ungroupedMachines"])
25821
+ this.ungroupedMachines!.push(MachineUtilizationDatapointListDto.fromJS(item));
25822
+ }
25769
25823
  }
25770
25824
  }
25771
25825
 
@@ -25780,6 +25834,16 @@ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointList
25780
25834
  data = typeof data === 'object' ? data : {};
25781
25835
  data["companyId"] = this.companyId;
25782
25836
  data["companyName"] = this.companyName;
25837
+ if (Array.isArray(this.groups)) {
25838
+ data["groups"] = [];
25839
+ for (let item of this.groups)
25840
+ data["groups"].push(item.toJSON());
25841
+ }
25842
+ if (Array.isArray(this.ungroupedMachines)) {
25843
+ data["ungroupedMachines"] = [];
25844
+ for (let item of this.ungroupedMachines)
25845
+ data["ungroupedMachines"].push(item.toJSON());
25846
+ }
25783
25847
  super.toJSON(data);
25784
25848
  return data;
25785
25849
  }
@@ -25788,6 +25852,57 @@ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointList
25788
25852
  export interface ICompanyUtilizationDatapointListDto extends IUtilizationDatapointListDto {
25789
25853
  companyId?: string | null;
25790
25854
  companyName?: string | null;
25855
+ groups?: MachineGroupUtilizationDatapointListDto[];
25856
+ ungroupedMachines?: MachineUtilizationDatapointListDto[];
25857
+ }
25858
+
25859
+ export class MachineGroupUtilizationDatapointListDto extends UtilizationDatapointListDto implements IMachineGroupUtilizationDatapointListDto {
25860
+ groupId!: string;
25861
+ groupName!: string;
25862
+ machines?: MachineUtilizationDatapointListDto[];
25863
+
25864
+ constructor(data?: IMachineGroupUtilizationDatapointListDto) {
25865
+ super(data);
25866
+ }
25867
+
25868
+ override init(_data?: any) {
25869
+ super.init(_data);
25870
+ if (_data) {
25871
+ this.groupId = _data["groupId"];
25872
+ this.groupName = _data["groupName"];
25873
+ if (Array.isArray(_data["machines"])) {
25874
+ this.machines = [] as any;
25875
+ for (let item of _data["machines"])
25876
+ this.machines!.push(MachineUtilizationDatapointListDto.fromJS(item));
25877
+ }
25878
+ }
25879
+ }
25880
+
25881
+ static override fromJS(data: any): MachineGroupUtilizationDatapointListDto {
25882
+ data = typeof data === 'object' ? data : {};
25883
+ let result = new MachineGroupUtilizationDatapointListDto();
25884
+ result.init(data);
25885
+ return result;
25886
+ }
25887
+
25888
+ override toJSON(data?: any) {
25889
+ data = typeof data === 'object' ? data : {};
25890
+ data["groupId"] = this.groupId;
25891
+ data["groupName"] = this.groupName;
25892
+ if (Array.isArray(this.machines)) {
25893
+ data["machines"] = [];
25894
+ for (let item of this.machines)
25895
+ data["machines"].push(item.toJSON());
25896
+ }
25897
+ super.toJSON(data);
25898
+ return data;
25899
+ }
25900
+ }
25901
+
25902
+ export interface IMachineGroupUtilizationDatapointListDto extends IUtilizationDatapointListDto {
25903
+ groupId: string;
25904
+ groupName: string;
25905
+ machines?: MachineUtilizationDatapointListDto[];
25791
25906
  }
25792
25907
 
25793
25908
  export class CrossCompanyUtilizationDatapointListDto implements ICrossCompanyUtilizationDatapointListDto {