@ignos/api-client 20251008.0.12788-alpha → 20251009.0.12796-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,7 +365,6 @@ 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>;
369
368
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
370
369
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
371
370
  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>;
@@ -380,8 +379,6 @@ export declare class MachineAlarmsClient extends AuthorizedApiBase implements IM
380
379
  });
381
380
  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>;
382
381
  protected processListMachineAlarms(response: Response): Promise<PagedResultOfMachineAlarmDto>;
383
- listGroupedMachineIncidents(request: ListGroupedMachineIncidentsRequest): Promise<PagedResultOfGroupedMachineIncidentDto>;
384
- protected processListGroupedMachineIncidents(response: Response): Promise<PagedResultOfGroupedMachineIncidentDto>;
385
382
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
386
383
  protected processListAlarmsPerMachine(response: Response): Promise<MachineAlarmSummaryDto[]>;
387
384
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
@@ -2348,6 +2345,7 @@ export interface IMeasurementFormsInstancesClient {
2348
2345
  postListMeasurementForms(request: ListMeasurementFormsRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceOverviewDto>;
2349
2346
  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>;
2350
2347
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
2348
+ deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse>;
2351
2349
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto>;
2352
2350
  createMeasurementFormInstance(id: string): Promise<MeasurementFormInstanceDto>;
2353
2351
  updateMeasurementFormInstance(id: string, request: UpdateMeasurementFormInstanceRequest): Promise<MeasurementFormInstanceDto>;
@@ -2394,6 +2392,8 @@ export declare class MeasurementFormsInstancesClient extends AuthorizedApiBase i
2394
2392
  protected processListMeasurementFormsByStatus(response: Response): Promise<PagedResultOfMeasurementFormInstanceDto>;
2395
2393
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
2396
2394
  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,6 +3073,8 @@ 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;
3076
3078
  reasonType: DowntimeReasonTypeDto;
3077
3079
  startTime: Date;
3078
3080
  endTime?: Date | null;
@@ -3091,6 +3093,8 @@ export declare class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto
3091
3093
  export interface IDowntimePeriodReasonDto {
3092
3094
  id: number;
3093
3095
  reason: string;
3096
+ parentReasonId?: string | null;
3097
+ parentReason?: string | null;
3094
3098
  reasonType: DowntimeReasonTypeDto;
3095
3099
  startTime: Date;
3096
3100
  endTime?: Date | null;
@@ -3740,48 +3744,6 @@ export interface IMachineAlarmDto {
3740
3744
  endTime?: Date | null;
3741
3745
  }
3742
3746
  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
- limit?: number | null;
3771
- continuationToken?: string | null;
3772
- constructor(data?: IListGroupedMachineIncidentsRequest);
3773
- init(_data?: any): void;
3774
- static fromJS(data: any): ListGroupedMachineIncidentsRequest;
3775
- toJSON(data?: any): any;
3776
- }
3777
- export interface IListGroupedMachineIncidentsRequest {
3778
- assetId: number;
3779
- startTime: Date;
3780
- endTime?: Date | null;
3781
- nativeCode?: string | null;
3782
- limit?: number | null;
3783
- continuationToken?: string | null;
3784
- }
3785
3747
  export declare class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
3786
3748
  assetId: number;
3787
3749
  assetName: string;
@@ -13322,6 +13284,16 @@ export interface IMeasurementFormWorkorderSupplierDto {
13322
13284
  procurementLine?: number | null;
13323
13285
  externalOrderNumber?: string | null;
13324
13286
  }
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
+ }
13325
13297
  export declare class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
13326
13298
  status?: MeasurementFormInstanceStatus | null;
13327
13299
  statusChangedSince?: Date | null;
@@ -2091,46 +2091,6 @@ 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
- }
2134
2094
  listAlarmsPerMachine(startTime, endTime) {
2135
2095
  let url_ = this.baseUrl + "/machinealarms/alarmspermachine?";
2136
2096
  if (startTime === null)
@@ -20338,6 +20298,51 @@ export class MeasurementFormsInstancesClient extends AuthorizedApiBase {
20338
20298
  }
20339
20299
  return Promise.resolve(null);
20340
20300
  }
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
+ }
20341
20346
  getMeasurementFormInstance(id, tenantId) {
20342
20347
  let url_ = this.baseUrl + "/measurementforms/instances/{id}?";
20343
20348
  if (id === undefined || id === null)
@@ -23998,6 +24003,8 @@ export class DowntimePeriodReasonDto {
23998
24003
  if (_data) {
23999
24004
  this.id = _data["id"];
24000
24005
  this.reason = _data["reason"];
24006
+ this.parentReasonId = _data["parentReasonId"];
24007
+ this.parentReason = _data["parentReason"];
24001
24008
  this.reasonType = _data["reasonType"];
24002
24009
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
24003
24010
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
@@ -24020,6 +24027,8 @@ export class DowntimePeriodReasonDto {
24020
24027
  data = typeof data === 'object' ? data : {};
24021
24028
  data["id"] = this.id;
24022
24029
  data["reason"] = this.reason;
24030
+ data["parentReasonId"] = this.parentReasonId;
24031
+ data["parentReason"] = this.parentReason;
24023
24032
  data["reasonType"] = this.reasonType;
24024
24033
  data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
24025
24034
  data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
@@ -25458,112 +25467,6 @@ export class MachineAlarmDto {
25458
25467
  return data;
25459
25468
  }
25460
25469
  }
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
- }
25504
- init(_data) {
25505
- super.init(_data);
25506
- if (_data) {
25507
- if (Array.isArray(_data["incidents"])) {
25508
- this.incidents = [];
25509
- for (let item of _data["incidents"])
25510
- this.incidents.push(MachineAlarmDto.fromJS(item));
25511
- }
25512
- }
25513
- }
25514
- static fromJS(data) {
25515
- data = typeof data === 'object' ? data : {};
25516
- let result = new GroupedMachineIncidentDto();
25517
- result.init(data);
25518
- return result;
25519
- }
25520
- toJSON(data) {
25521
- data = typeof data === 'object' ? data : {};
25522
- if (Array.isArray(this.incidents)) {
25523
- data["incidents"] = [];
25524
- for (let item of this.incidents)
25525
- data["incidents"].push(item.toJSON());
25526
- }
25527
- super.toJSON(data);
25528
- return data;
25529
- }
25530
- }
25531
- export class ListGroupedMachineIncidentsRequest {
25532
- constructor(data) {
25533
- if (data) {
25534
- for (var property in data) {
25535
- if (data.hasOwnProperty(property))
25536
- this[property] = data[property];
25537
- }
25538
- }
25539
- }
25540
- init(_data) {
25541
- if (_data) {
25542
- this.assetId = _data["assetId"];
25543
- this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
25544
- this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
25545
- this.nativeCode = _data["nativeCode"];
25546
- this.limit = _data["limit"];
25547
- this.continuationToken = _data["continuationToken"];
25548
- }
25549
- }
25550
- static fromJS(data) {
25551
- data = typeof data === 'object' ? data : {};
25552
- let result = new ListGroupedMachineIncidentsRequest();
25553
- result.init(data);
25554
- return result;
25555
- }
25556
- toJSON(data) {
25557
- data = typeof data === 'object' ? data : {};
25558
- data["assetId"] = this.assetId;
25559
- data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
25560
- data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
25561
- data["nativeCode"] = this.nativeCode;
25562
- data["limit"] = this.limit;
25563
- data["continuationToken"] = this.continuationToken;
25564
- return data;
25565
- }
25566
- }
25567
25470
  export class MachineAlarmSummaryDto {
25568
25471
  constructor(data) {
25569
25472
  if (data) {
@@ -45054,6 +44957,43 @@ export class MeasurementFormWorkorderSupplierDto {
45054
44957
  return data;
45055
44958
  }
45056
44959
  }
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
+ }
45057
44997
  export class ListMeasurementFormsByStatusRequest {
45058
44998
  constructor(data) {
45059
44999
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20251008.0.12788-alpha",
3
+ "version": "20251009.0.12796-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -2228,8 +2228,6 @@ 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
-
2233
2231
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]>;
2234
2232
 
2235
2233
  listAlarmSeverityOccurrences(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSeverityOccurenceDto[]>;
@@ -2318,46 +2316,6 @@ export class MachineAlarmsClient extends AuthorizedApiBase implements IMachineAl
2318
2316
  return Promise.resolve<PagedResultOfMachineAlarmDto>(null as any);
2319
2317
  }
2320
2318
 
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
-
2361
2319
  listAlarmsPerMachine(startTime: Date | undefined, endTime: Date | null | undefined): Promise<MachineAlarmSummaryDto[]> {
2362
2320
  let url_ = this.baseUrl + "/machinealarms/alarmspermachine?";
2363
2321
  if (startTime === null)
@@ -21474,6 +21432,8 @@ export interface IMeasurementFormsInstancesClient {
21474
21432
 
21475
21433
  postListMeasurementFormsByStatus(request: ListMeasurementFormsByStatusRequest | undefined): Promise<PagedResultOfMeasurementFormInstanceDto>;
21476
21434
 
21435
+ deleteInstancesBulk(request: DeleteMeasurementFormsInstancesBulkRequest): Promise<FileResponse>;
21436
+
21477
21437
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto>;
21478
21438
 
21479
21439
  createMeasurementFormInstance(id: string): Promise<MeasurementFormInstanceDto>;
@@ -21725,6 +21685,50 @@ export class MeasurementFormsInstancesClient extends AuthorizedApiBase implement
21725
21685
  return Promise.resolve<PagedResultOfMeasurementFormInstanceDto>(null as any);
21726
21686
  }
21727
21687
 
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
+
21728
21732
  getMeasurementFormInstance(id: string, tenantId: string | null | undefined): Promise<MeasurementFormInstanceDto> {
21729
21733
  let url_ = this.baseUrl + "/measurementforms/instances/{id}?";
21730
21734
  if (id === undefined || id === null)
@@ -25813,6 +25817,8 @@ export interface IMachineStateDatapoint {
25813
25817
  export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25814
25818
  id!: number;
25815
25819
  reason!: string;
25820
+ parentReasonId?: string | null;
25821
+ parentReason?: string | null;
25816
25822
  reasonType!: DowntimeReasonTypeDto;
25817
25823
  startTime!: Date;
25818
25824
  endTime?: Date | null;
@@ -25837,6 +25843,8 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25837
25843
  if (_data) {
25838
25844
  this.id = _data["id"];
25839
25845
  this.reason = _data["reason"];
25846
+ this.parentReasonId = _data["parentReasonId"];
25847
+ this.parentReason = _data["parentReason"];
25840
25848
  this.reasonType = _data["reasonType"];
25841
25849
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
25842
25850
  this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
@@ -25861,6 +25869,8 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25861
25869
  data = typeof data === 'object' ? data : {};
25862
25870
  data["id"] = this.id;
25863
25871
  data["reason"] = this.reason;
25872
+ data["parentReasonId"] = this.parentReasonId;
25873
+ data["parentReason"] = this.parentReason;
25864
25874
  data["reasonType"] = this.reasonType;
25865
25875
  data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
25866
25876
  data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
@@ -25878,6 +25888,8 @@ export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
25878
25888
  export interface IDowntimePeriodReasonDto {
25879
25889
  id: number;
25880
25890
  reason: string;
25891
+ parentReasonId?: string | null;
25892
+ parentReason?: string | null;
25881
25893
  reasonType: DowntimeReasonTypeDto;
25882
25894
  startTime: Date;
25883
25895
  endTime?: Date | null;
@@ -27951,154 +27963,6 @@ export interface IMachineAlarmDto {
27951
27963
 
27952
27964
  export type MachineAlarmType = "Fault" | "Warning";
27953
27965
 
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
- }
28011
-
28012
- override init(_data?: any) {
28013
- super.init(_data);
28014
- if (_data) {
28015
- if (Array.isArray(_data["incidents"])) {
28016
- this.incidents = [] as any;
28017
- for (let item of _data["incidents"])
28018
- this.incidents!.push(MachineAlarmDto.fromJS(item));
28019
- }
28020
- }
28021
- }
28022
-
28023
- static override fromJS(data: any): GroupedMachineIncidentDto {
28024
- data = typeof data === 'object' ? data : {};
28025
- let result = new GroupedMachineIncidentDto();
28026
- result.init(data);
28027
- return result;
28028
- }
28029
-
28030
- override toJSON(data?: any) {
28031
- data = typeof data === 'object' ? data : {};
28032
- if (Array.isArray(this.incidents)) {
28033
- data["incidents"] = [];
28034
- for (let item of this.incidents)
28035
- data["incidents"].push(item.toJSON());
28036
- }
28037
- super.toJSON(data);
28038
- return data;
28039
- }
28040
- }
28041
-
28042
- export interface IGroupedMachineIncidentDto extends IMachineAlarmDto {
28043
- incidents?: MachineAlarmDto[];
28044
- }
28045
-
28046
- export class ListGroupedMachineIncidentsRequest implements IListGroupedMachineIncidentsRequest {
28047
- assetId!: number;
28048
- startTime!: Date;
28049
- endTime?: Date | null;
28050
- nativeCode?: string | null;
28051
- limit?: number | null;
28052
- continuationToken?: string | null;
28053
-
28054
- constructor(data?: IListGroupedMachineIncidentsRequest) {
28055
- if (data) {
28056
- for (var property in data) {
28057
- if (data.hasOwnProperty(property))
28058
- (<any>this)[property] = (<any>data)[property];
28059
- }
28060
- }
28061
- }
28062
-
28063
- init(_data?: any) {
28064
- if (_data) {
28065
- this.assetId = _data["assetId"];
28066
- this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
28067
- this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
28068
- this.nativeCode = _data["nativeCode"];
28069
- this.limit = _data["limit"];
28070
- this.continuationToken = _data["continuationToken"];
28071
- }
28072
- }
28073
-
28074
- static fromJS(data: any): ListGroupedMachineIncidentsRequest {
28075
- data = typeof data === 'object' ? data : {};
28076
- let result = new ListGroupedMachineIncidentsRequest();
28077
- result.init(data);
28078
- return result;
28079
- }
28080
-
28081
- toJSON(data?: any) {
28082
- data = typeof data === 'object' ? data : {};
28083
- data["assetId"] = this.assetId;
28084
- data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
28085
- data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
28086
- data["nativeCode"] = this.nativeCode;
28087
- data["limit"] = this.limit;
28088
- data["continuationToken"] = this.continuationToken;
28089
- return data;
28090
- }
28091
- }
28092
-
28093
- export interface IListGroupedMachineIncidentsRequest {
28094
- assetId: number;
28095
- startTime: Date;
28096
- endTime?: Date | null;
28097
- nativeCode?: string | null;
28098
- limit?: number | null;
28099
- continuationToken?: string | null;
28100
- }
28101
-
28102
27966
  export class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
28103
27967
  assetId!: number;
28104
27968
  assetName!: string;
@@ -57175,6 +57039,53 @@ export interface IMeasurementFormWorkorderSupplierDto {
57175
57039
  externalOrderNumber?: string | null;
57176
57040
  }
57177
57041
 
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
+
57178
57089
  export class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
57179
57090
  status?: MeasurementFormInstanceStatus | null;
57180
57091
  statusChangedSince?: Date | null;