@ignos/api-client 20251009.0.12796-alpha → 20251009.0.12798-alpha

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.
@@ -365,6 +365,7 @@ export declare class SustainabilityClient extends AuthorizedApiBase implements I
365
365
  }
366
366
  export interface IMachineAlarmsClient {
367
367
  listMachineAlarms(alarmType: MachineAlarmType | null | undefined, assetId: number | undefined, startTime: Date | undefined, endTime: Date | null | undefined, subType: string | null | undefined, nativeCode: string | null | undefined, nativeSeverity: number | null | undefined, name: string | null | undefined, sequence: string | null | undefined, limit: number | undefined, continuationToken: string | null | undefined, orderBy: string | null | undefined, sortDirection: string | null | undefined): Promise<PagedResultOfMachineAlarmDto>;
368
+ listGroupedMachineIncidents(request: ListGroupedMachineIncidentsRequest): Promise<PagedResultOfGroupedMachineIncidentDto>;
368
369
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
369
370
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
370
371
  countMachineAlarms(alarmType: MachineAlarmType | null | undefined, assetId: number | undefined, startTime: Date | undefined, endTime: Date | null | undefined, subType: string | null | undefined, nativeCode: string | null | undefined, nativeSeverity: number | null | undefined, name: string | null | undefined, sequence: string | null | undefined): Promise<MachineAlarmCountDto>;
@@ -379,6 +380,8 @@ export declare class MachineAlarmsClient extends AuthorizedApiBase implements IM
379
380
  });
380
381
  listMachineAlarms(alarmType: MachineAlarmType | null | undefined, assetId: number | undefined, startTime: Date | undefined, endTime: Date | null | undefined, subType: string | null | undefined, nativeCode: string | null | undefined, nativeSeverity: number | null | undefined, name: string | null | undefined, sequence: string | null | undefined, limit: number | undefined, continuationToken: string | null | undefined, orderBy: string | null | undefined, sortDirection: string | null | undefined): Promise<PagedResultOfMachineAlarmDto>;
381
382
  protected processListMachineAlarms(response: Response): Promise<PagedResultOfMachineAlarmDto>;
383
+ listGroupedMachineIncidents(request: ListGroupedMachineIncidentsRequest): Promise<PagedResultOfGroupedMachineIncidentDto>;
384
+ protected processListGroupedMachineIncidents(response: Response): Promise<PagedResultOfGroupedMachineIncidentDto>;
382
385
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
383
386
  protected processListAlarmsPerMachine(response: Response): Promise<MachineAlarmSummaryDto[]>;
384
387
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
@@ -2345,7 +2348,6 @@ export interface IMeasurementFormsInstancesClient {
2345
2348
  postListMeasurementForms(request: ListMeasurementFormsRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceOverviewDto>;
2346
2349
  listMeasurementFormsByStatus(status: MeasurementFormInstanceStatus | undefined, statusChangedSince: Date | null | undefined, onlyWithReports: boolean | null | undefined, pageSize: number | undefined, search: string | null | undefined, continuationToken: string | null | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
2347
2350
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
2348
- deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse>;
2349
2351
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto>;
2350
2352
  createMeasurementFormInstance(id: string): Promise<MeasurementFormInstanceDto>;
2351
2353
  updateMeasurementFormInstance(id: string, request: UpdateMeasurementFormInstanceRequest): Promise<MeasurementFormInstanceDto>;
@@ -2392,8 +2394,6 @@ export declare class MeasurementFormsInstancesClient extends AuthorizedApiBase i
2392
2394
  protected processListMeasurementFormsByStatus(response: Response): Promise<PagedResultOfMeasurementFormInstanceDto>;
2393
2395
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
2394
2396
  protected processPostListMeasurementFormsByStatus(response: Response): Promise<PagedResultOfMeasurementFormInstanceDto>;
2395
- deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse>;
2396
- protected processDeleteInstancesBulk(response: Response): Promise<FileResponse>;
2397
2397
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto>;
2398
2398
  protected processGetMeasurementFormInstance(response: Response): Promise<MeasurementFormInstanceDto>;
2399
2399
  createMeasurementFormInstance(id: string): Promise<MeasurementFormInstanceDto>;
@@ -3073,8 +3073,6 @@ export interface IMachineStateDatapoint {
3073
3073
  export declare class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
3074
3074
  id: number;
3075
3075
  reason: string;
3076
- parentReasonId?: string | null;
3077
- parentReason?: string | null;
3078
3076
  reasonType: DowntimeReasonTypeDto;
3079
3077
  startTime: Date;
3080
3078
  endTime?: Date | null;
@@ -3093,8 +3091,6 @@ export declare class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto
3093
3091
  export interface IDowntimePeriodReasonDto {
3094
3092
  id: number;
3095
3093
  reason: string;
3096
- parentReasonId?: string | null;
3097
- parentReason?: string | null;
3098
3094
  reasonType: DowntimeReasonTypeDto;
3099
3095
  startTime: Date;
3100
3096
  endTime?: Date | null;
@@ -3744,6 +3740,50 @@ export interface IMachineAlarmDto {
3744
3740
  endTime?: Date | null;
3745
3741
  }
3746
3742
  export type MachineAlarmType = "Fault" | "Warning";
3743
+ export declare class PagedResultOfGroupedMachineIncidentDto implements IPagedResultOfGroupedMachineIncidentDto {
3744
+ results: GroupedMachineIncidentDto[];
3745
+ continuationToken?: string | null;
3746
+ constructor(data?: IPagedResultOfGroupedMachineIncidentDto);
3747
+ init(_data?: any): void;
3748
+ static fromJS(data: any): PagedResultOfGroupedMachineIncidentDto;
3749
+ toJSON(data?: any): any;
3750
+ }
3751
+ export interface IPagedResultOfGroupedMachineIncidentDto {
3752
+ results: GroupedMachineIncidentDto[];
3753
+ continuationToken?: string | null;
3754
+ }
3755
+ export declare class GroupedMachineIncidentDto extends MachineAlarmDto implements IGroupedMachineIncidentDto {
3756
+ incidents: MachineAlarmDto[];
3757
+ constructor(data?: IGroupedMachineIncidentDto);
3758
+ init(_data?: any): void;
3759
+ static fromJS(data: any): GroupedMachineIncidentDto;
3760
+ toJSON(data?: any): any;
3761
+ }
3762
+ export interface IGroupedMachineIncidentDto extends IMachineAlarmDto {
3763
+ incidents: MachineAlarmDto[];
3764
+ }
3765
+ export declare class ListGroupedMachineIncidentsRequest implements IListGroupedMachineIncidentsRequest {
3766
+ assetId: number;
3767
+ startTime: Date;
3768
+ endTime?: Date | null;
3769
+ nativeCode?: string | null;
3770
+ alarmType?: MachineAlarmType | null;
3771
+ limit?: number | null;
3772
+ continuationToken?: string | null;
3773
+ constructor(data?: IListGroupedMachineIncidentsRequest);
3774
+ init(_data?: any): void;
3775
+ static fromJS(data: any): ListGroupedMachineIncidentsRequest;
3776
+ toJSON(data?: any): any;
3777
+ }
3778
+ export interface IListGroupedMachineIncidentsRequest {
3779
+ assetId: number;
3780
+ startTime: Date;
3781
+ endTime?: Date | null;
3782
+ nativeCode?: string | null;
3783
+ alarmType?: MachineAlarmType | null;
3784
+ limit?: number | null;
3785
+ continuationToken?: string | null;
3786
+ }
3747
3787
  export declare class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
3748
3788
  assetId: number;
3749
3789
  assetName: string;
@@ -13284,16 +13324,6 @@ export interface IMeasurementFormWorkorderSupplierDto {
13284
13324
  procurementLine?: number | null;
13285
13325
  externalOrderNumber?: string | null;
13286
13326
  }
13287
- export declare class DeleteMeasurementFormsInstancesBulkRequest implements IDeleteMeasurementFormsInstancesBulkRequest {
13288
- ids: string[];
13289
- constructor(data?: IDeleteMeasurementFormsInstancesBulkRequest);
13290
- init(_data?: any): void;
13291
- static fromJS(data: any): DeleteMeasurementFormsInstancesBulkRequest;
13292
- toJSON(data?: any): any;
13293
- }
13294
- export interface IDeleteMeasurementFormsInstancesBulkRequest {
13295
- ids: string[];
13296
- }
13297
13327
  export declare class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
13298
13328
  status?: MeasurementFormInstanceStatus | null;
13299
13329
  statusChangedSince?: Date | null;
@@ -2091,6 +2091,46 @@ export class MachineAlarmsClient extends AuthorizedApiBase {
2091
2091
  }
2092
2092
  return Promise.resolve(null);
2093
2093
  }
2094
+ listGroupedMachineIncidents(request) {
2095
+ let url_ = this.baseUrl + "/machinealarms/groupedincidents";
2096
+ url_ = url_.replace(/[?&]$/, "");
2097
+ const content_ = JSON.stringify(request);
2098
+ let options_ = {
2099
+ body: content_,
2100
+ method: "POST",
2101
+ headers: {
2102
+ "Content-Type": "application/json",
2103
+ "Accept": "application/json"
2104
+ }
2105
+ };
2106
+ return this.transformOptions(options_).then(transformedOptions_ => {
2107
+ return this.http.fetch(url_, transformedOptions_);
2108
+ }).then((_response) => {
2109
+ return this.processListGroupedMachineIncidents(_response);
2110
+ });
2111
+ }
2112
+ processListGroupedMachineIncidents(response) {
2113
+ const status = response.status;
2114
+ let _headers = {};
2115
+ if (response.headers && response.headers.forEach) {
2116
+ response.headers.forEach((v, k) => _headers[k] = v);
2117
+ }
2118
+ ;
2119
+ if (status === 200) {
2120
+ return response.text().then((_responseText) => {
2121
+ let result200 = null;
2122
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2123
+ result200 = PagedResultOfGroupedMachineIncidentDto.fromJS(resultData200);
2124
+ return result200;
2125
+ });
2126
+ }
2127
+ else if (status !== 200 && status !== 204) {
2128
+ return response.text().then((_responseText) => {
2129
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2130
+ });
2131
+ }
2132
+ return Promise.resolve(null);
2133
+ }
2094
2134
  listAlarmsPerMachine(startTime, endTime) {
2095
2135
  let url_ = this.baseUrl + "/machinealarms/alarmspermachine?";
2096
2136
  if (startTime === null)
@@ -20298,51 +20338,6 @@ export class MeasurementFormsInstancesClient extends AuthorizedApiBase {
20298
20338
  }
20299
20339
  return Promise.resolve(null);
20300
20340
  }
20301
- deleteInstancesBulk(request) {
20302
- let url_ = this.baseUrl + "/measurementforms/instances/bulkdelete";
20303
- url_ = url_.replace(/[?&]$/, "");
20304
- const content_ = JSON.stringify(request);
20305
- let options_ = {
20306
- body: content_,
20307
- method: "DELETE",
20308
- headers: {
20309
- "Content-Type": "application/json",
20310
- "Accept": "application/octet-stream"
20311
- }
20312
- };
20313
- return this.transformOptions(options_).then(transformedOptions_ => {
20314
- return this.http.fetch(url_, transformedOptions_);
20315
- }).then((_response) => {
20316
- return this.processDeleteInstancesBulk(_response);
20317
- });
20318
- }
20319
- processDeleteInstancesBulk(response) {
20320
- const status = response.status;
20321
- let _headers = {};
20322
- if (response.headers && response.headers.forEach) {
20323
- response.headers.forEach((v, k) => _headers[k] = v);
20324
- }
20325
- ;
20326
- if (status === 200 || status === 206) {
20327
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
20328
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
20329
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
20330
- if (fileName) {
20331
- fileName = decodeURIComponent(fileName);
20332
- }
20333
- else {
20334
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
20335
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
20336
- }
20337
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
20338
- }
20339
- else if (status !== 200 && status !== 204) {
20340
- return response.text().then((_responseText) => {
20341
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20342
- });
20343
- }
20344
- return Promise.resolve(null);
20345
- }
20346
20341
  getMeasurementFormInstance(id, tenantId) {
20347
20342
  let url_ = this.baseUrl + "/measurementforms/instances/{id}?";
20348
20343
  if (id === undefined || id === null)
@@ -24003,8 +23998,6 @@ export class DowntimePeriodReasonDto {
24003
23998
  if (_data) {
24004
23999
  this.id = _data["id"];
24005
24000
  this.reason = _data["reason"];
24006
- this.parentReasonId = _data["parentReasonId"];
24007
- this.parentReason = _data["parentReason"];
24008
24001
  this.reasonType = _data["reasonType"];
24009
24002
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
24010
24003
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
@@ -24027,8 +24020,6 @@ export class DowntimePeriodReasonDto {
24027
24020
  data = typeof data === 'object' ? data : {};
24028
24021
  data["id"] = this.id;
24029
24022
  data["reason"] = this.reason;
24030
- data["parentReasonId"] = this.parentReasonId;
24031
- data["parentReason"] = this.parentReason;
24032
24023
  data["reasonType"] = this.reasonType;
24033
24024
  data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
24034
24025
  data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
@@ -25467,6 +25458,117 @@ export class MachineAlarmDto {
25467
25458
  return data;
25468
25459
  }
25469
25460
  }
25461
+ export class PagedResultOfGroupedMachineIncidentDto {
25462
+ constructor(data) {
25463
+ if (data) {
25464
+ for (var property in data) {
25465
+ if (data.hasOwnProperty(property))
25466
+ this[property] = data[property];
25467
+ }
25468
+ }
25469
+ if (!data) {
25470
+ this.results = [];
25471
+ }
25472
+ }
25473
+ init(_data) {
25474
+ if (_data) {
25475
+ if (Array.isArray(_data["results"])) {
25476
+ this.results = [];
25477
+ for (let item of _data["results"])
25478
+ this.results.push(GroupedMachineIncidentDto.fromJS(item));
25479
+ }
25480
+ this.continuationToken = _data["continuationToken"];
25481
+ }
25482
+ }
25483
+ static fromJS(data) {
25484
+ data = typeof data === 'object' ? data : {};
25485
+ let result = new PagedResultOfGroupedMachineIncidentDto();
25486
+ result.init(data);
25487
+ return result;
25488
+ }
25489
+ toJSON(data) {
25490
+ data = typeof data === 'object' ? data : {};
25491
+ if (Array.isArray(this.results)) {
25492
+ data["results"] = [];
25493
+ for (let item of this.results)
25494
+ data["results"].push(item.toJSON());
25495
+ }
25496
+ data["continuationToken"] = this.continuationToken;
25497
+ return data;
25498
+ }
25499
+ }
25500
+ export class GroupedMachineIncidentDto extends MachineAlarmDto {
25501
+ constructor(data) {
25502
+ super(data);
25503
+ if (!data) {
25504
+ this.incidents = [];
25505
+ }
25506
+ }
25507
+ init(_data) {
25508
+ super.init(_data);
25509
+ if (_data) {
25510
+ if (Array.isArray(_data["incidents"])) {
25511
+ this.incidents = [];
25512
+ for (let item of _data["incidents"])
25513
+ this.incidents.push(MachineAlarmDto.fromJS(item));
25514
+ }
25515
+ }
25516
+ }
25517
+ static fromJS(data) {
25518
+ data = typeof data === 'object' ? data : {};
25519
+ let result = new GroupedMachineIncidentDto();
25520
+ result.init(data);
25521
+ return result;
25522
+ }
25523
+ toJSON(data) {
25524
+ data = typeof data === 'object' ? data : {};
25525
+ if (Array.isArray(this.incidents)) {
25526
+ data["incidents"] = [];
25527
+ for (let item of this.incidents)
25528
+ data["incidents"].push(item.toJSON());
25529
+ }
25530
+ super.toJSON(data);
25531
+ return data;
25532
+ }
25533
+ }
25534
+ export class ListGroupedMachineIncidentsRequest {
25535
+ constructor(data) {
25536
+ if (data) {
25537
+ for (var property in data) {
25538
+ if (data.hasOwnProperty(property))
25539
+ this[property] = data[property];
25540
+ }
25541
+ }
25542
+ }
25543
+ init(_data) {
25544
+ if (_data) {
25545
+ this.assetId = _data["assetId"];
25546
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
25547
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
25548
+ this.nativeCode = _data["nativeCode"];
25549
+ this.alarmType = _data["alarmType"];
25550
+ this.limit = _data["limit"];
25551
+ this.continuationToken = _data["continuationToken"];
25552
+ }
25553
+ }
25554
+ static fromJS(data) {
25555
+ data = typeof data === 'object' ? data : {};
25556
+ let result = new ListGroupedMachineIncidentsRequest();
25557
+ result.init(data);
25558
+ return result;
25559
+ }
25560
+ toJSON(data) {
25561
+ data = typeof data === 'object' ? data : {};
25562
+ data["assetId"] = this.assetId;
25563
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
25564
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
25565
+ data["nativeCode"] = this.nativeCode;
25566
+ data["alarmType"] = this.alarmType;
25567
+ data["limit"] = this.limit;
25568
+ data["continuationToken"] = this.continuationToken;
25569
+ return data;
25570
+ }
25571
+ }
25470
25572
  export class MachineAlarmSummaryDto {
25471
25573
  constructor(data) {
25472
25574
  if (data) {
@@ -44957,43 +45059,6 @@ export class MeasurementFormWorkorderSupplierDto {
44957
45059
  return data;
44958
45060
  }
44959
45061
  }
44960
- export class DeleteMeasurementFormsInstancesBulkRequest {
44961
- constructor(data) {
44962
- if (data) {
44963
- for (var property in data) {
44964
- if (data.hasOwnProperty(property))
44965
- this[property] = data[property];
44966
- }
44967
- }
44968
- if (!data) {
44969
- this.ids = [];
44970
- }
44971
- }
44972
- init(_data) {
44973
- if (_data) {
44974
- if (Array.isArray(_data["ids"])) {
44975
- this.ids = [];
44976
- for (let item of _data["ids"])
44977
- this.ids.push(item);
44978
- }
44979
- }
44980
- }
44981
- static fromJS(data) {
44982
- data = typeof data === 'object' ? data : {};
44983
- let result = new DeleteMeasurementFormsInstancesBulkRequest();
44984
- result.init(data);
44985
- return result;
44986
- }
44987
- toJSON(data) {
44988
- data = typeof data === 'object' ? data : {};
44989
- if (Array.isArray(this.ids)) {
44990
- data["ids"] = [];
44991
- for (let item of this.ids)
44992
- data["ids"].push(item);
44993
- }
44994
- return data;
44995
- }
44996
- }
44997
45062
  export class ListMeasurementFormsByStatusRequest {
44998
45063
  constructor(data) {
44999
45064
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20251009.0.12796-alpha",
3
+ "version": "20251009.0.12798-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -2228,6 +2228,8 @@ export interface IMachineAlarmsClient {
2228
2228
 
2229
2229
  listMachineAlarms(alarmType: MachineAlarmType | null | undefined, assetId: number | undefined, startTime: Date | undefined, endTime: Date | null | undefined, subType: string | null | undefined, nativeCode: string | null | undefined, nativeSeverity: number | null | undefined, name: string | null | undefined, sequence: string | null | undefined, limit: number | undefined, continuationToken: string | null | undefined, orderBy: string | null | undefined, sortDirection: string | null | undefined): Promise<PagedResultOfMachineAlarmDto>;
2230
2230
 
2231
+ listGroupedMachineIncidents(request: ListGroupedMachineIncidentsRequest): Promise<PagedResultOfGroupedMachineIncidentDto>;
2232
+
2231
2233
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
2232
2234
 
2233
2235
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
@@ -2316,6 +2318,46 @@ export class MachineAlarmsClient extends AuthorizedApiBase implements IMachineAl
2316
2318
  return Promise.resolve<PagedResultOfMachineAlarmDto>(null as any);
2317
2319
  }
2318
2320
 
2321
+ listGroupedMachineIncidents(request: ListGroupedMachineIncidentsRequest): Promise<PagedResultOfGroupedMachineIncidentDto> {
2322
+ let url_ = this.baseUrl + "/machinealarms/groupedincidents";
2323
+ url_ = url_.replace(/[?&]$/, "");
2324
+
2325
+ const content_ = JSON.stringify(request);
2326
+
2327
+ let options_: RequestInit = {
2328
+ body: content_,
2329
+ method: "POST",
2330
+ headers: {
2331
+ "Content-Type": "application/json",
2332
+ "Accept": "application/json"
2333
+ }
2334
+ };
2335
+
2336
+ return this.transformOptions(options_).then(transformedOptions_ => {
2337
+ return this.http.fetch(url_, transformedOptions_);
2338
+ }).then((_response: Response) => {
2339
+ return this.processListGroupedMachineIncidents(_response);
2340
+ });
2341
+ }
2342
+
2343
+ protected processListGroupedMachineIncidents(response: Response): Promise<PagedResultOfGroupedMachineIncidentDto> {
2344
+ const status = response.status;
2345
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
2346
+ if (status === 200) {
2347
+ return response.text().then((_responseText) => {
2348
+ let result200: any = null;
2349
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2350
+ result200 = PagedResultOfGroupedMachineIncidentDto.fromJS(resultData200);
2351
+ return result200;
2352
+ });
2353
+ } else if (status !== 200 && status !== 204) {
2354
+ return response.text().then((_responseText) => {
2355
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2356
+ });
2357
+ }
2358
+ return Promise.resolve<PagedResultOfGroupedMachineIncidentDto>(null as any);
2359
+ }
2360
+
2319
2361
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]> {
2320
2362
  let url_ = this.baseUrl + "/machinealarms/alarmspermachine?";
2321
2363
  if (startTime === null)
@@ -21432,8 +21474,6 @@ export interface IMeasurementFormsInstancesClient {
21432
21474
 
21433
21475
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
21434
21476
 
21435
- deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse>;
21436
-
21437
21477
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto>;
21438
21478
 
21439
21479
  createMeasurementFormInstance(id: string): Promise<MeasurementFormInstanceDto>;
@@ -21685,50 +21725,6 @@ export class MeasurementFormsInstancesClient extends AuthorizedApiBase implement
21685
21725
  return Promise.resolve<PagedResultOfMeasurementFormInstanceDto>(null as any);
21686
21726
  }
21687
21727
 
21688
- deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse> {
21689
- let url_ = this.baseUrl + "/measurementforms/instances/bulkdelete";
21690
- url_ = url_.replace(/[?&]$/, "");
21691
-
21692
- const content_ = JSON.stringify(request);
21693
-
21694
- let options_: RequestInit = {
21695
- body: content_,
21696
- method: "DELETE",
21697
- headers: {
21698
- "Content-Type": "application/json",
21699
- "Accept": "application/octet-stream"
21700
- }
21701
- };
21702
-
21703
- return this.transformOptions(options_).then(transformedOptions_ => {
21704
- return this.http.fetch(url_, transformedOptions_);
21705
- }).then((_response: Response) => {
21706
- return this.processDeleteInstancesBulk(_response);
21707
- });
21708
- }
21709
-
21710
- protected processDeleteInstancesBulk(response: Response): Promise<FileResponse> {
21711
- const status = response.status;
21712
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
21713
- if (status === 200 || status === 206) {
21714
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
21715
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
21716
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
21717
- if (fileName) {
21718
- fileName = decodeURIComponent(fileName);
21719
- } else {
21720
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
21721
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
21722
- }
21723
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
21724
- } else if (status !== 200 && status !== 204) {
21725
- return response.text().then((_responseText) => {
21726
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
21727
- });
21728
- }
21729
- return Promise.resolve<FileResponse>(null as any);
21730
- }
21731
-
21732
21728
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto> {
21733
21729
  let url_ = this.baseUrl + "/measurementforms/instances/{id}?";
21734
21730
  if (id === undefined || id === null)
@@ -25817,8 +25813,6 @@ export interface IMachineStateDatapoint {
25817
25813
  export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25818
25814
  id!: number;
25819
25815
  reason!: string;
25820
- parentReasonId?: string | null;
25821
- parentReason?: string | null;
25822
25816
  reasonType!: DowntimeReasonTypeDto;
25823
25817
  startTime!: Date;
25824
25818
  endTime?: Date | null;
@@ -25843,8 +25837,6 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25843
25837
  if (_data) {
25844
25838
  this.id = _data["id"];
25845
25839
  this.reason = _data["reason"];
25846
- this.parentReasonId = _data["parentReasonId"];
25847
- this.parentReason = _data["parentReason"];
25848
25840
  this.reasonType = _data["reasonType"];
25849
25841
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
25850
25842
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
@@ -25869,8 +25861,6 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25869
25861
  data = typeof data === 'object' ? data : {};
25870
25862
  data["id"] = this.id;
25871
25863
  data["reason"] = this.reason;
25872
- data["parentReasonId"] = this.parentReasonId;
25873
- data["parentReason"] = this.parentReason;
25874
25864
  data["reasonType"] = this.reasonType;
25875
25865
  data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
25876
25866
  data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
@@ -25888,8 +25878,6 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25888
25878
  export interface IDowntimePeriodReasonDto {
25889
25879
  id: number;
25890
25880
  reason: string;
25891
- parentReasonId?: string | null;
25892
- parentReason?: string | null;
25893
25881
  reasonType: DowntimeReasonTypeDto;
25894
25882
  startTime: Date;
25895
25883
  endTime?: Date | null;
@@ -27963,6 +27951,161 @@ export interface IMachineAlarmDto {
27963
27951
 
27964
27952
  export type MachineAlarmType = "Fault" | "Warning";
27965
27953
 
27954
+ export class PagedResultOfGroupedMachineIncidentDto implements IPagedResultOfGroupedMachineIncidentDto {
27955
+ results!: GroupedMachineIncidentDto[];
27956
+ continuationToken?: string | null;
27957
+
27958
+ constructor(data?: IPagedResultOfGroupedMachineIncidentDto) {
27959
+ if (data) {
27960
+ for (var property in data) {
27961
+ if (data.hasOwnProperty(property))
27962
+ (<any>this)[property] = (<any>data)[property];
27963
+ }
27964
+ }
27965
+ if (!data) {
27966
+ this.results = [];
27967
+ }
27968
+ }
27969
+
27970
+ init(_data?: any) {
27971
+ if (_data) {
27972
+ if (Array.isArray(_data["results"])) {
27973
+ this.results = [] as any;
27974
+ for (let item of _data["results"])
27975
+ this.results!.push(GroupedMachineIncidentDto.fromJS(item));
27976
+ }
27977
+ this.continuationToken = _data["continuationToken"];
27978
+ }
27979
+ }
27980
+
27981
+ static fromJS(data: any): PagedResultOfGroupedMachineIncidentDto {
27982
+ data = typeof data === 'object' ? data : {};
27983
+ let result = new PagedResultOfGroupedMachineIncidentDto();
27984
+ result.init(data);
27985
+ return result;
27986
+ }
27987
+
27988
+ toJSON(data?: any) {
27989
+ data = typeof data === 'object' ? data : {};
27990
+ if (Array.isArray(this.results)) {
27991
+ data["results"] = [];
27992
+ for (let item of this.results)
27993
+ data["results"].push(item.toJSON());
27994
+ }
27995
+ data["continuationToken"] = this.continuationToken;
27996
+ return data;
27997
+ }
27998
+ }
27999
+
28000
+ export interface IPagedResultOfGroupedMachineIncidentDto {
28001
+ results: GroupedMachineIncidentDto[];
28002
+ continuationToken?: string | null;
28003
+ }
28004
+
28005
+ export class GroupedMachineIncidentDto extends MachineAlarmDto implements IGroupedMachineIncidentDto {
28006
+ incidents!: MachineAlarmDto[];
28007
+
28008
+ constructor(data?: IGroupedMachineIncidentDto) {
28009
+ super(data);
28010
+ if (!data) {
28011
+ this.incidents = [];
28012
+ }
28013
+ }
28014
+
28015
+ override init(_data?: any) {
28016
+ super.init(_data);
28017
+ if (_data) {
28018
+ if (Array.isArray(_data["incidents"])) {
28019
+ this.incidents = [] as any;
28020
+ for (let item of _data["incidents"])
28021
+ this.incidents!.push(MachineAlarmDto.fromJS(item));
28022
+ }
28023
+ }
28024
+ }
28025
+
28026
+ static override fromJS(data: any): GroupedMachineIncidentDto {
28027
+ data = typeof data === 'object' ? data : {};
28028
+ let result = new GroupedMachineIncidentDto();
28029
+ result.init(data);
28030
+ return result;
28031
+ }
28032
+
28033
+ override toJSON(data?: any) {
28034
+ data = typeof data === 'object' ? data : {};
28035
+ if (Array.isArray(this.incidents)) {
28036
+ data["incidents"] = [];
28037
+ for (let item of this.incidents)
28038
+ data["incidents"].push(item.toJSON());
28039
+ }
28040
+ super.toJSON(data);
28041
+ return data;
28042
+ }
28043
+ }
28044
+
28045
+ export interface IGroupedMachineIncidentDto extends IMachineAlarmDto {
28046
+ incidents: MachineAlarmDto[];
28047
+ }
28048
+
28049
+ export class ListGroupedMachineIncidentsRequest implements IListGroupedMachineIncidentsRequest {
28050
+ assetId!: number;
28051
+ startTime!: Date;
28052
+ endTime?: Date | null;
28053
+ nativeCode?: string | null;
28054
+ alarmType?: MachineAlarmType | null;
28055
+ limit?: number | null;
28056
+ continuationToken?: string | null;
28057
+
28058
+ constructor(data?: IListGroupedMachineIncidentsRequest) {
28059
+ if (data) {
28060
+ for (var property in data) {
28061
+ if (data.hasOwnProperty(property))
28062
+ (<any>this)[property] = (<any>data)[property];
28063
+ }
28064
+ }
28065
+ }
28066
+
28067
+ init(_data?: any) {
28068
+ if (_data) {
28069
+ this.assetId = _data["assetId"];
28070
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
28071
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
28072
+ this.nativeCode = _data["nativeCode"];
28073
+ this.alarmType = _data["alarmType"];
28074
+ this.limit = _data["limit"];
28075
+ this.continuationToken = _data["continuationToken"];
28076
+ }
28077
+ }
28078
+
28079
+ static fromJS(data: any): ListGroupedMachineIncidentsRequest {
28080
+ data = typeof data === 'object' ? data : {};
28081
+ let result = new ListGroupedMachineIncidentsRequest();
28082
+ result.init(data);
28083
+ return result;
28084
+ }
28085
+
28086
+ toJSON(data?: any) {
28087
+ data = typeof data === 'object' ? data : {};
28088
+ data["assetId"] = this.assetId;
28089
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
28090
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
28091
+ data["nativeCode"] = this.nativeCode;
28092
+ data["alarmType"] = this.alarmType;
28093
+ data["limit"] = this.limit;
28094
+ data["continuationToken"] = this.continuationToken;
28095
+ return data;
28096
+ }
28097
+ }
28098
+
28099
+ export interface IListGroupedMachineIncidentsRequest {
28100
+ assetId: number;
28101
+ startTime: Date;
28102
+ endTime?: Date | null;
28103
+ nativeCode?: string | null;
28104
+ alarmType?: MachineAlarmType | null;
28105
+ limit?: number | null;
28106
+ continuationToken?: string | null;
28107
+ }
28108
+
27966
28109
  export class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
27967
28110
  assetId!: number;
27968
28111
  assetName!: string;
@@ -57039,53 +57182,6 @@ export interface IMeasurementFormWorkorderSupplierDto {
57039
57182
  externalOrderNumber?: string | null;
57040
57183
  }
57041
57184
 
57042
- export class DeleteMeasurementFormsInstancesBulkRequest implements IDeleteMeasurementFormsInstancesBulkRequest {
57043
- ids!: string[];
57044
-
57045
- constructor(data?: IDeleteMeasurementFormsInstancesBulkRequest) {
57046
- if (data) {
57047
- for (var property in data) {
57048
- if (data.hasOwnProperty(property))
57049
- (<any>this)[property] = (<any>data)[property];
57050
- }
57051
- }
57052
- if (!data) {
57053
- this.ids = [];
57054
- }
57055
- }
57056
-
57057
- init(_data?: any) {
57058
- if (_data) {
57059
- if (Array.isArray(_data["ids"])) {
57060
- this.ids = [] as any;
57061
- for (let item of _data["ids"])
57062
- this.ids!.push(item);
57063
- }
57064
- }
57065
- }
57066
-
57067
- static fromJS(data: any): DeleteMeasurementFormsInstancesBulkRequest {
57068
- data = typeof data === 'object' ? data : {};
57069
- let result = new DeleteMeasurementFormsInstancesBulkRequest();
57070
- result.init(data);
57071
- return result;
57072
- }
57073
-
57074
- toJSON(data?: any) {
57075
- data = typeof data === 'object' ? data : {};
57076
- if (Array.isArray(this.ids)) {
57077
- data["ids"] = [];
57078
- for (let item of this.ids)
57079
- data["ids"].push(item);
57080
- }
57081
- return data;
57082
- }
57083
- }
57084
-
57085
- export interface IDeleteMeasurementFormsInstancesBulkRequest {
57086
- ids: string[];
57087
- }
57088
-
57089
57185
  export class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
57090
57186
  status?: MeasurementFormInstanceStatus | null;
57091
57187
  statusChangedSince?: Date | null;