@ignos/api-client 20251009.0.12796-alpha → 20251009.0.12800
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.
- package/lib/ignosportal-api.d.ts +47 -13
- package/lib/ignosportal-api.js +151 -82
- package/package.json +1 -1
- package/src/ignosportal-api.ts +197 -93
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -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>;
|
|
@@ -3744,6 +3744,50 @@ export interface IMachineAlarmDto {
|
|
|
3744
3744
|
endTime?: Date | null;
|
|
3745
3745
|
}
|
|
3746
3746
|
export type MachineAlarmType = "Fault" | "Warning";
|
|
3747
|
+
export declare class PagedResultOfGroupedMachineIncidentDto implements IPagedResultOfGroupedMachineIncidentDto {
|
|
3748
|
+
results: GroupedMachineIncidentDto[];
|
|
3749
|
+
continuationToken?: string | null;
|
|
3750
|
+
constructor(data?: IPagedResultOfGroupedMachineIncidentDto);
|
|
3751
|
+
init(_data?: any): void;
|
|
3752
|
+
static fromJS(data: any): PagedResultOfGroupedMachineIncidentDto;
|
|
3753
|
+
toJSON(data?: any): any;
|
|
3754
|
+
}
|
|
3755
|
+
export interface IPagedResultOfGroupedMachineIncidentDto {
|
|
3756
|
+
results: GroupedMachineIncidentDto[];
|
|
3757
|
+
continuationToken?: string | null;
|
|
3758
|
+
}
|
|
3759
|
+
export declare class GroupedMachineIncidentDto extends MachineAlarmDto implements IGroupedMachineIncidentDto {
|
|
3760
|
+
incidents: MachineAlarmDto[];
|
|
3761
|
+
constructor(data?: IGroupedMachineIncidentDto);
|
|
3762
|
+
init(_data?: any): void;
|
|
3763
|
+
static fromJS(data: any): GroupedMachineIncidentDto;
|
|
3764
|
+
toJSON(data?: any): any;
|
|
3765
|
+
}
|
|
3766
|
+
export interface IGroupedMachineIncidentDto extends IMachineAlarmDto {
|
|
3767
|
+
incidents: MachineAlarmDto[];
|
|
3768
|
+
}
|
|
3769
|
+
export declare class ListGroupedMachineIncidentsRequest implements IListGroupedMachineIncidentsRequest {
|
|
3770
|
+
assetId: number;
|
|
3771
|
+
startTime: Date;
|
|
3772
|
+
endTime?: Date | null;
|
|
3773
|
+
nativeCode?: string | null;
|
|
3774
|
+
alarmType?: MachineAlarmType | null;
|
|
3775
|
+
limit?: number | null;
|
|
3776
|
+
continuationToken?: string | null;
|
|
3777
|
+
constructor(data?: IListGroupedMachineIncidentsRequest);
|
|
3778
|
+
init(_data?: any): void;
|
|
3779
|
+
static fromJS(data: any): ListGroupedMachineIncidentsRequest;
|
|
3780
|
+
toJSON(data?: any): any;
|
|
3781
|
+
}
|
|
3782
|
+
export interface IListGroupedMachineIncidentsRequest {
|
|
3783
|
+
assetId: number;
|
|
3784
|
+
startTime: Date;
|
|
3785
|
+
endTime?: Date | null;
|
|
3786
|
+
nativeCode?: string | null;
|
|
3787
|
+
alarmType?: MachineAlarmType | null;
|
|
3788
|
+
limit?: number | null;
|
|
3789
|
+
continuationToken?: string | null;
|
|
3790
|
+
}
|
|
3747
3791
|
export declare class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
|
|
3748
3792
|
assetId: number;
|
|
3749
3793
|
assetName: string;
|
|
@@ -13284,16 +13328,6 @@ export interface IMeasurementFormWorkorderSupplierDto {
|
|
|
13284
13328
|
procurementLine?: number | null;
|
|
13285
13329
|
externalOrderNumber?: string | null;
|
|
13286
13330
|
}
|
|
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
13331
|
export declare class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
|
|
13298
13332
|
status?: MeasurementFormInstanceStatus | null;
|
|
13299
13333
|
statusChangedSince?: Date | null;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -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)
|
|
@@ -25467,6 +25462,117 @@ export class MachineAlarmDto {
|
|
|
25467
25462
|
return data;
|
|
25468
25463
|
}
|
|
25469
25464
|
}
|
|
25465
|
+
export class PagedResultOfGroupedMachineIncidentDto {
|
|
25466
|
+
constructor(data) {
|
|
25467
|
+
if (data) {
|
|
25468
|
+
for (var property in data) {
|
|
25469
|
+
if (data.hasOwnProperty(property))
|
|
25470
|
+
this[property] = data[property];
|
|
25471
|
+
}
|
|
25472
|
+
}
|
|
25473
|
+
if (!data) {
|
|
25474
|
+
this.results = [];
|
|
25475
|
+
}
|
|
25476
|
+
}
|
|
25477
|
+
init(_data) {
|
|
25478
|
+
if (_data) {
|
|
25479
|
+
if (Array.isArray(_data["results"])) {
|
|
25480
|
+
this.results = [];
|
|
25481
|
+
for (let item of _data["results"])
|
|
25482
|
+
this.results.push(GroupedMachineIncidentDto.fromJS(item));
|
|
25483
|
+
}
|
|
25484
|
+
this.continuationToken = _data["continuationToken"];
|
|
25485
|
+
}
|
|
25486
|
+
}
|
|
25487
|
+
static fromJS(data) {
|
|
25488
|
+
data = typeof data === 'object' ? data : {};
|
|
25489
|
+
let result = new PagedResultOfGroupedMachineIncidentDto();
|
|
25490
|
+
result.init(data);
|
|
25491
|
+
return result;
|
|
25492
|
+
}
|
|
25493
|
+
toJSON(data) {
|
|
25494
|
+
data = typeof data === 'object' ? data : {};
|
|
25495
|
+
if (Array.isArray(this.results)) {
|
|
25496
|
+
data["results"] = [];
|
|
25497
|
+
for (let item of this.results)
|
|
25498
|
+
data["results"].push(item.toJSON());
|
|
25499
|
+
}
|
|
25500
|
+
data["continuationToken"] = this.continuationToken;
|
|
25501
|
+
return data;
|
|
25502
|
+
}
|
|
25503
|
+
}
|
|
25504
|
+
export class GroupedMachineIncidentDto extends MachineAlarmDto {
|
|
25505
|
+
constructor(data) {
|
|
25506
|
+
super(data);
|
|
25507
|
+
if (!data) {
|
|
25508
|
+
this.incidents = [];
|
|
25509
|
+
}
|
|
25510
|
+
}
|
|
25511
|
+
init(_data) {
|
|
25512
|
+
super.init(_data);
|
|
25513
|
+
if (_data) {
|
|
25514
|
+
if (Array.isArray(_data["incidents"])) {
|
|
25515
|
+
this.incidents = [];
|
|
25516
|
+
for (let item of _data["incidents"])
|
|
25517
|
+
this.incidents.push(MachineAlarmDto.fromJS(item));
|
|
25518
|
+
}
|
|
25519
|
+
}
|
|
25520
|
+
}
|
|
25521
|
+
static fromJS(data) {
|
|
25522
|
+
data = typeof data === 'object' ? data : {};
|
|
25523
|
+
let result = new GroupedMachineIncidentDto();
|
|
25524
|
+
result.init(data);
|
|
25525
|
+
return result;
|
|
25526
|
+
}
|
|
25527
|
+
toJSON(data) {
|
|
25528
|
+
data = typeof data === 'object' ? data : {};
|
|
25529
|
+
if (Array.isArray(this.incidents)) {
|
|
25530
|
+
data["incidents"] = [];
|
|
25531
|
+
for (let item of this.incidents)
|
|
25532
|
+
data["incidents"].push(item.toJSON());
|
|
25533
|
+
}
|
|
25534
|
+
super.toJSON(data);
|
|
25535
|
+
return data;
|
|
25536
|
+
}
|
|
25537
|
+
}
|
|
25538
|
+
export class ListGroupedMachineIncidentsRequest {
|
|
25539
|
+
constructor(data) {
|
|
25540
|
+
if (data) {
|
|
25541
|
+
for (var property in data) {
|
|
25542
|
+
if (data.hasOwnProperty(property))
|
|
25543
|
+
this[property] = data[property];
|
|
25544
|
+
}
|
|
25545
|
+
}
|
|
25546
|
+
}
|
|
25547
|
+
init(_data) {
|
|
25548
|
+
if (_data) {
|
|
25549
|
+
this.assetId = _data["assetId"];
|
|
25550
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
|
|
25551
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
|
|
25552
|
+
this.nativeCode = _data["nativeCode"];
|
|
25553
|
+
this.alarmType = _data["alarmType"];
|
|
25554
|
+
this.limit = _data["limit"];
|
|
25555
|
+
this.continuationToken = _data["continuationToken"];
|
|
25556
|
+
}
|
|
25557
|
+
}
|
|
25558
|
+
static fromJS(data) {
|
|
25559
|
+
data = typeof data === 'object' ? data : {};
|
|
25560
|
+
let result = new ListGroupedMachineIncidentsRequest();
|
|
25561
|
+
result.init(data);
|
|
25562
|
+
return result;
|
|
25563
|
+
}
|
|
25564
|
+
toJSON(data) {
|
|
25565
|
+
data = typeof data === 'object' ? data : {};
|
|
25566
|
+
data["assetId"] = this.assetId;
|
|
25567
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
|
|
25568
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
|
|
25569
|
+
data["nativeCode"] = this.nativeCode;
|
|
25570
|
+
data["alarmType"] = this.alarmType;
|
|
25571
|
+
data["limit"] = this.limit;
|
|
25572
|
+
data["continuationToken"] = this.continuationToken;
|
|
25573
|
+
return data;
|
|
25574
|
+
}
|
|
25575
|
+
}
|
|
25470
25576
|
export class MachineAlarmSummaryDto {
|
|
25471
25577
|
constructor(data) {
|
|
25472
25578
|
if (data) {
|
|
@@ -44957,43 +45063,6 @@ export class MeasurementFormWorkorderSupplierDto {
|
|
|
44957
45063
|
return data;
|
|
44958
45064
|
}
|
|
44959
45065
|
}
|
|
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
45066
|
export class ListMeasurementFormsByStatusRequest {
|
|
44998
45067
|
constructor(data) {
|
|
44999
45068
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -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)
|
|
@@ -27963,6 +27959,161 @@ export interface IMachineAlarmDto {
|
|
|
27963
27959
|
|
|
27964
27960
|
export type MachineAlarmType = "Fault" | "Warning";
|
|
27965
27961
|
|
|
27962
|
+
export class PagedResultOfGroupedMachineIncidentDto implements IPagedResultOfGroupedMachineIncidentDto {
|
|
27963
|
+
results!: GroupedMachineIncidentDto[];
|
|
27964
|
+
continuationToken?: string | null;
|
|
27965
|
+
|
|
27966
|
+
constructor(data?: IPagedResultOfGroupedMachineIncidentDto) {
|
|
27967
|
+
if (data) {
|
|
27968
|
+
for (var property in data) {
|
|
27969
|
+
if (data.hasOwnProperty(property))
|
|
27970
|
+
(<any>this)[property] = (<any>data)[property];
|
|
27971
|
+
}
|
|
27972
|
+
}
|
|
27973
|
+
if (!data) {
|
|
27974
|
+
this.results = [];
|
|
27975
|
+
}
|
|
27976
|
+
}
|
|
27977
|
+
|
|
27978
|
+
init(_data?: any) {
|
|
27979
|
+
if (_data) {
|
|
27980
|
+
if (Array.isArray(_data["results"])) {
|
|
27981
|
+
this.results = [] as any;
|
|
27982
|
+
for (let item of _data["results"])
|
|
27983
|
+
this.results!.push(GroupedMachineIncidentDto.fromJS(item));
|
|
27984
|
+
}
|
|
27985
|
+
this.continuationToken = _data["continuationToken"];
|
|
27986
|
+
}
|
|
27987
|
+
}
|
|
27988
|
+
|
|
27989
|
+
static fromJS(data: any): PagedResultOfGroupedMachineIncidentDto {
|
|
27990
|
+
data = typeof data === 'object' ? data : {};
|
|
27991
|
+
let result = new PagedResultOfGroupedMachineIncidentDto();
|
|
27992
|
+
result.init(data);
|
|
27993
|
+
return result;
|
|
27994
|
+
}
|
|
27995
|
+
|
|
27996
|
+
toJSON(data?: any) {
|
|
27997
|
+
data = typeof data === 'object' ? data : {};
|
|
27998
|
+
if (Array.isArray(this.results)) {
|
|
27999
|
+
data["results"] = [];
|
|
28000
|
+
for (let item of this.results)
|
|
28001
|
+
data["results"].push(item.toJSON());
|
|
28002
|
+
}
|
|
28003
|
+
data["continuationToken"] = this.continuationToken;
|
|
28004
|
+
return data;
|
|
28005
|
+
}
|
|
28006
|
+
}
|
|
28007
|
+
|
|
28008
|
+
export interface IPagedResultOfGroupedMachineIncidentDto {
|
|
28009
|
+
results: GroupedMachineIncidentDto[];
|
|
28010
|
+
continuationToken?: string | null;
|
|
28011
|
+
}
|
|
28012
|
+
|
|
28013
|
+
export class GroupedMachineIncidentDto extends MachineAlarmDto implements IGroupedMachineIncidentDto {
|
|
28014
|
+
incidents!: MachineAlarmDto[];
|
|
28015
|
+
|
|
28016
|
+
constructor(data?: IGroupedMachineIncidentDto) {
|
|
28017
|
+
super(data);
|
|
28018
|
+
if (!data) {
|
|
28019
|
+
this.incidents = [];
|
|
28020
|
+
}
|
|
28021
|
+
}
|
|
28022
|
+
|
|
28023
|
+
override init(_data?: any) {
|
|
28024
|
+
super.init(_data);
|
|
28025
|
+
if (_data) {
|
|
28026
|
+
if (Array.isArray(_data["incidents"])) {
|
|
28027
|
+
this.incidents = [] as any;
|
|
28028
|
+
for (let item of _data["incidents"])
|
|
28029
|
+
this.incidents!.push(MachineAlarmDto.fromJS(item));
|
|
28030
|
+
}
|
|
28031
|
+
}
|
|
28032
|
+
}
|
|
28033
|
+
|
|
28034
|
+
static override fromJS(data: any): GroupedMachineIncidentDto {
|
|
28035
|
+
data = typeof data === 'object' ? data : {};
|
|
28036
|
+
let result = new GroupedMachineIncidentDto();
|
|
28037
|
+
result.init(data);
|
|
28038
|
+
return result;
|
|
28039
|
+
}
|
|
28040
|
+
|
|
28041
|
+
override toJSON(data?: any) {
|
|
28042
|
+
data = typeof data === 'object' ? data : {};
|
|
28043
|
+
if (Array.isArray(this.incidents)) {
|
|
28044
|
+
data["incidents"] = [];
|
|
28045
|
+
for (let item of this.incidents)
|
|
28046
|
+
data["incidents"].push(item.toJSON());
|
|
28047
|
+
}
|
|
28048
|
+
super.toJSON(data);
|
|
28049
|
+
return data;
|
|
28050
|
+
}
|
|
28051
|
+
}
|
|
28052
|
+
|
|
28053
|
+
export interface IGroupedMachineIncidentDto extends IMachineAlarmDto {
|
|
28054
|
+
incidents: MachineAlarmDto[];
|
|
28055
|
+
}
|
|
28056
|
+
|
|
28057
|
+
export class ListGroupedMachineIncidentsRequest implements IListGroupedMachineIncidentsRequest {
|
|
28058
|
+
assetId!: number;
|
|
28059
|
+
startTime!: Date;
|
|
28060
|
+
endTime?: Date | null;
|
|
28061
|
+
nativeCode?: string | null;
|
|
28062
|
+
alarmType?: MachineAlarmType | null;
|
|
28063
|
+
limit?: number | null;
|
|
28064
|
+
continuationToken?: string | null;
|
|
28065
|
+
|
|
28066
|
+
constructor(data?: IListGroupedMachineIncidentsRequest) {
|
|
28067
|
+
if (data) {
|
|
28068
|
+
for (var property in data) {
|
|
28069
|
+
if (data.hasOwnProperty(property))
|
|
28070
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28071
|
+
}
|
|
28072
|
+
}
|
|
28073
|
+
}
|
|
28074
|
+
|
|
28075
|
+
init(_data?: any) {
|
|
28076
|
+
if (_data) {
|
|
28077
|
+
this.assetId = _data["assetId"];
|
|
28078
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
28079
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
28080
|
+
this.nativeCode = _data["nativeCode"];
|
|
28081
|
+
this.alarmType = _data["alarmType"];
|
|
28082
|
+
this.limit = _data["limit"];
|
|
28083
|
+
this.continuationToken = _data["continuationToken"];
|
|
28084
|
+
}
|
|
28085
|
+
}
|
|
28086
|
+
|
|
28087
|
+
static fromJS(data: any): ListGroupedMachineIncidentsRequest {
|
|
28088
|
+
data = typeof data === 'object' ? data : {};
|
|
28089
|
+
let result = new ListGroupedMachineIncidentsRequest();
|
|
28090
|
+
result.init(data);
|
|
28091
|
+
return result;
|
|
28092
|
+
}
|
|
28093
|
+
|
|
28094
|
+
toJSON(data?: any) {
|
|
28095
|
+
data = typeof data === 'object' ? data : {};
|
|
28096
|
+
data["assetId"] = this.assetId;
|
|
28097
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
28098
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
28099
|
+
data["nativeCode"] = this.nativeCode;
|
|
28100
|
+
data["alarmType"] = this.alarmType;
|
|
28101
|
+
data["limit"] = this.limit;
|
|
28102
|
+
data["continuationToken"] = this.continuationToken;
|
|
28103
|
+
return data;
|
|
28104
|
+
}
|
|
28105
|
+
}
|
|
28106
|
+
|
|
28107
|
+
export interface IListGroupedMachineIncidentsRequest {
|
|
28108
|
+
assetId: number;
|
|
28109
|
+
startTime: Date;
|
|
28110
|
+
endTime?: Date | null;
|
|
28111
|
+
nativeCode?: string | null;
|
|
28112
|
+
alarmType?: MachineAlarmType | null;
|
|
28113
|
+
limit?: number | null;
|
|
28114
|
+
continuationToken?: string | null;
|
|
28115
|
+
}
|
|
28116
|
+
|
|
27966
28117
|
export class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
|
|
27967
28118
|
assetId!: number;
|
|
27968
28119
|
assetName!: string;
|
|
@@ -57039,53 +57190,6 @@ export interface IMeasurementFormWorkorderSupplierDto {
|
|
|
57039
57190
|
externalOrderNumber?: string | null;
|
|
57040
57191
|
}
|
|
57041
57192
|
|
|
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
57193
|
export class ListMeasurementFormsByStatusRequest implements IListMeasurementFormsByStatusRequest {
|
|
57090
57194
|
status?: MeasurementFormInstanceStatus | null;
|
|
57091
57195
|
statusChangedSince?: Date | null;
|