@ignos/api-client 20251006.0.12780 → 20251008.0.12792-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.
- package/lib/ignosportal-api.d.ts +45 -0
- package/lib/ignosportal-api.js +149 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +193 -0
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[]>;
|
|
@@ -3737,6 +3740,48 @@ export interface IMachineAlarmDto {
|
|
|
3737
3740
|
endTime?: Date | null;
|
|
3738
3741
|
}
|
|
3739
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
|
+
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
|
+
}
|
|
3740
3785
|
export declare class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
|
|
3741
3786
|
assetId: number;
|
|
3742
3787
|
assetName: string;
|
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)
|
|
@@ -25418,6 +25458,115 @@ export class MachineAlarmDto {
|
|
|
25418
25458
|
return data;
|
|
25419
25459
|
}
|
|
25420
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.limit = _data["limit"];
|
|
25550
|
+
this.continuationToken = _data["continuationToken"];
|
|
25551
|
+
}
|
|
25552
|
+
}
|
|
25553
|
+
static fromJS(data) {
|
|
25554
|
+
data = typeof data === 'object' ? data : {};
|
|
25555
|
+
let result = new ListGroupedMachineIncidentsRequest();
|
|
25556
|
+
result.init(data);
|
|
25557
|
+
return result;
|
|
25558
|
+
}
|
|
25559
|
+
toJSON(data) {
|
|
25560
|
+
data = typeof data === 'object' ? data : {};
|
|
25561
|
+
data["assetId"] = this.assetId;
|
|
25562
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
|
|
25563
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
|
|
25564
|
+
data["nativeCode"] = this.nativeCode;
|
|
25565
|
+
data["limit"] = this.limit;
|
|
25566
|
+
data["continuationToken"] = this.continuationToken;
|
|
25567
|
+
return data;
|
|
25568
|
+
}
|
|
25569
|
+
}
|
|
25421
25570
|
export class MachineAlarmSummaryDto {
|
|
25422
25571
|
constructor(data) {
|
|
25423
25572
|
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)
|
|
@@ -27909,6 +27951,157 @@ export interface IMachineAlarmDto {
|
|
|
27909
27951
|
|
|
27910
27952
|
export type MachineAlarmType = "Fault" | "Warning";
|
|
27911
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
|
+
limit?: number | null;
|
|
28055
|
+
continuationToken?: string | null;
|
|
28056
|
+
|
|
28057
|
+
constructor(data?: IListGroupedMachineIncidentsRequest) {
|
|
28058
|
+
if (data) {
|
|
28059
|
+
for (var property in data) {
|
|
28060
|
+
if (data.hasOwnProperty(property))
|
|
28061
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28062
|
+
}
|
|
28063
|
+
}
|
|
28064
|
+
}
|
|
28065
|
+
|
|
28066
|
+
init(_data?: any) {
|
|
28067
|
+
if (_data) {
|
|
28068
|
+
this.assetId = _data["assetId"];
|
|
28069
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
28070
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
28071
|
+
this.nativeCode = _data["nativeCode"];
|
|
28072
|
+
this.limit = _data["limit"];
|
|
28073
|
+
this.continuationToken = _data["continuationToken"];
|
|
28074
|
+
}
|
|
28075
|
+
}
|
|
28076
|
+
|
|
28077
|
+
static fromJS(data: any): ListGroupedMachineIncidentsRequest {
|
|
28078
|
+
data = typeof data === 'object' ? data : {};
|
|
28079
|
+
let result = new ListGroupedMachineIncidentsRequest();
|
|
28080
|
+
result.init(data);
|
|
28081
|
+
return result;
|
|
28082
|
+
}
|
|
28083
|
+
|
|
28084
|
+
toJSON(data?: any) {
|
|
28085
|
+
data = typeof data === 'object' ? data : {};
|
|
28086
|
+
data["assetId"] = this.assetId;
|
|
28087
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
28088
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
28089
|
+
data["nativeCode"] = this.nativeCode;
|
|
28090
|
+
data["limit"] = this.limit;
|
|
28091
|
+
data["continuationToken"] = this.continuationToken;
|
|
28092
|
+
return data;
|
|
28093
|
+
}
|
|
28094
|
+
}
|
|
28095
|
+
|
|
28096
|
+
export interface IListGroupedMachineIncidentsRequest {
|
|
28097
|
+
assetId: number;
|
|
28098
|
+
startTime: Date;
|
|
28099
|
+
endTime?: Date | null;
|
|
28100
|
+
nativeCode?: string | null;
|
|
28101
|
+
limit?: number | null;
|
|
28102
|
+
continuationToken?: string | null;
|
|
28103
|
+
}
|
|
28104
|
+
|
|
27912
28105
|
export class MachineAlarmSummaryDto implements IMachineAlarmSummaryDto {
|
|
27913
28106
|
assetId!: number;
|
|
27914
28107
|
assetName!: string;
|