@ignos/api-client 20250116.0.10993 → 20250122.0.11003

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.
@@ -2385,6 +2385,255 @@ export class PulseClient extends AuthorizedApiBase implements IPulseClient {
2385
2385
  }
2386
2386
  }
2387
2387
 
2388
+ export interface IUtilizationClient {
2389
+
2390
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto>;
2391
+
2392
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto>;
2393
+
2394
+ getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetId: number | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto>;
2395
+
2396
+ getCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDatapointListDto>;
2397
+
2398
+ getCrossCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDatapointListDto>;
2399
+ }
2400
+
2401
+ export class UtilizationClient extends AuthorizedApiBase implements IUtilizationClient {
2402
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
2403
+ private baseUrl: string;
2404
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
2405
+
2406
+ constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
2407
+ super(configuration);
2408
+ this.http = http ? http : window as any;
2409
+ this.baseUrl = baseUrl ?? "";
2410
+ }
2411
+
2412
+ getCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDto> {
2413
+ let url_ = this.baseUrl + "/utilization?";
2414
+ if (utilizationType === null)
2415
+ throw new Error("The parameter 'utilizationType' cannot be null.");
2416
+ else if (utilizationType !== undefined)
2417
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
2418
+ if (startTime !== undefined && startTime !== null)
2419
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2420
+ if (endTime !== undefined && endTime !== null)
2421
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
2422
+ url_ = url_.replace(/[?&]$/, "");
2423
+
2424
+ let options_: RequestInit = {
2425
+ method: "GET",
2426
+ headers: {
2427
+ "Accept": "application/json"
2428
+ }
2429
+ };
2430
+
2431
+ return this.transformOptions(options_).then(transformedOptions_ => {
2432
+ return this.http.fetch(url_, transformedOptions_);
2433
+ }).then((_response: Response) => {
2434
+ return this.processGetCompanyUtilization(_response);
2435
+ });
2436
+ }
2437
+
2438
+ protected processGetCompanyUtilization(response: Response): Promise<CompanyUtilizationDto> {
2439
+ const status = response.status;
2440
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2441
+ if (status === 200) {
2442
+ return response.text().then((_responseText) => {
2443
+ let result200: any = null;
2444
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2445
+ result200 = CompanyUtilizationDto.fromJS(resultData200);
2446
+ return result200;
2447
+ });
2448
+ } else if (status !== 200 && status !== 204) {
2449
+ return response.text().then((_responseText) => {
2450
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2451
+ });
2452
+ }
2453
+ return Promise.resolve<CompanyUtilizationDto>(null as any);
2454
+ }
2455
+
2456
+ getCrossCompanyUtilization(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDto> {
2457
+ let url_ = this.baseUrl + "/utilization/cross-company?";
2458
+ if (utilizationType === null)
2459
+ throw new Error("The parameter 'utilizationType' cannot be null.");
2460
+ else if (utilizationType !== undefined)
2461
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
2462
+ if (startTime !== undefined && startTime !== null)
2463
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2464
+ if (endTime !== undefined && endTime !== null)
2465
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
2466
+ url_ = url_.replace(/[?&]$/, "");
2467
+
2468
+ let options_: RequestInit = {
2469
+ method: "GET",
2470
+ headers: {
2471
+ "Accept": "application/json"
2472
+ }
2473
+ };
2474
+
2475
+ return this.transformOptions(options_).then(transformedOptions_ => {
2476
+ return this.http.fetch(url_, transformedOptions_);
2477
+ }).then((_response: Response) => {
2478
+ return this.processGetCrossCompanyUtilization(_response);
2479
+ });
2480
+ }
2481
+
2482
+ protected processGetCrossCompanyUtilization(response: Response): Promise<CrossCompanyUtilizationDto> {
2483
+ const status = response.status;
2484
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2485
+ if (status === 200) {
2486
+ return response.text().then((_responseText) => {
2487
+ let result200: any = null;
2488
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2489
+ result200 = CrossCompanyUtilizationDto.fromJS(resultData200);
2490
+ return result200;
2491
+ });
2492
+ } else if (status !== 200 && status !== 204) {
2493
+ return response.text().then((_responseText) => {
2494
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2495
+ });
2496
+ }
2497
+ return Promise.resolve<CrossCompanyUtilizationDto>(null as any);
2498
+ }
2499
+
2500
+ getUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined, assetId: number | null | undefined, assetExternalId: string | null | undefined): Promise<MachineUtilizationDatapointListDto> {
2501
+ let url_ = this.baseUrl + "/utilization/datapoints?";
2502
+ if (utilizationType === null)
2503
+ throw new Error("The parameter 'utilizationType' cannot be null.");
2504
+ else if (utilizationType !== undefined)
2505
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
2506
+ if (startTime !== undefined && startTime !== null)
2507
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2508
+ if (endTime !== undefined && endTime !== null)
2509
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
2510
+ if (assetId !== undefined && assetId !== null)
2511
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
2512
+ if (assetExternalId !== undefined && assetExternalId !== null)
2513
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
2514
+ url_ = url_.replace(/[?&]$/, "");
2515
+
2516
+ let options_: RequestInit = {
2517
+ method: "GET",
2518
+ headers: {
2519
+ "Accept": "application/json"
2520
+ }
2521
+ };
2522
+
2523
+ return this.transformOptions(options_).then(transformedOptions_ => {
2524
+ return this.http.fetch(url_, transformedOptions_);
2525
+ }).then((_response: Response) => {
2526
+ return this.processGetUtilizationDatapoints(_response);
2527
+ });
2528
+ }
2529
+
2530
+ protected processGetUtilizationDatapoints(response: Response): Promise<MachineUtilizationDatapointListDto> {
2531
+ const status = response.status;
2532
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2533
+ if (status === 200) {
2534
+ return response.text().then((_responseText) => {
2535
+ let result200: any = null;
2536
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2537
+ result200 = MachineUtilizationDatapointListDto.fromJS(resultData200);
2538
+ return result200;
2539
+ });
2540
+ } else if (status !== 200 && status !== 204) {
2541
+ return response.text().then((_responseText) => {
2542
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2543
+ });
2544
+ }
2545
+ return Promise.resolve<MachineUtilizationDatapointListDto>(null as any);
2546
+ }
2547
+
2548
+ getCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CompanyUtilizationDatapointListDto> {
2549
+ let url_ = this.baseUrl + "/utilization/datapoints/company?";
2550
+ if (utilizationType === null)
2551
+ throw new Error("The parameter 'utilizationType' cannot be null.");
2552
+ else if (utilizationType !== undefined)
2553
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
2554
+ if (startTime !== undefined && startTime !== null)
2555
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2556
+ if (endTime !== undefined && endTime !== null)
2557
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
2558
+ url_ = url_.replace(/[?&]$/, "");
2559
+
2560
+ let options_: RequestInit = {
2561
+ method: "GET",
2562
+ headers: {
2563
+ "Accept": "application/json"
2564
+ }
2565
+ };
2566
+
2567
+ return this.transformOptions(options_).then(transformedOptions_ => {
2568
+ return this.http.fetch(url_, transformedOptions_);
2569
+ }).then((_response: Response) => {
2570
+ return this.processGetCompanyUtilizationDatapoints(_response);
2571
+ });
2572
+ }
2573
+
2574
+ protected processGetCompanyUtilizationDatapoints(response: Response): Promise<CompanyUtilizationDatapointListDto> {
2575
+ const status = response.status;
2576
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2577
+ if (status === 200) {
2578
+ return response.text().then((_responseText) => {
2579
+ let result200: any = null;
2580
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2581
+ result200 = CompanyUtilizationDatapointListDto.fromJS(resultData200);
2582
+ return result200;
2583
+ });
2584
+ } else if (status !== 200 && status !== 204) {
2585
+ return response.text().then((_responseText) => {
2586
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2587
+ });
2588
+ }
2589
+ return Promise.resolve<CompanyUtilizationDatapointListDto>(null as any);
2590
+ }
2591
+
2592
+ getCrossCompanyUtilizationDatapoints(utilizationType: UtilizationTypeDto | undefined, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<CrossCompanyUtilizationDatapointListDto> {
2593
+ let url_ = this.baseUrl + "/utilization/datapoints/cross-company?";
2594
+ if (utilizationType === null)
2595
+ throw new Error("The parameter 'utilizationType' cannot be null.");
2596
+ else if (utilizationType !== undefined)
2597
+ url_ += "utilizationType=" + encodeURIComponent("" + utilizationType) + "&";
2598
+ if (startTime !== undefined && startTime !== null)
2599
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
2600
+ if (endTime !== undefined && endTime !== null)
2601
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
2602
+ url_ = url_.replace(/[?&]$/, "");
2603
+
2604
+ let options_: RequestInit = {
2605
+ method: "GET",
2606
+ headers: {
2607
+ "Accept": "application/json"
2608
+ }
2609
+ };
2610
+
2611
+ return this.transformOptions(options_).then(transformedOptions_ => {
2612
+ return this.http.fetch(url_, transformedOptions_);
2613
+ }).then((_response: Response) => {
2614
+ return this.processGetCrossCompanyUtilizationDatapoints(_response);
2615
+ });
2616
+ }
2617
+
2618
+ protected processGetCrossCompanyUtilizationDatapoints(response: Response): Promise<CrossCompanyUtilizationDatapointListDto> {
2619
+ const status = response.status;
2620
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2621
+ if (status === 200) {
2622
+ return response.text().then((_responseText) => {
2623
+ let result200: any = null;
2624
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2625
+ result200 = CrossCompanyUtilizationDatapointListDto.fromJS(resultData200);
2626
+ return result200;
2627
+ });
2628
+ } else if (status !== 200 && status !== 204) {
2629
+ return response.text().then((_responseText) => {
2630
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2631
+ });
2632
+ }
2633
+ return Promise.resolve<CrossCompanyUtilizationDatapointListDto>(null as any);
2634
+ }
2635
+ }
2636
+
2388
2637
  export interface IMrbClient {
2389
2638
 
2390
2639
  listMrbInstances(customerOrder: string | undefined, customerOrderLine: number | null | undefined): Promise<MrbInstanceDto[]>;
@@ -24927,24 +25176,13 @@ export interface IUpdatePulseSettings {
24927
25176
  activeOrderEnabled: boolean;
24928
25177
  }
24929
25178
 
24930
- export class MrbInstanceDto implements IMrbInstanceDto {
24931
- id!: string;
24932
- title?: string | null;
24933
- customerId?: string | null;
24934
- customerName?: string | null;
24935
- customerOrder!: string;
24936
- customerOrderLine!: number;
24937
- externalOrderNumber?: string | null;
24938
- traces!: CustomerOrderLineTraceItemDto[];
24939
- mrbTemplateId?: string | null;
24940
- mrbTemplateName?: string | null;
24941
- mrbJobId?: string | null;
24942
- mrbExportJobId?: string | null;
24943
- status?: MrbStatusDto | null;
24944
- latestRevision?: MrbInstanceRevisionDto | null;
24945
- part?: MrbPartDto | null;
25179
+ export class CompanyUtilizationDto implements ICompanyUtilizationDto {
25180
+ utilizationType!: UtilizationTypeDto;
25181
+ companyUtilization!: UtilizationDetailsV2Dto;
25182
+ groups!: MachineGroupUtilizationV2Dto[];
25183
+ ungroupedMachines!: MachineUtilizationV3Dto[];
24946
25184
 
24947
- constructor(data?: IMrbInstanceDto) {
25185
+ constructor(data?: ICompanyUtilizationDto) {
24948
25186
  if (data) {
24949
25187
  for (var property in data) {
24950
25188
  if (data.hasOwnProperty(property))
@@ -24952,59 +25190,520 @@ export class MrbInstanceDto implements IMrbInstanceDto {
24952
25190
  }
24953
25191
  }
24954
25192
  if (!data) {
24955
- this.traces = [];
25193
+ this.companyUtilization = new UtilizationDetailsV2Dto();
25194
+ this.groups = [];
25195
+ this.ungroupedMachines = [];
24956
25196
  }
24957
25197
  }
24958
25198
 
24959
25199
  init(_data?: any) {
24960
25200
  if (_data) {
24961
- this.id = _data["id"];
24962
- this.title = _data["title"];
24963
- this.customerId = _data["customerId"];
24964
- this.customerName = _data["customerName"];
24965
- this.customerOrder = _data["customerOrder"];
24966
- this.customerOrderLine = _data["customerOrderLine"];
24967
- this.externalOrderNumber = _data["externalOrderNumber"];
24968
- if (Array.isArray(_data["traces"])) {
24969
- this.traces = [] as any;
24970
- for (let item of _data["traces"])
24971
- this.traces!.push(CustomerOrderLineTraceItemDto.fromJS(item));
25201
+ this.utilizationType = _data["utilizationType"];
25202
+ this.companyUtilization = _data["companyUtilization"] ? UtilizationDetailsV2Dto.fromJS(_data["companyUtilization"]) : new UtilizationDetailsV2Dto();
25203
+ if (Array.isArray(_data["groups"])) {
25204
+ this.groups = [] as any;
25205
+ for (let item of _data["groups"])
25206
+ this.groups!.push(MachineGroupUtilizationV2Dto.fromJS(item));
25207
+ }
25208
+ if (Array.isArray(_data["ungroupedMachines"])) {
25209
+ this.ungroupedMachines = [] as any;
25210
+ for (let item of _data["ungroupedMachines"])
25211
+ this.ungroupedMachines!.push(MachineUtilizationV3Dto.fromJS(item));
24972
25212
  }
24973
- this.mrbTemplateId = _data["mrbTemplateId"];
24974
- this.mrbTemplateName = _data["mrbTemplateName"];
24975
- this.mrbJobId = _data["mrbJobId"];
24976
- this.mrbExportJobId = _data["mrbExportJobId"];
24977
- this.status = _data["status"] ? MrbStatusDto.fromJS(_data["status"]) : <any>undefined;
24978
- this.latestRevision = _data["latestRevision"] ? MrbInstanceRevisionDto.fromJS(_data["latestRevision"]) : <any>undefined;
24979
- this.part = _data["part"] ? MrbPartDto.fromJS(_data["part"]) : <any>undefined;
24980
25213
  }
24981
25214
  }
24982
25215
 
24983
- static fromJS(data: any): MrbInstanceDto {
25216
+ static fromJS(data: any): CompanyUtilizationDto {
24984
25217
  data = typeof data === 'object' ? data : {};
24985
- let result = new MrbInstanceDto();
25218
+ let result = new CompanyUtilizationDto();
24986
25219
  result.init(data);
24987
25220
  return result;
24988
25221
  }
24989
25222
 
24990
25223
  toJSON(data?: any) {
24991
25224
  data = typeof data === 'object' ? data : {};
24992
- data["id"] = this.id;
24993
- data["title"] = this.title;
24994
- data["customerId"] = this.customerId;
24995
- data["customerName"] = this.customerName;
24996
- data["customerOrder"] = this.customerOrder;
24997
- data["customerOrderLine"] = this.customerOrderLine;
24998
- data["externalOrderNumber"] = this.externalOrderNumber;
24999
- if (Array.isArray(this.traces)) {
25000
- data["traces"] = [];
25001
- for (let item of this.traces)
25002
- data["traces"].push(item.toJSON());
25225
+ data["utilizationType"] = this.utilizationType;
25226
+ data["companyUtilization"] = this.companyUtilization ? this.companyUtilization.toJSON() : <any>undefined;
25227
+ if (Array.isArray(this.groups)) {
25228
+ data["groups"] = [];
25229
+ for (let item of this.groups)
25230
+ data["groups"].push(item.toJSON());
25003
25231
  }
25004
- data["mrbTemplateId"] = this.mrbTemplateId;
25005
- data["mrbTemplateName"] = this.mrbTemplateName;
25006
- data["mrbJobId"] = this.mrbJobId;
25007
- data["mrbExportJobId"] = this.mrbExportJobId;
25232
+ if (Array.isArray(this.ungroupedMachines)) {
25233
+ data["ungroupedMachines"] = [];
25234
+ for (let item of this.ungroupedMachines)
25235
+ data["ungroupedMachines"].push(item.toJSON());
25236
+ }
25237
+ return data;
25238
+ }
25239
+ }
25240
+
25241
+ export interface ICompanyUtilizationDto {
25242
+ utilizationType: UtilizationTypeDto;
25243
+ companyUtilization: UtilizationDetailsV2Dto;
25244
+ groups: MachineGroupUtilizationV2Dto[];
25245
+ ungroupedMachines: MachineUtilizationV3Dto[];
25246
+ }
25247
+
25248
+ export class UtilizationDetailsV2Dto implements IUtilizationDetailsV2Dto {
25249
+ utilizationPercent?: number | null;
25250
+ uptimeInSeconds?: number | null;
25251
+ downtimeInSeconds?: number | null;
25252
+ totalTimeInSeconds?: number | null;
25253
+
25254
+ constructor(data?: IUtilizationDetailsV2Dto) {
25255
+ if (data) {
25256
+ for (var property in data) {
25257
+ if (data.hasOwnProperty(property))
25258
+ (<any>this)[property] = (<any>data)[property];
25259
+ }
25260
+ }
25261
+ }
25262
+
25263
+ init(_data?: any) {
25264
+ if (_data) {
25265
+ this.utilizationPercent = _data["utilizationPercent"];
25266
+ this.uptimeInSeconds = _data["uptimeInSeconds"];
25267
+ this.downtimeInSeconds = _data["downtimeInSeconds"];
25268
+ this.totalTimeInSeconds = _data["totalTimeInSeconds"];
25269
+ }
25270
+ }
25271
+
25272
+ static fromJS(data: any): UtilizationDetailsV2Dto {
25273
+ data = typeof data === 'object' ? data : {};
25274
+ let result = new UtilizationDetailsV2Dto();
25275
+ result.init(data);
25276
+ return result;
25277
+ }
25278
+
25279
+ toJSON(data?: any) {
25280
+ data = typeof data === 'object' ? data : {};
25281
+ data["utilizationPercent"] = this.utilizationPercent;
25282
+ data["uptimeInSeconds"] = this.uptimeInSeconds;
25283
+ data["downtimeInSeconds"] = this.downtimeInSeconds;
25284
+ data["totalTimeInSeconds"] = this.totalTimeInSeconds;
25285
+ return data;
25286
+ }
25287
+ }
25288
+
25289
+ export interface IUtilizationDetailsV2Dto {
25290
+ utilizationPercent?: number | null;
25291
+ uptimeInSeconds?: number | null;
25292
+ downtimeInSeconds?: number | null;
25293
+ totalTimeInSeconds?: number | null;
25294
+ }
25295
+
25296
+ export class MachineGroupUtilizationV2Dto implements IMachineGroupUtilizationV2Dto {
25297
+ name!: string;
25298
+ utilization!: UtilizationDetailsV2Dto;
25299
+ machines!: MachineUtilizationV3Dto[];
25300
+
25301
+ constructor(data?: IMachineGroupUtilizationV2Dto) {
25302
+ if (data) {
25303
+ for (var property in data) {
25304
+ if (data.hasOwnProperty(property))
25305
+ (<any>this)[property] = (<any>data)[property];
25306
+ }
25307
+ }
25308
+ if (!data) {
25309
+ this.utilization = new UtilizationDetailsV2Dto();
25310
+ this.machines = [];
25311
+ }
25312
+ }
25313
+
25314
+ init(_data?: any) {
25315
+ if (_data) {
25316
+ this.name = _data["name"];
25317
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
25318
+ if (Array.isArray(_data["machines"])) {
25319
+ this.machines = [] as any;
25320
+ for (let item of _data["machines"])
25321
+ this.machines!.push(MachineUtilizationV3Dto.fromJS(item));
25322
+ }
25323
+ }
25324
+ }
25325
+
25326
+ static fromJS(data: any): MachineGroupUtilizationV2Dto {
25327
+ data = typeof data === 'object' ? data : {};
25328
+ let result = new MachineGroupUtilizationV2Dto();
25329
+ result.init(data);
25330
+ return result;
25331
+ }
25332
+
25333
+ toJSON(data?: any) {
25334
+ data = typeof data === 'object' ? data : {};
25335
+ data["name"] = this.name;
25336
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : <any>undefined;
25337
+ if (Array.isArray(this.machines)) {
25338
+ data["machines"] = [];
25339
+ for (let item of this.machines)
25340
+ data["machines"].push(item.toJSON());
25341
+ }
25342
+ return data;
25343
+ }
25344
+ }
25345
+
25346
+ export interface IMachineGroupUtilizationV2Dto {
25347
+ name: string;
25348
+ utilization: UtilizationDetailsV2Dto;
25349
+ machines: MachineUtilizationV3Dto[];
25350
+ }
25351
+
25352
+ export class MachineUtilizationV3Dto implements IMachineUtilizationV3Dto {
25353
+ id?: number;
25354
+ name!: string;
25355
+ description?: string | null;
25356
+ utilization!: UtilizationDetailsV2Dto;
25357
+
25358
+ constructor(data?: IMachineUtilizationV3Dto) {
25359
+ if (data) {
25360
+ for (var property in data) {
25361
+ if (data.hasOwnProperty(property))
25362
+ (<any>this)[property] = (<any>data)[property];
25363
+ }
25364
+ }
25365
+ if (!data) {
25366
+ this.utilization = new UtilizationDetailsV2Dto();
25367
+ }
25368
+ }
25369
+
25370
+ init(_data?: any) {
25371
+ if (_data) {
25372
+ this.id = _data["id"];
25373
+ this.name = _data["name"];
25374
+ this.description = _data["description"];
25375
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
25376
+ }
25377
+ }
25378
+
25379
+ static fromJS(data: any): MachineUtilizationV3Dto {
25380
+ data = typeof data === 'object' ? data : {};
25381
+ let result = new MachineUtilizationV3Dto();
25382
+ result.init(data);
25383
+ return result;
25384
+ }
25385
+
25386
+ toJSON(data?: any) {
25387
+ data = typeof data === 'object' ? data : {};
25388
+ data["id"] = this.id;
25389
+ data["name"] = this.name;
25390
+ data["description"] = this.description;
25391
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : <any>undefined;
25392
+ return data;
25393
+ }
25394
+ }
25395
+
25396
+ export interface IMachineUtilizationV3Dto {
25397
+ id?: number;
25398
+ name: string;
25399
+ description?: string | null;
25400
+ utilization: UtilizationDetailsV2Dto;
25401
+ }
25402
+
25403
+ export class CrossCompanyUtilizationDto implements ICrossCompanyUtilizationDto {
25404
+ utilizationType!: UtilizationTypeDto;
25405
+ crossCompanyUtilization!: UtilizationDetailsV2Dto;
25406
+ companies!: CompanyUtilizationDto[];
25407
+
25408
+ constructor(data?: ICrossCompanyUtilizationDto) {
25409
+ if (data) {
25410
+ for (var property in data) {
25411
+ if (data.hasOwnProperty(property))
25412
+ (<any>this)[property] = (<any>data)[property];
25413
+ }
25414
+ }
25415
+ if (!data) {
25416
+ this.crossCompanyUtilization = new UtilizationDetailsV2Dto();
25417
+ this.companies = [];
25418
+ }
25419
+ }
25420
+
25421
+ init(_data?: any) {
25422
+ if (_data) {
25423
+ this.utilizationType = _data["utilizationType"];
25424
+ this.crossCompanyUtilization = _data["crossCompanyUtilization"] ? UtilizationDetailsV2Dto.fromJS(_data["crossCompanyUtilization"]) : new UtilizationDetailsV2Dto();
25425
+ if (Array.isArray(_data["companies"])) {
25426
+ this.companies = [] as any;
25427
+ for (let item of _data["companies"])
25428
+ this.companies!.push(CompanyUtilizationDto.fromJS(item));
25429
+ }
25430
+ }
25431
+ }
25432
+
25433
+ static fromJS(data: any): CrossCompanyUtilizationDto {
25434
+ data = typeof data === 'object' ? data : {};
25435
+ let result = new CrossCompanyUtilizationDto();
25436
+ result.init(data);
25437
+ return result;
25438
+ }
25439
+
25440
+ toJSON(data?: any) {
25441
+ data = typeof data === 'object' ? data : {};
25442
+ data["utilizationType"] = this.utilizationType;
25443
+ data["crossCompanyUtilization"] = this.crossCompanyUtilization ? this.crossCompanyUtilization.toJSON() : <any>undefined;
25444
+ if (Array.isArray(this.companies)) {
25445
+ data["companies"] = [];
25446
+ for (let item of this.companies)
25447
+ data["companies"].push(item.toJSON());
25448
+ }
25449
+ return data;
25450
+ }
25451
+ }
25452
+
25453
+ export interface ICrossCompanyUtilizationDto {
25454
+ utilizationType: UtilizationTypeDto;
25455
+ crossCompanyUtilization: UtilizationDetailsV2Dto;
25456
+ companies: CompanyUtilizationDto[];
25457
+ }
25458
+
25459
+ export class UtilizationDatapointListDto implements IUtilizationDatapointListDto {
25460
+ datapoints?: NumericNullableValueWithTimestamp[];
25461
+
25462
+ constructor(data?: IUtilizationDatapointListDto) {
25463
+ if (data) {
25464
+ for (var property in data) {
25465
+ if (data.hasOwnProperty(property))
25466
+ (<any>this)[property] = (<any>data)[property];
25467
+ }
25468
+ }
25469
+ }
25470
+
25471
+ init(_data?: any) {
25472
+ if (_data) {
25473
+ if (Array.isArray(_data["datapoints"])) {
25474
+ this.datapoints = [] as any;
25475
+ for (let item of _data["datapoints"])
25476
+ this.datapoints!.push(NumericNullableValueWithTimestamp.fromJS(item));
25477
+ }
25478
+ }
25479
+ }
25480
+
25481
+ static fromJS(data: any): UtilizationDatapointListDto {
25482
+ data = typeof data === 'object' ? data : {};
25483
+ let result = new UtilizationDatapointListDto();
25484
+ result.init(data);
25485
+ return result;
25486
+ }
25487
+
25488
+ toJSON(data?: any) {
25489
+ data = typeof data === 'object' ? data : {};
25490
+ if (Array.isArray(this.datapoints)) {
25491
+ data["datapoints"] = [];
25492
+ for (let item of this.datapoints)
25493
+ data["datapoints"].push(item.toJSON());
25494
+ }
25495
+ return data;
25496
+ }
25497
+ }
25498
+
25499
+ export interface IUtilizationDatapointListDto {
25500
+ datapoints?: NumericNullableValueWithTimestamp[];
25501
+ }
25502
+
25503
+ export class MachineUtilizationDatapointListDto extends UtilizationDatapointListDto implements IMachineUtilizationDatapointListDto {
25504
+ externalId!: string;
25505
+ id!: number;
25506
+ name!: string;
25507
+ description?: string | null;
25508
+
25509
+ constructor(data?: IMachineUtilizationDatapointListDto) {
25510
+ super(data);
25511
+ }
25512
+
25513
+ override init(_data?: any) {
25514
+ super.init(_data);
25515
+ if (_data) {
25516
+ this.externalId = _data["externalId"];
25517
+ this.id = _data["id"];
25518
+ this.name = _data["name"];
25519
+ this.description = _data["description"];
25520
+ }
25521
+ }
25522
+
25523
+ static override fromJS(data: any): MachineUtilizationDatapointListDto {
25524
+ data = typeof data === 'object' ? data : {};
25525
+ let result = new MachineUtilizationDatapointListDto();
25526
+ result.init(data);
25527
+ return result;
25528
+ }
25529
+
25530
+ override toJSON(data?: any) {
25531
+ data = typeof data === 'object' ? data : {};
25532
+ data["externalId"] = this.externalId;
25533
+ data["id"] = this.id;
25534
+ data["name"] = this.name;
25535
+ data["description"] = this.description;
25536
+ super.toJSON(data);
25537
+ return data;
25538
+ }
25539
+ }
25540
+
25541
+ export interface IMachineUtilizationDatapointListDto extends IUtilizationDatapointListDto {
25542
+ externalId: string;
25543
+ id: number;
25544
+ name: string;
25545
+ description?: string | null;
25546
+ }
25547
+
25548
+ export class CompanyUtilizationDatapointListDto extends UtilizationDatapointListDto implements ICompanyUtilizationDatapointListDto {
25549
+ companyId?: string | null;
25550
+ companyName?: string | null;
25551
+
25552
+ constructor(data?: ICompanyUtilizationDatapointListDto) {
25553
+ super(data);
25554
+ }
25555
+
25556
+ override init(_data?: any) {
25557
+ super.init(_data);
25558
+ if (_data) {
25559
+ this.companyId = _data["companyId"];
25560
+ this.companyName = _data["companyName"];
25561
+ }
25562
+ }
25563
+
25564
+ static override fromJS(data: any): CompanyUtilizationDatapointListDto {
25565
+ data = typeof data === 'object' ? data : {};
25566
+ let result = new CompanyUtilizationDatapointListDto();
25567
+ result.init(data);
25568
+ return result;
25569
+ }
25570
+
25571
+ override toJSON(data?: any) {
25572
+ data = typeof data === 'object' ? data : {};
25573
+ data["companyId"] = this.companyId;
25574
+ data["companyName"] = this.companyName;
25575
+ super.toJSON(data);
25576
+ return data;
25577
+ }
25578
+ }
25579
+
25580
+ export interface ICompanyUtilizationDatapointListDto extends IUtilizationDatapointListDto {
25581
+ companyId?: string | null;
25582
+ companyName?: string | null;
25583
+ }
25584
+
25585
+ export class CrossCompanyUtilizationDatapointListDto implements ICrossCompanyUtilizationDatapointListDto {
25586
+ companies?: CompanyUtilizationDatapointListDto[];
25587
+
25588
+ constructor(data?: ICrossCompanyUtilizationDatapointListDto) {
25589
+ if (data) {
25590
+ for (var property in data) {
25591
+ if (data.hasOwnProperty(property))
25592
+ (<any>this)[property] = (<any>data)[property];
25593
+ }
25594
+ }
25595
+ }
25596
+
25597
+ init(_data?: any) {
25598
+ if (_data) {
25599
+ if (Array.isArray(_data["companies"])) {
25600
+ this.companies = [] as any;
25601
+ for (let item of _data["companies"])
25602
+ this.companies!.push(CompanyUtilizationDatapointListDto.fromJS(item));
25603
+ }
25604
+ }
25605
+ }
25606
+
25607
+ static fromJS(data: any): CrossCompanyUtilizationDatapointListDto {
25608
+ data = typeof data === 'object' ? data : {};
25609
+ let result = new CrossCompanyUtilizationDatapointListDto();
25610
+ result.init(data);
25611
+ return result;
25612
+ }
25613
+
25614
+ toJSON(data?: any) {
25615
+ data = typeof data === 'object' ? data : {};
25616
+ if (Array.isArray(this.companies)) {
25617
+ data["companies"] = [];
25618
+ for (let item of this.companies)
25619
+ data["companies"].push(item.toJSON());
25620
+ }
25621
+ return data;
25622
+ }
25623
+ }
25624
+
25625
+ export interface ICrossCompanyUtilizationDatapointListDto {
25626
+ companies?: CompanyUtilizationDatapointListDto[];
25627
+ }
25628
+
25629
+ export class MrbInstanceDto implements IMrbInstanceDto {
25630
+ id!: string;
25631
+ title?: string | null;
25632
+ customerId?: string | null;
25633
+ customerName?: string | null;
25634
+ customerOrder!: string;
25635
+ customerOrderLine!: number;
25636
+ externalOrderNumber?: string | null;
25637
+ traces!: CustomerOrderLineTraceItemDto[];
25638
+ mrbTemplateId?: string | null;
25639
+ mrbTemplateName?: string | null;
25640
+ mrbJobId?: string | null;
25641
+ mrbExportJobId?: string | null;
25642
+ status?: MrbStatusDto | null;
25643
+ latestRevision?: MrbInstanceRevisionDto | null;
25644
+ part?: MrbPartDto | null;
25645
+
25646
+ constructor(data?: IMrbInstanceDto) {
25647
+ if (data) {
25648
+ for (var property in data) {
25649
+ if (data.hasOwnProperty(property))
25650
+ (<any>this)[property] = (<any>data)[property];
25651
+ }
25652
+ }
25653
+ if (!data) {
25654
+ this.traces = [];
25655
+ }
25656
+ }
25657
+
25658
+ init(_data?: any) {
25659
+ if (_data) {
25660
+ this.id = _data["id"];
25661
+ this.title = _data["title"];
25662
+ this.customerId = _data["customerId"];
25663
+ this.customerName = _data["customerName"];
25664
+ this.customerOrder = _data["customerOrder"];
25665
+ this.customerOrderLine = _data["customerOrderLine"];
25666
+ this.externalOrderNumber = _data["externalOrderNumber"];
25667
+ if (Array.isArray(_data["traces"])) {
25668
+ this.traces = [] as any;
25669
+ for (let item of _data["traces"])
25670
+ this.traces!.push(CustomerOrderLineTraceItemDto.fromJS(item));
25671
+ }
25672
+ this.mrbTemplateId = _data["mrbTemplateId"];
25673
+ this.mrbTemplateName = _data["mrbTemplateName"];
25674
+ this.mrbJobId = _data["mrbJobId"];
25675
+ this.mrbExportJobId = _data["mrbExportJobId"];
25676
+ this.status = _data["status"] ? MrbStatusDto.fromJS(_data["status"]) : <any>undefined;
25677
+ this.latestRevision = _data["latestRevision"] ? MrbInstanceRevisionDto.fromJS(_data["latestRevision"]) : <any>undefined;
25678
+ this.part = _data["part"] ? MrbPartDto.fromJS(_data["part"]) : <any>undefined;
25679
+ }
25680
+ }
25681
+
25682
+ static fromJS(data: any): MrbInstanceDto {
25683
+ data = typeof data === 'object' ? data : {};
25684
+ let result = new MrbInstanceDto();
25685
+ result.init(data);
25686
+ return result;
25687
+ }
25688
+
25689
+ toJSON(data?: any) {
25690
+ data = typeof data === 'object' ? data : {};
25691
+ data["id"] = this.id;
25692
+ data["title"] = this.title;
25693
+ data["customerId"] = this.customerId;
25694
+ data["customerName"] = this.customerName;
25695
+ data["customerOrder"] = this.customerOrder;
25696
+ data["customerOrderLine"] = this.customerOrderLine;
25697
+ data["externalOrderNumber"] = this.externalOrderNumber;
25698
+ if (Array.isArray(this.traces)) {
25699
+ data["traces"] = [];
25700
+ for (let item of this.traces)
25701
+ data["traces"].push(item.toJSON());
25702
+ }
25703
+ data["mrbTemplateId"] = this.mrbTemplateId;
25704
+ data["mrbTemplateName"] = this.mrbTemplateName;
25705
+ data["mrbJobId"] = this.mrbJobId;
25706
+ data["mrbExportJobId"] = this.mrbExportJobId;
25008
25707
  data["status"] = this.status ? this.status.toJSON() : <any>undefined;
25009
25708
  data["latestRevision"] = this.latestRevision ? this.latestRevision.toJSON() : <any>undefined;
25010
25709
  data["part"] = this.part ? this.part.toJSON() : <any>undefined;
@@ -30844,7 +31543,7 @@ export class CalenderCapacityDto implements ICalenderCapacityDto {
30844
31543
 
30845
31544
  toJSON(data?: any) {
30846
31545
  data = typeof data === 'object' ? data : {};
30847
- data["date"] = this.date ? formatDate(this.date) : <any>undefined;
31546
+ data["date"] = this.date ? this.date.toISOString() : <any>undefined;
30848
31547
  data["dayCapacity"] = this.dayCapacity;
30849
31548
  return data;
30850
31549
  }
@@ -30858,8 +31557,8 @@ export interface ICalenderCapacityDto {
30858
31557
  export type CalenderDayCapacityDto = "WorkingDay" | "HalfDay" | "Holiday";
30859
31558
 
30860
31559
  export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
30861
- date!: Date;
30862
- dayCapacity!: CalenderDayCapacityDto;
31560
+ date?: Date;
31561
+ dayCapacity?: CalenderDayCapacityDto;
30863
31562
 
30864
31563
  constructor(data?: IUpdateCalenderCapacity) {
30865
31564
  if (data) {
@@ -30886,15 +31585,15 @@ export class UpdateCalenderCapacity implements IUpdateCalenderCapacity {
30886
31585
 
30887
31586
  toJSON(data?: any) {
30888
31587
  data = typeof data === 'object' ? data : {};
30889
- data["date"] = this.date ? formatDate(this.date) : <any>undefined;
31588
+ data["date"] = this.date ? this.date.toISOString() : <any>undefined;
30890
31589
  data["dayCapacity"] = this.dayCapacity;
30891
31590
  return data;
30892
31591
  }
30893
31592
  }
30894
31593
 
30895
31594
  export interface IUpdateCalenderCapacity {
30896
- date: Date;
30897
- dayCapacity: CalenderDayCapacityDto;
31595
+ date?: Date;
31596
+ dayCapacity?: CalenderDayCapacityDto;
30898
31597
  }
30899
31598
 
30900
31599
  export class MachineDto implements IMachineDto {