@ignos/api-client 20240711.0.9780 → 20240722.0.9823
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 +210 -0
- package/lib/ignosportal-api.js +847 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +1869 -833
package/src/ignosportal-api.ts
CHANGED
|
@@ -5181,40 +5181,20 @@ export class MeasuringToolsClient extends AuthorizedApiBase implements IMeasurin
|
|
|
5181
5181
|
}
|
|
5182
5182
|
}
|
|
5183
5183
|
|
|
5184
|
-
export interface
|
|
5185
|
-
|
|
5186
|
-
listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]>;
|
|
5187
|
-
|
|
5188
|
-
listMachineGroups(): Promise<MachineGroupDto[]>;
|
|
5189
|
-
|
|
5190
|
-
createMachineGroup(request: CreateMachineGroup): Promise<CreateMachineGroupResponse>;
|
|
5191
|
-
|
|
5192
|
-
updateMachineGroup(id: string, request: UpdateMachineGroup): Promise<void>;
|
|
5193
|
-
|
|
5194
|
-
deleteMachineGroup(id: string): Promise<void>;
|
|
5195
|
-
|
|
5196
|
-
listCurrentMachineStates(assetId: number | null | undefined): Promise<MachineStateListDto>;
|
|
5197
|
-
|
|
5198
|
-
listMachineStates(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStateDatapoint[]>;
|
|
5199
|
-
|
|
5200
|
-
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto>;
|
|
5201
|
-
|
|
5202
|
-
listMachineErpData(): Promise<MachineErpDataListDto>;
|
|
5203
|
-
|
|
5204
|
-
getMachineErpData(id: number): Promise<MachineErpDataDto>;
|
|
5184
|
+
export interface IDowntimeReasonsAdminClient {
|
|
5205
5185
|
|
|
5206
|
-
|
|
5186
|
+
listDowntimeReasons(): Promise<DowntimeReasonDto[]>;
|
|
5207
5187
|
|
|
5208
|
-
|
|
5188
|
+
createDowntimeReason(request: CreateDowntimeReason): Promise<DowntimeReasonDto>;
|
|
5209
5189
|
|
|
5210
|
-
|
|
5190
|
+
updateDowntimeReason(id: string, request: UpdateDowntimeReasonRequest): Promise<DowntimeReasonDto>;
|
|
5211
5191
|
|
|
5212
|
-
|
|
5192
|
+
deleteDowntimeReason(id: string): Promise<void>;
|
|
5213
5193
|
|
|
5214
|
-
|
|
5194
|
+
listMachineTypes(): Promise<MachineTypeDto[]>;
|
|
5215
5195
|
}
|
|
5216
5196
|
|
|
5217
|
-
export class
|
|
5197
|
+
export class DowntimeReasonsAdminClient extends AuthorizedApiBase implements IDowntimeReasonsAdminClient {
|
|
5218
5198
|
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
5219
5199
|
private baseUrl: string;
|
|
5220
5200
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
@@ -5225,12 +5205,8 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5225
5205
|
this.baseUrl = baseUrl ?? "";
|
|
5226
5206
|
}
|
|
5227
5207
|
|
|
5228
|
-
|
|
5229
|
-
let url_ = this.baseUrl + "/
|
|
5230
|
-
if (onlyConnectedMachines === null)
|
|
5231
|
-
throw new Error("The parameter 'onlyConnectedMachines' cannot be null.");
|
|
5232
|
-
else if (onlyConnectedMachines !== undefined)
|
|
5233
|
-
url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
|
|
5208
|
+
listDowntimeReasons(): Promise<DowntimeReasonDto[]> {
|
|
5209
|
+
let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons";
|
|
5234
5210
|
url_ = url_.replace(/[?&]$/, "");
|
|
5235
5211
|
|
|
5236
5212
|
let options_: RequestInit = {
|
|
@@ -5243,11 +5219,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5243
5219
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5244
5220
|
return this.http.fetch(url_, transformedOptions_);
|
|
5245
5221
|
}).then((_response: Response) => {
|
|
5246
|
-
return this.
|
|
5222
|
+
return this.processListDowntimeReasons(_response);
|
|
5247
5223
|
});
|
|
5248
5224
|
}
|
|
5249
5225
|
|
|
5250
|
-
protected
|
|
5226
|
+
protected processListDowntimeReasons(response: Response): Promise<DowntimeReasonDto[]> {
|
|
5251
5227
|
const status = response.status;
|
|
5252
5228
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5253
5229
|
if (status === 200) {
|
|
@@ -5257,7 +5233,7 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5257
5233
|
if (Array.isArray(resultData200)) {
|
|
5258
5234
|
result200 = [] as any;
|
|
5259
5235
|
for (let item of resultData200)
|
|
5260
|
-
result200!.push(
|
|
5236
|
+
result200!.push(DowntimeReasonDto.fromJS(item));
|
|
5261
5237
|
}
|
|
5262
5238
|
return result200;
|
|
5263
5239
|
});
|
|
@@ -5266,16 +5242,20 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5266
5242
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5267
5243
|
});
|
|
5268
5244
|
}
|
|
5269
|
-
return Promise.resolve<
|
|
5245
|
+
return Promise.resolve<DowntimeReasonDto[]>(null as any);
|
|
5270
5246
|
}
|
|
5271
5247
|
|
|
5272
|
-
|
|
5273
|
-
let url_ = this.baseUrl + "/
|
|
5248
|
+
createDowntimeReason(request: CreateDowntimeReason): Promise<DowntimeReasonDto> {
|
|
5249
|
+
let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons";
|
|
5274
5250
|
url_ = url_.replace(/[?&]$/, "");
|
|
5275
5251
|
|
|
5252
|
+
const content_ = JSON.stringify(request);
|
|
5253
|
+
|
|
5276
5254
|
let options_: RequestInit = {
|
|
5277
|
-
|
|
5255
|
+
body: content_,
|
|
5256
|
+
method: "POST",
|
|
5278
5257
|
headers: {
|
|
5258
|
+
"Content-Type": "application/json",
|
|
5279
5259
|
"Accept": "application/json"
|
|
5280
5260
|
}
|
|
5281
5261
|
};
|
|
@@ -5283,22 +5263,18 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5283
5263
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5284
5264
|
return this.http.fetch(url_, transformedOptions_);
|
|
5285
5265
|
}).then((_response: Response) => {
|
|
5286
|
-
return this.
|
|
5266
|
+
return this.processCreateDowntimeReason(_response);
|
|
5287
5267
|
});
|
|
5288
5268
|
}
|
|
5289
5269
|
|
|
5290
|
-
protected
|
|
5270
|
+
protected processCreateDowntimeReason(response: Response): Promise<DowntimeReasonDto> {
|
|
5291
5271
|
const status = response.status;
|
|
5292
5272
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5293
5273
|
if (status === 200) {
|
|
5294
5274
|
return response.text().then((_responseText) => {
|
|
5295
5275
|
let result200: any = null;
|
|
5296
5276
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5297
|
-
|
|
5298
|
-
result200 = [] as any;
|
|
5299
|
-
for (let item of resultData200)
|
|
5300
|
-
result200!.push(MachineGroupDto.fromJS(item));
|
|
5301
|
-
}
|
|
5277
|
+
result200 = DowntimeReasonDto.fromJS(resultData200);
|
|
5302
5278
|
return result200;
|
|
5303
5279
|
});
|
|
5304
5280
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5306,18 +5282,21 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5306
5282
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5307
5283
|
});
|
|
5308
5284
|
}
|
|
5309
|
-
return Promise.resolve<
|
|
5285
|
+
return Promise.resolve<DowntimeReasonDto>(null as any);
|
|
5310
5286
|
}
|
|
5311
5287
|
|
|
5312
|
-
|
|
5313
|
-
let url_ = this.baseUrl + "/
|
|
5288
|
+
updateDowntimeReason(id: string, request: UpdateDowntimeReasonRequest): Promise<DowntimeReasonDto> {
|
|
5289
|
+
let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons/{id}";
|
|
5290
|
+
if (id === undefined || id === null)
|
|
5291
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5292
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5314
5293
|
url_ = url_.replace(/[?&]$/, "");
|
|
5315
5294
|
|
|
5316
5295
|
const content_ = JSON.stringify(request);
|
|
5317
5296
|
|
|
5318
5297
|
let options_: RequestInit = {
|
|
5319
5298
|
body: content_,
|
|
5320
|
-
method: "
|
|
5299
|
+
method: "PUT",
|
|
5321
5300
|
headers: {
|
|
5322
5301
|
"Content-Type": "application/json",
|
|
5323
5302
|
"Accept": "application/json"
|
|
@@ -5327,18 +5306,18 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5327
5306
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5328
5307
|
return this.http.fetch(url_, transformedOptions_);
|
|
5329
5308
|
}).then((_response: Response) => {
|
|
5330
|
-
return this.
|
|
5309
|
+
return this.processUpdateDowntimeReason(_response);
|
|
5331
5310
|
});
|
|
5332
5311
|
}
|
|
5333
5312
|
|
|
5334
|
-
protected
|
|
5313
|
+
protected processUpdateDowntimeReason(response: Response): Promise<DowntimeReasonDto> {
|
|
5335
5314
|
const status = response.status;
|
|
5336
5315
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5337
5316
|
if (status === 200) {
|
|
5338
5317
|
return response.text().then((_responseText) => {
|
|
5339
5318
|
let result200: any = null;
|
|
5340
5319
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5341
|
-
result200 =
|
|
5320
|
+
result200 = DowntimeReasonDto.fromJS(resultData200);
|
|
5342
5321
|
return result200;
|
|
5343
5322
|
});
|
|
5344
5323
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5346,34 +5325,30 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5346
5325
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5347
5326
|
});
|
|
5348
5327
|
}
|
|
5349
|
-
return Promise.resolve<
|
|
5328
|
+
return Promise.resolve<DowntimeReasonDto>(null as any);
|
|
5350
5329
|
}
|
|
5351
5330
|
|
|
5352
|
-
|
|
5353
|
-
let url_ = this.baseUrl + "/
|
|
5331
|
+
deleteDowntimeReason(id: string): Promise<void> {
|
|
5332
|
+
let url_ = this.baseUrl + "/downtimereasonsadmin/downtimereasons/{id}";
|
|
5354
5333
|
if (id === undefined || id === null)
|
|
5355
5334
|
throw new Error("The parameter 'id' must be defined.");
|
|
5356
5335
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5357
5336
|
url_ = url_.replace(/[?&]$/, "");
|
|
5358
5337
|
|
|
5359
|
-
const content_ = JSON.stringify(request);
|
|
5360
|
-
|
|
5361
5338
|
let options_: RequestInit = {
|
|
5362
|
-
|
|
5363
|
-
method: "PUT",
|
|
5339
|
+
method: "DELETE",
|
|
5364
5340
|
headers: {
|
|
5365
|
-
"Content-Type": "application/json",
|
|
5366
5341
|
}
|
|
5367
5342
|
};
|
|
5368
5343
|
|
|
5369
5344
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5370
5345
|
return this.http.fetch(url_, transformedOptions_);
|
|
5371
5346
|
}).then((_response: Response) => {
|
|
5372
|
-
return this.
|
|
5347
|
+
return this.processDeleteDowntimeReason(_response);
|
|
5373
5348
|
});
|
|
5374
5349
|
}
|
|
5375
5350
|
|
|
5376
|
-
protected
|
|
5351
|
+
protected processDeleteDowntimeReason(response: Response): Promise<void> {
|
|
5377
5352
|
const status = response.status;
|
|
5378
5353
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5379
5354
|
if (status === 204) {
|
|
@@ -5388,50 +5363,82 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5388
5363
|
return Promise.resolve<void>(null as any);
|
|
5389
5364
|
}
|
|
5390
5365
|
|
|
5391
|
-
|
|
5392
|
-
let url_ = this.baseUrl + "/
|
|
5393
|
-
if (id === undefined || id === null)
|
|
5394
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
5395
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5366
|
+
listMachineTypes(): Promise<MachineTypeDto[]> {
|
|
5367
|
+
let url_ = this.baseUrl + "/downtimereasonsadmin/machinetypes";
|
|
5396
5368
|
url_ = url_.replace(/[?&]$/, "");
|
|
5397
5369
|
|
|
5398
5370
|
let options_: RequestInit = {
|
|
5399
|
-
method: "
|
|
5371
|
+
method: "GET",
|
|
5400
5372
|
headers: {
|
|
5373
|
+
"Accept": "application/json"
|
|
5401
5374
|
}
|
|
5402
5375
|
};
|
|
5403
5376
|
|
|
5404
5377
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5405
5378
|
return this.http.fetch(url_, transformedOptions_);
|
|
5406
5379
|
}).then((_response: Response) => {
|
|
5407
|
-
return this.
|
|
5380
|
+
return this.processListMachineTypes(_response);
|
|
5408
5381
|
});
|
|
5409
5382
|
}
|
|
5410
5383
|
|
|
5411
|
-
protected
|
|
5384
|
+
protected processListMachineTypes(response: Response): Promise<MachineTypeDto[]> {
|
|
5412
5385
|
const status = response.status;
|
|
5413
5386
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5414
|
-
if (status ===
|
|
5387
|
+
if (status === 200) {
|
|
5415
5388
|
return response.text().then((_responseText) => {
|
|
5416
|
-
|
|
5389
|
+
let result200: any = null;
|
|
5390
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5391
|
+
if (Array.isArray(resultData200)) {
|
|
5392
|
+
result200 = [] as any;
|
|
5393
|
+
for (let item of resultData200)
|
|
5394
|
+
result200!.push(MachineTypeDto.fromJS(item));
|
|
5395
|
+
}
|
|
5396
|
+
return result200;
|
|
5417
5397
|
});
|
|
5418
5398
|
} else if (status !== 200 && status !== 204) {
|
|
5419
5399
|
return response.text().then((_responseText) => {
|
|
5420
5400
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5421
5401
|
});
|
|
5422
5402
|
}
|
|
5423
|
-
return Promise.resolve<
|
|
5403
|
+
return Promise.resolve<MachineTypeDto[]>(null as any);
|
|
5404
|
+
}
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
export interface IDowntimeReasonsClient {
|
|
5408
|
+
|
|
5409
|
+
createDowntimePeriodReason(request: CreateDowntimePeriodReason): Promise<DowntimePeriodReasonDto>;
|
|
5410
|
+
|
|
5411
|
+
updateDowntimePeriodReason(id: number, request: UpdateDowntimePeriodReasonRequest): Promise<DowntimePeriodReasonDto>;
|
|
5412
|
+
|
|
5413
|
+
deleteDowntimeReason(id: number): Promise<void>;
|
|
5414
|
+
|
|
5415
|
+
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]>;
|
|
5416
|
+
|
|
5417
|
+
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto>;
|
|
5418
|
+
}
|
|
5419
|
+
|
|
5420
|
+
export class DowntimeReasonsClient extends AuthorizedApiBase implements IDowntimeReasonsClient {
|
|
5421
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
5422
|
+
private baseUrl: string;
|
|
5423
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
5424
|
+
|
|
5425
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
5426
|
+
super(configuration);
|
|
5427
|
+
this.http = http ? http : window as any;
|
|
5428
|
+
this.baseUrl = baseUrl ?? "";
|
|
5424
5429
|
}
|
|
5425
5430
|
|
|
5426
|
-
|
|
5427
|
-
let url_ = this.baseUrl + "/
|
|
5428
|
-
if (assetId !== undefined && assetId !== null)
|
|
5429
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5431
|
+
createDowntimePeriodReason(request: CreateDowntimePeriodReason): Promise<DowntimePeriodReasonDto> {
|
|
5432
|
+
let url_ = this.baseUrl + "/downtimereasons";
|
|
5430
5433
|
url_ = url_.replace(/[?&]$/, "");
|
|
5431
5434
|
|
|
5435
|
+
const content_ = JSON.stringify(request);
|
|
5436
|
+
|
|
5432
5437
|
let options_: RequestInit = {
|
|
5433
|
-
|
|
5438
|
+
body: content_,
|
|
5439
|
+
method: "POST",
|
|
5434
5440
|
headers: {
|
|
5441
|
+
"Content-Type": "application/json",
|
|
5435
5442
|
"Accept": "application/json"
|
|
5436
5443
|
}
|
|
5437
5444
|
};
|
|
@@ -5439,18 +5446,18 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5439
5446
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5440
5447
|
return this.http.fetch(url_, transformedOptions_);
|
|
5441
5448
|
}).then((_response: Response) => {
|
|
5442
|
-
return this.
|
|
5449
|
+
return this.processCreateDowntimePeriodReason(_response);
|
|
5443
5450
|
});
|
|
5444
5451
|
}
|
|
5445
5452
|
|
|
5446
|
-
protected
|
|
5453
|
+
protected processCreateDowntimePeriodReason(response: Response): Promise<DowntimePeriodReasonDto> {
|
|
5447
5454
|
const status = response.status;
|
|
5448
5455
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5449
5456
|
if (status === 200) {
|
|
5450
5457
|
return response.text().then((_responseText) => {
|
|
5451
5458
|
let result200: any = null;
|
|
5452
5459
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5453
|
-
result200 =
|
|
5460
|
+
result200 = DowntimePeriodReasonDto.fromJS(resultData200);
|
|
5454
5461
|
return result200;
|
|
5455
5462
|
});
|
|
5456
5463
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5458,23 +5465,23 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5458
5465
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5459
5466
|
});
|
|
5460
5467
|
}
|
|
5461
|
-
return Promise.resolve<
|
|
5468
|
+
return Promise.resolve<DowntimePeriodReasonDto>(null as any);
|
|
5462
5469
|
}
|
|
5463
5470
|
|
|
5464
|
-
|
|
5465
|
-
let url_ = this.baseUrl + "/
|
|
5471
|
+
updateDowntimePeriodReason(id: number, request: UpdateDowntimePeriodReasonRequest): Promise<DowntimePeriodReasonDto> {
|
|
5472
|
+
let url_ = this.baseUrl + "/downtimereasons/{id}";
|
|
5466
5473
|
if (id === undefined || id === null)
|
|
5467
5474
|
throw new Error("The parameter 'id' must be defined.");
|
|
5468
5475
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5469
|
-
if (startTime !== undefined && startTime !== null)
|
|
5470
|
-
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
5471
|
-
if (endTime !== undefined && endTime !== null)
|
|
5472
|
-
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
5473
5476
|
url_ = url_.replace(/[?&]$/, "");
|
|
5474
5477
|
|
|
5478
|
+
const content_ = JSON.stringify(request);
|
|
5479
|
+
|
|
5475
5480
|
let options_: RequestInit = {
|
|
5476
|
-
|
|
5481
|
+
body: content_,
|
|
5482
|
+
method: "PUT",
|
|
5477
5483
|
headers: {
|
|
5484
|
+
"Content-Type": "application/json",
|
|
5478
5485
|
"Accept": "application/json"
|
|
5479
5486
|
}
|
|
5480
5487
|
};
|
|
@@ -5482,22 +5489,18 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5482
5489
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5483
5490
|
return this.http.fetch(url_, transformedOptions_);
|
|
5484
5491
|
}).then((_response: Response) => {
|
|
5485
|
-
return this.
|
|
5492
|
+
return this.processUpdateDowntimePeriodReason(_response);
|
|
5486
5493
|
});
|
|
5487
5494
|
}
|
|
5488
5495
|
|
|
5489
|
-
protected
|
|
5496
|
+
protected processUpdateDowntimePeriodReason(response: Response): Promise<DowntimePeriodReasonDto> {
|
|
5490
5497
|
const status = response.status;
|
|
5491
5498
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5492
5499
|
if (status === 200) {
|
|
5493
5500
|
return response.text().then((_responseText) => {
|
|
5494
5501
|
let result200: any = null;
|
|
5495
5502
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5496
|
-
|
|
5497
|
-
result200 = [] as any;
|
|
5498
|
-
for (let item of resultData200)
|
|
5499
|
-
result200!.push(MachineStateDatapoint.fromJS(item));
|
|
5500
|
-
}
|
|
5503
|
+
result200 = DowntimePeriodReasonDto.fromJS(resultData200);
|
|
5501
5504
|
return result200;
|
|
5502
5505
|
});
|
|
5503
5506
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5505,54 +5508,49 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5505
5508
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5506
5509
|
});
|
|
5507
5510
|
}
|
|
5508
|
-
return Promise.resolve<
|
|
5511
|
+
return Promise.resolve<DowntimePeriodReasonDto>(null as any);
|
|
5509
5512
|
}
|
|
5510
5513
|
|
|
5511
|
-
|
|
5512
|
-
let url_ = this.baseUrl + "/
|
|
5514
|
+
deleteDowntimeReason(id: number): Promise<void> {
|
|
5515
|
+
let url_ = this.baseUrl + "/downtimereasons/{id}";
|
|
5513
5516
|
if (id === undefined || id === null)
|
|
5514
5517
|
throw new Error("The parameter 'id' must be defined.");
|
|
5515
5518
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5516
|
-
if (startTime !== undefined && startTime !== null)
|
|
5517
|
-
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
5518
|
-
if (endTime !== undefined && endTime !== null)
|
|
5519
|
-
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
5520
5519
|
url_ = url_.replace(/[?&]$/, "");
|
|
5521
5520
|
|
|
5522
5521
|
let options_: RequestInit = {
|
|
5523
|
-
method: "
|
|
5522
|
+
method: "DELETE",
|
|
5524
5523
|
headers: {
|
|
5525
|
-
"Accept": "application/json"
|
|
5526
5524
|
}
|
|
5527
5525
|
};
|
|
5528
5526
|
|
|
5529
5527
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5530
5528
|
return this.http.fetch(url_, transformedOptions_);
|
|
5531
5529
|
}).then((_response: Response) => {
|
|
5532
|
-
return this.
|
|
5530
|
+
return this.processDeleteDowntimeReason(_response);
|
|
5533
5531
|
});
|
|
5534
5532
|
}
|
|
5535
5533
|
|
|
5536
|
-
protected
|
|
5534
|
+
protected processDeleteDowntimeReason(response: Response): Promise<void> {
|
|
5537
5535
|
const status = response.status;
|
|
5538
5536
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5539
|
-
if (status ===
|
|
5537
|
+
if (status === 204) {
|
|
5540
5538
|
return response.text().then((_responseText) => {
|
|
5541
|
-
|
|
5542
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5543
|
-
result200 = MachineStatesSummaryDto.fromJS(resultData200);
|
|
5544
|
-
return result200;
|
|
5539
|
+
return;
|
|
5545
5540
|
});
|
|
5546
5541
|
} else if (status !== 200 && status !== 204) {
|
|
5547
5542
|
return response.text().then((_responseText) => {
|
|
5548
5543
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5549
5544
|
});
|
|
5550
5545
|
}
|
|
5551
|
-
return Promise.resolve<
|
|
5546
|
+
return Promise.resolve<void>(null as any);
|
|
5552
5547
|
}
|
|
5553
5548
|
|
|
5554
|
-
|
|
5555
|
-
let url_ = this.baseUrl + "/
|
|
5549
|
+
listDowntimeReasonsForMachine(id: number): Promise<DowntimeReasonDto[]> {
|
|
5550
|
+
let url_ = this.baseUrl + "/downtimereasons/machine/{id}/downtimereasons";
|
|
5551
|
+
if (id === undefined || id === null)
|
|
5552
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5553
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5556
5554
|
url_ = url_.replace(/[?&]$/, "");
|
|
5557
5555
|
|
|
5558
5556
|
let options_: RequestInit = {
|
|
@@ -5565,18 +5563,22 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5565
5563
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5566
5564
|
return this.http.fetch(url_, transformedOptions_);
|
|
5567
5565
|
}).then((_response: Response) => {
|
|
5568
|
-
return this.
|
|
5566
|
+
return this.processListDowntimeReasonsForMachine(_response);
|
|
5569
5567
|
});
|
|
5570
5568
|
}
|
|
5571
5569
|
|
|
5572
|
-
protected
|
|
5570
|
+
protected processListDowntimeReasonsForMachine(response: Response): Promise<DowntimeReasonDto[]> {
|
|
5573
5571
|
const status = response.status;
|
|
5574
5572
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5575
5573
|
if (status === 200) {
|
|
5576
5574
|
return response.text().then((_responseText) => {
|
|
5577
5575
|
let result200: any = null;
|
|
5578
5576
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5579
|
-
|
|
5577
|
+
if (Array.isArray(resultData200)) {
|
|
5578
|
+
result200 = [] as any;
|
|
5579
|
+
for (let item of resultData200)
|
|
5580
|
+
result200!.push(DowntimeReasonDto.fromJS(item));
|
|
5581
|
+
}
|
|
5580
5582
|
return result200;
|
|
5581
5583
|
});
|
|
5582
5584
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5584,14 +5586,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5584
5586
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5585
5587
|
});
|
|
5586
5588
|
}
|
|
5587
|
-
return Promise.resolve<
|
|
5589
|
+
return Promise.resolve<DowntimeReasonDto[]>(null as any);
|
|
5588
5590
|
}
|
|
5589
5591
|
|
|
5590
|
-
|
|
5591
|
-
let url_ = this.baseUrl + "/
|
|
5592
|
-
if (id === undefined || id === null)
|
|
5593
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
5594
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5592
|
+
listTopDowntimeReasons(): Promise<TopDowntimeReasonsDto> {
|
|
5593
|
+
let url_ = this.baseUrl + "/downtimereasons/topreasons";
|
|
5595
5594
|
url_ = url_.replace(/[?&]$/, "");
|
|
5596
5595
|
|
|
5597
5596
|
let options_: RequestInit = {
|
|
@@ -5604,18 +5603,18 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5604
5603
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5605
5604
|
return this.http.fetch(url_, transformedOptions_);
|
|
5606
5605
|
}).then((_response: Response) => {
|
|
5607
|
-
return this.
|
|
5606
|
+
return this.processListTopDowntimeReasons(_response);
|
|
5608
5607
|
});
|
|
5609
5608
|
}
|
|
5610
5609
|
|
|
5611
|
-
protected
|
|
5610
|
+
protected processListTopDowntimeReasons(response: Response): Promise<TopDowntimeReasonsDto> {
|
|
5612
5611
|
const status = response.status;
|
|
5613
5612
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5614
5613
|
if (status === 200) {
|
|
5615
5614
|
return response.text().then((_responseText) => {
|
|
5616
5615
|
let result200: any = null;
|
|
5617
5616
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5618
|
-
result200 =
|
|
5617
|
+
result200 = TopDowntimeReasonsDto.fromJS(resultData200);
|
|
5619
5618
|
return result200;
|
|
5620
5619
|
});
|
|
5621
5620
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5623,11 +5622,62 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5623
5622
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5624
5623
|
});
|
|
5625
5624
|
}
|
|
5626
|
-
return Promise.resolve<
|
|
5625
|
+
return Promise.resolve<TopDowntimeReasonsDto>(null as any);
|
|
5627
5626
|
}
|
|
5627
|
+
}
|
|
5628
5628
|
|
|
5629
|
-
|
|
5630
|
-
|
|
5629
|
+
export interface IMachinesClient {
|
|
5630
|
+
|
|
5631
|
+
listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]>;
|
|
5632
|
+
|
|
5633
|
+
listMachineGroups(): Promise<MachineGroupDto[]>;
|
|
5634
|
+
|
|
5635
|
+
createMachineGroup(request: CreateMachineGroup): Promise<CreateMachineGroupResponse>;
|
|
5636
|
+
|
|
5637
|
+
updateMachineGroup(id: string, request: UpdateMachineGroup): Promise<void>;
|
|
5638
|
+
|
|
5639
|
+
deleteMachineGroup(id: string): Promise<void>;
|
|
5640
|
+
|
|
5641
|
+
listCurrentMachineStates(assetId: number | null | undefined): Promise<MachineStateListDto>;
|
|
5642
|
+
|
|
5643
|
+
listMachineStates(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStateDatapoint[]>;
|
|
5644
|
+
|
|
5645
|
+
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto>;
|
|
5646
|
+
|
|
5647
|
+
listMachineErpData(): Promise<MachineErpDataListDto>;
|
|
5648
|
+
|
|
5649
|
+
getMachineErpData(id: number): Promise<MachineErpDataDto>;
|
|
5650
|
+
|
|
5651
|
+
getMachineUtilizationSummary(): Promise<UtilizationSummaryDto>;
|
|
5652
|
+
|
|
5653
|
+
getCrossCompanyUtilizationSummary(): Promise<CrossCompanyUtilizationSummaryDto>;
|
|
5654
|
+
|
|
5655
|
+
listCurrentMachineOperators(machineExternalId: string | null | undefined, operatorNameQuery: string | null | undefined): Promise<OperatorAndMachineDto[]>;
|
|
5656
|
+
|
|
5657
|
+
createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<void>;
|
|
5658
|
+
|
|
5659
|
+
createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<void>;
|
|
5660
|
+
|
|
5661
|
+
createResourceWithMachine(request: CreateResourceWithMachine): Promise<void>;
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
export class MachinesClient extends AuthorizedApiBase implements IMachinesClient {
|
|
5665
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
5666
|
+
private baseUrl: string;
|
|
5667
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
5668
|
+
|
|
5669
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
5670
|
+
super(configuration);
|
|
5671
|
+
this.http = http ? http : window as any;
|
|
5672
|
+
this.baseUrl = baseUrl ?? "";
|
|
5673
|
+
}
|
|
5674
|
+
|
|
5675
|
+
listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]> {
|
|
5676
|
+
let url_ = this.baseUrl + "/machines?";
|
|
5677
|
+
if (onlyConnectedMachines === null)
|
|
5678
|
+
throw new Error("The parameter 'onlyConnectedMachines' cannot be null.");
|
|
5679
|
+
else if (onlyConnectedMachines !== undefined)
|
|
5680
|
+
url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
|
|
5631
5681
|
url_ = url_.replace(/[?&]$/, "");
|
|
5632
5682
|
|
|
5633
5683
|
let options_: RequestInit = {
|
|
@@ -5640,18 +5690,22 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5640
5690
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5641
5691
|
return this.http.fetch(url_, transformedOptions_);
|
|
5642
5692
|
}).then((_response: Response) => {
|
|
5643
|
-
return this.
|
|
5693
|
+
return this.processListMachines(_response);
|
|
5644
5694
|
});
|
|
5645
5695
|
}
|
|
5646
5696
|
|
|
5647
|
-
protected
|
|
5697
|
+
protected processListMachines(response: Response): Promise<MachineDto[]> {
|
|
5648
5698
|
const status = response.status;
|
|
5649
5699
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5650
5700
|
if (status === 200) {
|
|
5651
5701
|
return response.text().then((_responseText) => {
|
|
5652
5702
|
let result200: any = null;
|
|
5653
5703
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5654
|
-
|
|
5704
|
+
if (Array.isArray(resultData200)) {
|
|
5705
|
+
result200 = [] as any;
|
|
5706
|
+
for (let item of resultData200)
|
|
5707
|
+
result200!.push(MachineDto.fromJS(item));
|
|
5708
|
+
}
|
|
5655
5709
|
return result200;
|
|
5656
5710
|
});
|
|
5657
5711
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5659,15 +5713,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5659
5713
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5660
5714
|
});
|
|
5661
5715
|
}
|
|
5662
|
-
return Promise.resolve<
|
|
5716
|
+
return Promise.resolve<MachineDto[]>(null as any);
|
|
5663
5717
|
}
|
|
5664
5718
|
|
|
5665
|
-
|
|
5666
|
-
let url_ = this.baseUrl + "/machines/
|
|
5667
|
-
if (machineExternalId !== undefined && machineExternalId !== null)
|
|
5668
|
-
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
5669
|
-
if (operatorNameQuery !== undefined && operatorNameQuery !== null)
|
|
5670
|
-
url_ += "operatorNameQuery=" + encodeURIComponent("" + operatorNameQuery) + "&";
|
|
5719
|
+
listMachineGroups(): Promise<MachineGroupDto[]> {
|
|
5720
|
+
let url_ = this.baseUrl + "/machines/groups";
|
|
5671
5721
|
url_ = url_.replace(/[?&]$/, "");
|
|
5672
5722
|
|
|
5673
5723
|
let options_: RequestInit = {
|
|
@@ -5680,11 +5730,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5680
5730
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5681
5731
|
return this.http.fetch(url_, transformedOptions_);
|
|
5682
5732
|
}).then((_response: Response) => {
|
|
5683
|
-
return this.
|
|
5733
|
+
return this.processListMachineGroups(_response);
|
|
5684
5734
|
});
|
|
5685
5735
|
}
|
|
5686
5736
|
|
|
5687
|
-
protected
|
|
5737
|
+
protected processListMachineGroups(response: Response): Promise<MachineGroupDto[]> {
|
|
5688
5738
|
const status = response.status;
|
|
5689
5739
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5690
5740
|
if (status === 200) {
|
|
@@ -5694,7 +5744,7 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5694
5744
|
if (Array.isArray(resultData200)) {
|
|
5695
5745
|
result200 = [] as any;
|
|
5696
5746
|
for (let item of resultData200)
|
|
5697
|
-
result200!.push(
|
|
5747
|
+
result200!.push(MachineGroupDto.fromJS(item));
|
|
5698
5748
|
}
|
|
5699
5749
|
return result200;
|
|
5700
5750
|
});
|
|
@@ -5703,11 +5753,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5703
5753
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5704
5754
|
});
|
|
5705
5755
|
}
|
|
5706
|
-
return Promise.resolve<
|
|
5756
|
+
return Promise.resolve<MachineGroupDto[]>(null as any);
|
|
5707
5757
|
}
|
|
5708
5758
|
|
|
5709
|
-
|
|
5710
|
-
let url_ = this.baseUrl + "/machines/
|
|
5759
|
+
createMachineGroup(request: CreateMachineGroup): Promise<CreateMachineGroupResponse> {
|
|
5760
|
+
let url_ = this.baseUrl + "/machines/groups";
|
|
5711
5761
|
url_ = url_.replace(/[?&]$/, "");
|
|
5712
5762
|
|
|
5713
5763
|
const content_ = JSON.stringify(request);
|
|
@@ -5717,40 +5767,47 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5717
5767
|
method: "POST",
|
|
5718
5768
|
headers: {
|
|
5719
5769
|
"Content-Type": "application/json",
|
|
5770
|
+
"Accept": "application/json"
|
|
5720
5771
|
}
|
|
5721
5772
|
};
|
|
5722
5773
|
|
|
5723
5774
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5724
5775
|
return this.http.fetch(url_, transformedOptions_);
|
|
5725
5776
|
}).then((_response: Response) => {
|
|
5726
|
-
return this.
|
|
5777
|
+
return this.processCreateMachineGroup(_response);
|
|
5727
5778
|
});
|
|
5728
5779
|
}
|
|
5729
5780
|
|
|
5730
|
-
protected
|
|
5781
|
+
protected processCreateMachineGroup(response: Response): Promise<CreateMachineGroupResponse> {
|
|
5731
5782
|
const status = response.status;
|
|
5732
5783
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5733
|
-
if (status ===
|
|
5784
|
+
if (status === 200) {
|
|
5734
5785
|
return response.text().then((_responseText) => {
|
|
5735
|
-
|
|
5786
|
+
let result200: any = null;
|
|
5787
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5788
|
+
result200 = CreateMachineGroupResponse.fromJS(resultData200);
|
|
5789
|
+
return result200;
|
|
5736
5790
|
});
|
|
5737
5791
|
} else if (status !== 200 && status !== 204) {
|
|
5738
5792
|
return response.text().then((_responseText) => {
|
|
5739
5793
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5740
5794
|
});
|
|
5741
5795
|
}
|
|
5742
|
-
return Promise.resolve<
|
|
5796
|
+
return Promise.resolve<CreateMachineGroupResponse>(null as any);
|
|
5743
5797
|
}
|
|
5744
5798
|
|
|
5745
|
-
|
|
5746
|
-
let url_ = this.baseUrl + "/machines/
|
|
5799
|
+
updateMachineGroup(id: string, request: UpdateMachineGroup): Promise<void> {
|
|
5800
|
+
let url_ = this.baseUrl + "/machines/groups/{id}";
|
|
5801
|
+
if (id === undefined || id === null)
|
|
5802
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5803
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5747
5804
|
url_ = url_.replace(/[?&]$/, "");
|
|
5748
5805
|
|
|
5749
5806
|
const content_ = JSON.stringify(request);
|
|
5750
5807
|
|
|
5751
5808
|
let options_: RequestInit = {
|
|
5752
5809
|
body: content_,
|
|
5753
|
-
method: "
|
|
5810
|
+
method: "PUT",
|
|
5754
5811
|
headers: {
|
|
5755
5812
|
"Content-Type": "application/json",
|
|
5756
5813
|
}
|
|
@@ -5759,11 +5816,11 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5759
5816
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5760
5817
|
return this.http.fetch(url_, transformedOptions_);
|
|
5761
5818
|
}).then((_response: Response) => {
|
|
5762
|
-
return this.
|
|
5819
|
+
return this.processUpdateMachineGroup(_response);
|
|
5763
5820
|
});
|
|
5764
5821
|
}
|
|
5765
5822
|
|
|
5766
|
-
protected
|
|
5823
|
+
protected processUpdateMachineGroup(response: Response): Promise<void> {
|
|
5767
5824
|
const status = response.status;
|
|
5768
5825
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5769
5826
|
if (status === 204) {
|
|
@@ -5778,28 +5835,27 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5778
5835
|
return Promise.resolve<void>(null as any);
|
|
5779
5836
|
}
|
|
5780
5837
|
|
|
5781
|
-
|
|
5782
|
-
let url_ = this.baseUrl + "/machines/
|
|
5838
|
+
deleteMachineGroup(id: string): Promise<void> {
|
|
5839
|
+
let url_ = this.baseUrl + "/machines/groups/{id}";
|
|
5840
|
+
if (id === undefined || id === null)
|
|
5841
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5842
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5783
5843
|
url_ = url_.replace(/[?&]$/, "");
|
|
5784
5844
|
|
|
5785
|
-
const content_ = JSON.stringify(request);
|
|
5786
|
-
|
|
5787
5845
|
let options_: RequestInit = {
|
|
5788
|
-
|
|
5789
|
-
method: "POST",
|
|
5846
|
+
method: "DELETE",
|
|
5790
5847
|
headers: {
|
|
5791
|
-
"Content-Type": "application/json",
|
|
5792
5848
|
}
|
|
5793
5849
|
};
|
|
5794
5850
|
|
|
5795
5851
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5796
5852
|
return this.http.fetch(url_, transformedOptions_);
|
|
5797
5853
|
}).then((_response: Response) => {
|
|
5798
|
-
return this.
|
|
5854
|
+
return this.processDeleteMachineGroup(_response);
|
|
5799
5855
|
});
|
|
5800
5856
|
}
|
|
5801
5857
|
|
|
5802
|
-
protected
|
|
5858
|
+
protected processDeleteMachineGroup(response: Response): Promise<void> {
|
|
5803
5859
|
const status = response.status;
|
|
5804
5860
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5805
5861
|
if (status === 204) {
|
|
@@ -5813,34 +5869,54 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
5813
5869
|
}
|
|
5814
5870
|
return Promise.resolve<void>(null as any);
|
|
5815
5871
|
}
|
|
5816
|
-
}
|
|
5817
5872
|
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
getAllLinkScopes(): Promise<string[]>;
|
|
5873
|
+
listCurrentMachineStates(assetId: number | null | undefined): Promise<MachineStateListDto> {
|
|
5874
|
+
let url_ = this.baseUrl + "/machines/states/now?";
|
|
5875
|
+
if (assetId !== undefined && assetId !== null)
|
|
5876
|
+
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5877
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5825
5878
|
|
|
5826
|
-
|
|
5827
|
-
|
|
5879
|
+
let options_: RequestInit = {
|
|
5880
|
+
method: "GET",
|
|
5881
|
+
headers: {
|
|
5882
|
+
"Accept": "application/json"
|
|
5883
|
+
}
|
|
5884
|
+
};
|
|
5828
5885
|
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5886
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5887
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5888
|
+
}).then((_response: Response) => {
|
|
5889
|
+
return this.processListCurrentMachineStates(_response);
|
|
5890
|
+
});
|
|
5891
|
+
}
|
|
5833
5892
|
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5893
|
+
protected processListCurrentMachineStates(response: Response): Promise<MachineStateListDto> {
|
|
5894
|
+
const status = response.status;
|
|
5895
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5896
|
+
if (status === 200) {
|
|
5897
|
+
return response.text().then((_responseText) => {
|
|
5898
|
+
let result200: any = null;
|
|
5899
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5900
|
+
result200 = MachineStateListDto.fromJS(resultData200);
|
|
5901
|
+
return result200;
|
|
5902
|
+
});
|
|
5903
|
+
} else if (status !== 200 && status !== 204) {
|
|
5904
|
+
return response.text().then((_responseText) => {
|
|
5905
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5906
|
+
});
|
|
5907
|
+
}
|
|
5908
|
+
return Promise.resolve<MachineStateListDto>(null as any);
|
|
5838
5909
|
}
|
|
5839
5910
|
|
|
5840
|
-
|
|
5841
|
-
let url_ = this.baseUrl + "/
|
|
5842
|
-
if (
|
|
5843
|
-
|
|
5911
|
+
listMachineStates(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStateDatapoint[]> {
|
|
5912
|
+
let url_ = this.baseUrl + "/machines/{id}/states?";
|
|
5913
|
+
if (id === undefined || id === null)
|
|
5914
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5915
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5916
|
+
if (startTime !== undefined && startTime !== null)
|
|
5917
|
+
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
5918
|
+
if (endTime !== undefined && endTime !== null)
|
|
5919
|
+
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
5844
5920
|
url_ = url_.replace(/[?&]$/, "");
|
|
5845
5921
|
|
|
5846
5922
|
let options_: RequestInit = {
|
|
@@ -5853,11 +5929,11 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5853
5929
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5854
5930
|
return this.http.fetch(url_, transformedOptions_);
|
|
5855
5931
|
}).then((_response: Response) => {
|
|
5856
|
-
return this.
|
|
5932
|
+
return this.processListMachineStates(_response);
|
|
5857
5933
|
});
|
|
5858
5934
|
}
|
|
5859
5935
|
|
|
5860
|
-
protected
|
|
5936
|
+
protected processListMachineStates(response: Response): Promise<MachineStateDatapoint[]> {
|
|
5861
5937
|
const status = response.status;
|
|
5862
5938
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5863
5939
|
if (status === 200) {
|
|
@@ -5867,7 +5943,7 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5867
5943
|
if (Array.isArray(resultData200)) {
|
|
5868
5944
|
result200 = [] as any;
|
|
5869
5945
|
for (let item of resultData200)
|
|
5870
|
-
result200!.push(
|
|
5946
|
+
result200!.push(MachineStateDatapoint.fromJS(item));
|
|
5871
5947
|
}
|
|
5872
5948
|
return result200;
|
|
5873
5949
|
});
|
|
@@ -5876,20 +5952,23 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5876
5952
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5877
5953
|
});
|
|
5878
5954
|
}
|
|
5879
|
-
return Promise.resolve<
|
|
5955
|
+
return Promise.resolve<MachineStateDatapoint[]>(null as any);
|
|
5880
5956
|
}
|
|
5881
5957
|
|
|
5882
|
-
|
|
5883
|
-
let url_ = this.baseUrl + "/
|
|
5958
|
+
getMachineStatesSummary(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<MachineStatesSummaryDto> {
|
|
5959
|
+
let url_ = this.baseUrl + "/machines/{id}/states/summary?";
|
|
5960
|
+
if (id === undefined || id === null)
|
|
5961
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5962
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5963
|
+
if (startTime !== undefined && startTime !== null)
|
|
5964
|
+
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
5965
|
+
if (endTime !== undefined && endTime !== null)
|
|
5966
|
+
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
5884
5967
|
url_ = url_.replace(/[?&]$/, "");
|
|
5885
5968
|
|
|
5886
|
-
const content_ = JSON.stringify(request);
|
|
5887
|
-
|
|
5888
5969
|
let options_: RequestInit = {
|
|
5889
|
-
|
|
5890
|
-
method: "POST",
|
|
5970
|
+
method: "GET",
|
|
5891
5971
|
headers: {
|
|
5892
|
-
"Content-Type": "application/json",
|
|
5893
5972
|
"Accept": "application/json"
|
|
5894
5973
|
}
|
|
5895
5974
|
};
|
|
@@ -5897,18 +5976,18 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5897
5976
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5898
5977
|
return this.http.fetch(url_, transformedOptions_);
|
|
5899
5978
|
}).then((_response: Response) => {
|
|
5900
|
-
return this.
|
|
5979
|
+
return this.processGetMachineStatesSummary(_response);
|
|
5901
5980
|
});
|
|
5902
5981
|
}
|
|
5903
5982
|
|
|
5904
|
-
protected
|
|
5983
|
+
protected processGetMachineStatesSummary(response: Response): Promise<MachineStatesSummaryDto> {
|
|
5905
5984
|
const status = response.status;
|
|
5906
5985
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5907
5986
|
if (status === 200) {
|
|
5908
5987
|
return response.text().then((_responseText) => {
|
|
5909
5988
|
let result200: any = null;
|
|
5910
5989
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5911
|
-
result200 =
|
|
5990
|
+
result200 = MachineStatesSummaryDto.fromJS(resultData200);
|
|
5912
5991
|
return result200;
|
|
5913
5992
|
});
|
|
5914
5993
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5916,11 +5995,11 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5916
5995
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5917
5996
|
});
|
|
5918
5997
|
}
|
|
5919
|
-
return Promise.resolve<
|
|
5998
|
+
return Promise.resolve<MachineStatesSummaryDto>(null as any);
|
|
5920
5999
|
}
|
|
5921
6000
|
|
|
5922
|
-
|
|
5923
|
-
let url_ = this.baseUrl + "/
|
|
6001
|
+
listMachineErpData(): Promise<MachineErpDataListDto> {
|
|
6002
|
+
let url_ = this.baseUrl + "/machines/erp";
|
|
5924
6003
|
url_ = url_.replace(/[?&]$/, "");
|
|
5925
6004
|
|
|
5926
6005
|
let options_: RequestInit = {
|
|
@@ -5933,22 +6012,18 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5933
6012
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5934
6013
|
return this.http.fetch(url_, transformedOptions_);
|
|
5935
6014
|
}).then((_response: Response) => {
|
|
5936
|
-
return this.
|
|
6015
|
+
return this.processListMachineErpData(_response);
|
|
5937
6016
|
});
|
|
5938
6017
|
}
|
|
5939
6018
|
|
|
5940
|
-
protected
|
|
6019
|
+
protected processListMachineErpData(response: Response): Promise<MachineErpDataListDto> {
|
|
5941
6020
|
const status = response.status;
|
|
5942
6021
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5943
6022
|
if (status === 200) {
|
|
5944
6023
|
return response.text().then((_responseText) => {
|
|
5945
6024
|
let result200: any = null;
|
|
5946
6025
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
5947
|
-
|
|
5948
|
-
result200 = [] as any;
|
|
5949
|
-
for (let item of resultData200)
|
|
5950
|
-
result200!.push(item);
|
|
5951
|
-
}
|
|
6026
|
+
result200 = MachineErpDataListDto.fromJS(resultData200);
|
|
5952
6027
|
return result200;
|
|
5953
6028
|
});
|
|
5954
6029
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -5956,68 +6031,86 @@ export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
|
5956
6031
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5957
6032
|
});
|
|
5958
6033
|
}
|
|
5959
|
-
return Promise.resolve<
|
|
6034
|
+
return Promise.resolve<MachineErpDataListDto>(null as any);
|
|
5960
6035
|
}
|
|
5961
6036
|
|
|
5962
|
-
|
|
5963
|
-
let url_ = this.baseUrl + "/
|
|
6037
|
+
getMachineErpData(id: number): Promise<MachineErpDataDto> {
|
|
6038
|
+
let url_ = this.baseUrl + "/machines/{id}/erp";
|
|
5964
6039
|
if (id === undefined || id === null)
|
|
5965
6040
|
throw new Error("The parameter 'id' must be defined.");
|
|
5966
6041
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5967
|
-
if (scope !== undefined && scope !== null)
|
|
5968
|
-
url_ += "scope=" + encodeURIComponent("" + scope) + "&";
|
|
5969
6042
|
url_ = url_.replace(/[?&]$/, "");
|
|
5970
6043
|
|
|
5971
6044
|
let options_: RequestInit = {
|
|
5972
|
-
method: "
|
|
6045
|
+
method: "GET",
|
|
5973
6046
|
headers: {
|
|
6047
|
+
"Accept": "application/json"
|
|
5974
6048
|
}
|
|
5975
6049
|
};
|
|
5976
6050
|
|
|
5977
6051
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5978
6052
|
return this.http.fetch(url_, transformedOptions_);
|
|
5979
6053
|
}).then((_response: Response) => {
|
|
5980
|
-
return this.
|
|
6054
|
+
return this.processGetMachineErpData(_response);
|
|
5981
6055
|
});
|
|
5982
6056
|
}
|
|
5983
6057
|
|
|
5984
|
-
protected
|
|
6058
|
+
protected processGetMachineErpData(response: Response): Promise<MachineErpDataDto> {
|
|
5985
6059
|
const status = response.status;
|
|
5986
6060
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5987
|
-
if (status ===
|
|
6061
|
+
if (status === 200) {
|
|
5988
6062
|
return response.text().then((_responseText) => {
|
|
5989
|
-
|
|
6063
|
+
let result200: any = null;
|
|
6064
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6065
|
+
result200 = MachineErpDataDto.fromJS(resultData200);
|
|
6066
|
+
return result200;
|
|
5990
6067
|
});
|
|
5991
6068
|
} else if (status !== 200 && status !== 204) {
|
|
5992
6069
|
return response.text().then((_responseText) => {
|
|
5993
6070
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5994
6071
|
});
|
|
5995
6072
|
}
|
|
5996
|
-
return Promise.resolve<
|
|
6073
|
+
return Promise.resolve<MachineErpDataDto>(null as any);
|
|
5997
6074
|
}
|
|
5998
|
-
}
|
|
5999
6075
|
|
|
6000
|
-
|
|
6076
|
+
getMachineUtilizationSummary(): Promise<UtilizationSummaryDto> {
|
|
6077
|
+
let url_ = this.baseUrl + "/machines/utilization/summary";
|
|
6078
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6001
6079
|
|
|
6002
|
-
|
|
6003
|
-
|
|
6080
|
+
let options_: RequestInit = {
|
|
6081
|
+
method: "GET",
|
|
6082
|
+
headers: {
|
|
6083
|
+
"Accept": "application/json"
|
|
6084
|
+
}
|
|
6085
|
+
};
|
|
6004
6086
|
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6087
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6088
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6089
|
+
}).then((_response: Response) => {
|
|
6090
|
+
return this.processGetMachineUtilizationSummary(_response);
|
|
6091
|
+
});
|
|
6092
|
+
}
|
|
6009
6093
|
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6094
|
+
protected processGetMachineUtilizationSummary(response: Response): Promise<UtilizationSummaryDto> {
|
|
6095
|
+
const status = response.status;
|
|
6096
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6097
|
+
if (status === 200) {
|
|
6098
|
+
return response.text().then((_responseText) => {
|
|
6099
|
+
let result200: any = null;
|
|
6100
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6101
|
+
result200 = UtilizationSummaryDto.fromJS(resultData200);
|
|
6102
|
+
return result200;
|
|
6103
|
+
});
|
|
6104
|
+
} else if (status !== 200 && status !== 204) {
|
|
6105
|
+
return response.text().then((_responseText) => {
|
|
6106
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6107
|
+
});
|
|
6108
|
+
}
|
|
6109
|
+
return Promise.resolve<UtilizationSummaryDto>(null as any);
|
|
6014
6110
|
}
|
|
6015
6111
|
|
|
6016
|
-
|
|
6017
|
-
let url_ = this.baseUrl + "/
|
|
6018
|
-
if (serviceName === undefined || serviceName === null)
|
|
6019
|
-
throw new Error("The parameter 'serviceName' must be defined.");
|
|
6020
|
-
url_ = url_.replace("{serviceName}", encodeURIComponent("" + serviceName));
|
|
6112
|
+
getCrossCompanyUtilizationSummary(): Promise<CrossCompanyUtilizationSummaryDto> {
|
|
6113
|
+
let url_ = this.baseUrl + "/machines/utilization/cross-company";
|
|
6021
6114
|
url_ = url_.replace(/[?&]$/, "");
|
|
6022
6115
|
|
|
6023
6116
|
let options_: RequestInit = {
|
|
@@ -6030,18 +6123,18 @@ export class ExternalServicesClient extends AuthorizedApiBase implements IExtern
|
|
|
6030
6123
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6031
6124
|
return this.http.fetch(url_, transformedOptions_);
|
|
6032
6125
|
}).then((_response: Response) => {
|
|
6033
|
-
return this.
|
|
6126
|
+
return this.processGetCrossCompanyUtilizationSummary(_response);
|
|
6034
6127
|
});
|
|
6035
6128
|
}
|
|
6036
6129
|
|
|
6037
|
-
protected
|
|
6130
|
+
protected processGetCrossCompanyUtilizationSummary(response: Response): Promise<CrossCompanyUtilizationSummaryDto> {
|
|
6038
6131
|
const status = response.status;
|
|
6039
6132
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6040
6133
|
if (status === 200) {
|
|
6041
6134
|
return response.text().then((_responseText) => {
|
|
6042
6135
|
let result200: any = null;
|
|
6043
6136
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6044
|
-
result200 =
|
|
6137
|
+
result200 = CrossCompanyUtilizationSummaryDto.fromJS(resultData200);
|
|
6045
6138
|
return result200;
|
|
6046
6139
|
});
|
|
6047
6140
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6049,153 +6142,174 @@ export class ExternalServicesClient extends AuthorizedApiBase implements IExtern
|
|
|
6049
6142
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6050
6143
|
});
|
|
6051
6144
|
}
|
|
6052
|
-
return Promise.resolve<
|
|
6145
|
+
return Promise.resolve<CrossCompanyUtilizationSummaryDto>(null as any);
|
|
6053
6146
|
}
|
|
6054
|
-
}
|
|
6055
|
-
|
|
6056
|
-
export interface IDocumentsClient {
|
|
6057
6147
|
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6148
|
+
listCurrentMachineOperators(machineExternalId: string | null | undefined, operatorNameQuery: string | null | undefined): Promise<OperatorAndMachineDto[]> {
|
|
6149
|
+
let url_ = this.baseUrl + "/machines/operators?";
|
|
6150
|
+
if (machineExternalId !== undefined && machineExternalId !== null)
|
|
6151
|
+
url_ += "machineExternalId=" + encodeURIComponent("" + machineExternalId) + "&";
|
|
6152
|
+
if (operatorNameQuery !== undefined && operatorNameQuery !== null)
|
|
6153
|
+
url_ += "operatorNameQuery=" + encodeURIComponent("" + operatorNameQuery) + "&";
|
|
6154
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6062
6155
|
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
}
|
|
6156
|
+
let options_: RequestInit = {
|
|
6157
|
+
method: "GET",
|
|
6158
|
+
headers: {
|
|
6159
|
+
"Accept": "application/json"
|
|
6160
|
+
}
|
|
6161
|
+
};
|
|
6069
6162
|
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6163
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6164
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6165
|
+
}).then((_response: Response) => {
|
|
6166
|
+
return this.processListCurrentMachineOperators(_response);
|
|
6167
|
+
});
|
|
6168
|
+
}
|
|
6074
6169
|
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6170
|
+
protected processListCurrentMachineOperators(response: Response): Promise<OperatorAndMachineDto[]> {
|
|
6171
|
+
const status = response.status;
|
|
6172
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6173
|
+
if (status === 200) {
|
|
6174
|
+
return response.text().then((_responseText) => {
|
|
6175
|
+
let result200: any = null;
|
|
6176
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6177
|
+
if (Array.isArray(resultData200)) {
|
|
6178
|
+
result200 = [] as any;
|
|
6179
|
+
for (let item of resultData200)
|
|
6180
|
+
result200!.push(OperatorAndMachineDto.fromJS(item));
|
|
6181
|
+
}
|
|
6182
|
+
return result200;
|
|
6183
|
+
});
|
|
6184
|
+
} else if (status !== 200 && status !== 204) {
|
|
6185
|
+
return response.text().then((_responseText) => {
|
|
6186
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6187
|
+
});
|
|
6188
|
+
}
|
|
6189
|
+
return Promise.resolve<OperatorAndMachineDto[]>(null as any);
|
|
6079
6190
|
}
|
|
6080
6191
|
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
*/
|
|
6084
|
-
importDocument(importDocument: ImportDocument): Promise<ImportDocumentResultDto> {
|
|
6085
|
-
let url_ = this.baseUrl + "/documents/import";
|
|
6192
|
+
createMachineWithoutResource(request: CreateMachineWithoutResource): Promise<void> {
|
|
6193
|
+
let url_ = this.baseUrl + "/machines/machine-without-resource";
|
|
6086
6194
|
url_ = url_.replace(/[?&]$/, "");
|
|
6087
6195
|
|
|
6088
|
-
const content_ = JSON.stringify(
|
|
6196
|
+
const content_ = JSON.stringify(request);
|
|
6089
6197
|
|
|
6090
6198
|
let options_: RequestInit = {
|
|
6091
6199
|
body: content_,
|
|
6092
6200
|
method: "POST",
|
|
6093
6201
|
headers: {
|
|
6094
6202
|
"Content-Type": "application/json",
|
|
6095
|
-
"Accept": "application/json"
|
|
6096
6203
|
}
|
|
6097
6204
|
};
|
|
6098
6205
|
|
|
6099
6206
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6100
6207
|
return this.http.fetch(url_, transformedOptions_);
|
|
6101
6208
|
}).then((_response: Response) => {
|
|
6102
|
-
return this.
|
|
6209
|
+
return this.processCreateMachineWithoutResource(_response);
|
|
6103
6210
|
});
|
|
6104
6211
|
}
|
|
6105
6212
|
|
|
6106
|
-
protected
|
|
6213
|
+
protected processCreateMachineWithoutResource(response: Response): Promise<void> {
|
|
6107
6214
|
const status = response.status;
|
|
6108
6215
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6109
|
-
if (status ===
|
|
6216
|
+
if (status === 204) {
|
|
6110
6217
|
return response.text().then((_responseText) => {
|
|
6111
|
-
|
|
6112
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6113
|
-
result200 = ImportDocumentResultDto.fromJS(resultData200);
|
|
6114
|
-
return result200;
|
|
6218
|
+
return;
|
|
6115
6219
|
});
|
|
6116
6220
|
} else if (status !== 200 && status !== 204) {
|
|
6117
6221
|
return response.text().then((_responseText) => {
|
|
6118
6222
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6119
6223
|
});
|
|
6120
6224
|
}
|
|
6121
|
-
return Promise.resolve<
|
|
6225
|
+
return Promise.resolve<void>(null as any);
|
|
6122
6226
|
}
|
|
6123
6227
|
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
* @param importedReference (optional)
|
|
6127
|
-
*/
|
|
6128
|
-
checkIfImportedDocumentExists(importedReference: string | undefined): Promise<string> {
|
|
6129
|
-
let url_ = this.baseUrl + "/documents/importedrevisionexists?";
|
|
6130
|
-
if (importedReference === null)
|
|
6131
|
-
throw new Error("The parameter 'importedReference' cannot be null.");
|
|
6132
|
-
else if (importedReference !== undefined)
|
|
6133
|
-
url_ += "importedReference=" + encodeURIComponent("" + importedReference) + "&";
|
|
6228
|
+
createResourceWithoutMachine(request: CreateResourceWithoutMachine): Promise<void> {
|
|
6229
|
+
let url_ = this.baseUrl + "/machines/resource-without-machine";
|
|
6134
6230
|
url_ = url_.replace(/[?&]$/, "");
|
|
6135
6231
|
|
|
6232
|
+
const content_ = JSON.stringify(request);
|
|
6233
|
+
|
|
6136
6234
|
let options_: RequestInit = {
|
|
6137
|
-
|
|
6235
|
+
body: content_,
|
|
6236
|
+
method: "POST",
|
|
6138
6237
|
headers: {
|
|
6139
|
-
"
|
|
6238
|
+
"Content-Type": "application/json",
|
|
6140
6239
|
}
|
|
6141
6240
|
};
|
|
6142
6241
|
|
|
6143
6242
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6144
6243
|
return this.http.fetch(url_, transformedOptions_);
|
|
6145
6244
|
}).then((_response: Response) => {
|
|
6146
|
-
return this.
|
|
6245
|
+
return this.processCreateResourceWithoutMachine(_response);
|
|
6147
6246
|
});
|
|
6148
6247
|
}
|
|
6149
6248
|
|
|
6150
|
-
protected
|
|
6249
|
+
protected processCreateResourceWithoutMachine(response: Response): Promise<void> {
|
|
6151
6250
|
const status = response.status;
|
|
6152
6251
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6153
|
-
if (status ===
|
|
6252
|
+
if (status === 204) {
|
|
6154
6253
|
return response.text().then((_responseText) => {
|
|
6155
|
-
|
|
6156
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6157
|
-
result200 = resultData200;
|
|
6158
|
-
|
|
6159
|
-
return result200;
|
|
6254
|
+
return;
|
|
6160
6255
|
});
|
|
6161
6256
|
} else if (status !== 200 && status !== 204) {
|
|
6162
6257
|
return response.text().then((_responseText) => {
|
|
6163
6258
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6164
6259
|
});
|
|
6165
6260
|
}
|
|
6166
|
-
return Promise.resolve<
|
|
6261
|
+
return Promise.resolve<void>(null as any);
|
|
6167
6262
|
}
|
|
6168
|
-
}
|
|
6169
|
-
|
|
6170
|
-
export interface IDocumentTypesClient {
|
|
6171
|
-
|
|
6172
|
-
listDocumentTypes(includeInactive: boolean | undefined): Promise<DocumentTypeDto[]>;
|
|
6173
6263
|
|
|
6174
|
-
|
|
6264
|
+
createResourceWithMachine(request: CreateResourceWithMachine): Promise<void> {
|
|
6265
|
+
let url_ = this.baseUrl + "/machines/resource-with-machine";
|
|
6266
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6175
6267
|
|
|
6176
|
-
|
|
6268
|
+
const content_ = JSON.stringify(request);
|
|
6177
6269
|
|
|
6178
|
-
|
|
6270
|
+
let options_: RequestInit = {
|
|
6271
|
+
body: content_,
|
|
6272
|
+
method: "POST",
|
|
6273
|
+
headers: {
|
|
6274
|
+
"Content-Type": "application/json",
|
|
6275
|
+
}
|
|
6276
|
+
};
|
|
6179
6277
|
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6278
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6279
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6280
|
+
}).then((_response: Response) => {
|
|
6281
|
+
return this.processCreateResourceWithMachine(_response);
|
|
6282
|
+
});
|
|
6283
|
+
}
|
|
6184
6284
|
|
|
6185
|
-
|
|
6285
|
+
protected processCreateResourceWithMachine(response: Response): Promise<void> {
|
|
6286
|
+
const status = response.status;
|
|
6287
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6288
|
+
if (status === 204) {
|
|
6289
|
+
return response.text().then((_responseText) => {
|
|
6290
|
+
return;
|
|
6291
|
+
});
|
|
6292
|
+
} else if (status !== 200 && status !== 204) {
|
|
6293
|
+
return response.text().then((_responseText) => {
|
|
6294
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6295
|
+
});
|
|
6296
|
+
}
|
|
6297
|
+
return Promise.resolve<void>(null as any);
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6186
6300
|
|
|
6187
|
-
|
|
6301
|
+
export interface ILinksClient {
|
|
6188
6302
|
|
|
6189
|
-
|
|
6303
|
+
getAllLinks(scope: string | null | undefined): Promise<LinkDto[]>;
|
|
6190
6304
|
|
|
6191
|
-
|
|
6305
|
+
createLink(request: CreateLinkRequest): Promise<LinkDto>;
|
|
6192
6306
|
|
|
6193
|
-
|
|
6307
|
+
getAllLinkScopes(): Promise<string[]>;
|
|
6194
6308
|
|
|
6195
|
-
|
|
6309
|
+
deleteLink(id: string, scope: string | null | undefined): Promise<void>;
|
|
6196
6310
|
}
|
|
6197
6311
|
|
|
6198
|
-
export class
|
|
6312
|
+
export class LinksClient extends AuthorizedApiBase implements ILinksClient {
|
|
6199
6313
|
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
6200
6314
|
private baseUrl: string;
|
|
6201
6315
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
@@ -6206,12 +6320,10 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6206
6320
|
this.baseUrl = baseUrl ?? "";
|
|
6207
6321
|
}
|
|
6208
6322
|
|
|
6209
|
-
|
|
6210
|
-
let url_ = this.baseUrl + "/
|
|
6211
|
-
if (
|
|
6212
|
-
|
|
6213
|
-
else if (includeInactive !== undefined)
|
|
6214
|
-
url_ += "includeInactive=" + encodeURIComponent("" + includeInactive) + "&";
|
|
6323
|
+
getAllLinks(scope: string | null | undefined): Promise<LinkDto[]> {
|
|
6324
|
+
let url_ = this.baseUrl + "/links?";
|
|
6325
|
+
if (scope !== undefined && scope !== null)
|
|
6326
|
+
url_ += "scope=" + encodeURIComponent("" + scope) + "&";
|
|
6215
6327
|
url_ = url_.replace(/[?&]$/, "");
|
|
6216
6328
|
|
|
6217
6329
|
let options_: RequestInit = {
|
|
@@ -6224,11 +6336,11 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6224
6336
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6225
6337
|
return this.http.fetch(url_, transformedOptions_);
|
|
6226
6338
|
}).then((_response: Response) => {
|
|
6227
|
-
return this.
|
|
6339
|
+
return this.processGetAllLinks(_response);
|
|
6228
6340
|
});
|
|
6229
6341
|
}
|
|
6230
6342
|
|
|
6231
|
-
protected
|
|
6343
|
+
protected processGetAllLinks(response: Response): Promise<LinkDto[]> {
|
|
6232
6344
|
const status = response.status;
|
|
6233
6345
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6234
6346
|
if (status === 200) {
|
|
@@ -6238,7 +6350,7 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6238
6350
|
if (Array.isArray(resultData200)) {
|
|
6239
6351
|
result200 = [] as any;
|
|
6240
6352
|
for (let item of resultData200)
|
|
6241
|
-
result200!.push(
|
|
6353
|
+
result200!.push(LinkDto.fromJS(item));
|
|
6242
6354
|
}
|
|
6243
6355
|
return result200;
|
|
6244
6356
|
});
|
|
@@ -6247,11 +6359,11 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6247
6359
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6248
6360
|
});
|
|
6249
6361
|
}
|
|
6250
|
-
return Promise.resolve<
|
|
6362
|
+
return Promise.resolve<LinkDto[]>(null as any);
|
|
6251
6363
|
}
|
|
6252
6364
|
|
|
6253
|
-
|
|
6254
|
-
let url_ = this.baseUrl + "/
|
|
6365
|
+
createLink(request: CreateLinkRequest): Promise<LinkDto> {
|
|
6366
|
+
let url_ = this.baseUrl + "/links";
|
|
6255
6367
|
url_ = url_.replace(/[?&]$/, "");
|
|
6256
6368
|
|
|
6257
6369
|
const content_ = JSON.stringify(request);
|
|
@@ -6268,18 +6380,18 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6268
6380
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6269
6381
|
return this.http.fetch(url_, transformedOptions_);
|
|
6270
6382
|
}).then((_response: Response) => {
|
|
6271
|
-
return this.
|
|
6383
|
+
return this.processCreateLink(_response);
|
|
6272
6384
|
});
|
|
6273
6385
|
}
|
|
6274
6386
|
|
|
6275
|
-
protected
|
|
6387
|
+
protected processCreateLink(response: Response): Promise<LinkDto> {
|
|
6276
6388
|
const status = response.status;
|
|
6277
6389
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6278
6390
|
if (status === 200) {
|
|
6279
6391
|
return response.text().then((_responseText) => {
|
|
6280
6392
|
let result200: any = null;
|
|
6281
6393
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6282
|
-
result200 =
|
|
6394
|
+
result200 = LinkDto.fromJS(resultData200);
|
|
6283
6395
|
return result200;
|
|
6284
6396
|
});
|
|
6285
6397
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6287,14 +6399,11 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6287
6399
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6288
6400
|
});
|
|
6289
6401
|
}
|
|
6290
|
-
return Promise.resolve<
|
|
6402
|
+
return Promise.resolve<LinkDto>(null as any);
|
|
6291
6403
|
}
|
|
6292
6404
|
|
|
6293
|
-
|
|
6294
|
-
let url_ = this.baseUrl + "/
|
|
6295
|
-
if (id === undefined || id === null)
|
|
6296
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
6297
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6405
|
+
getAllLinkScopes(): Promise<string[]> {
|
|
6406
|
+
let url_ = this.baseUrl + "/links/scopes";
|
|
6298
6407
|
url_ = url_.replace(/[?&]$/, "");
|
|
6299
6408
|
|
|
6300
6409
|
let options_: RequestInit = {
|
|
@@ -6307,18 +6416,22 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6307
6416
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6308
6417
|
return this.http.fetch(url_, transformedOptions_);
|
|
6309
6418
|
}).then((_response: Response) => {
|
|
6310
|
-
return this.
|
|
6419
|
+
return this.processGetAllLinkScopes(_response);
|
|
6311
6420
|
});
|
|
6312
6421
|
}
|
|
6313
6422
|
|
|
6314
|
-
protected
|
|
6423
|
+
protected processGetAllLinkScopes(response: Response): Promise<string[]> {
|
|
6315
6424
|
const status = response.status;
|
|
6316
6425
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6317
6426
|
if (status === 200) {
|
|
6318
6427
|
return response.text().then((_responseText) => {
|
|
6319
6428
|
let result200: any = null;
|
|
6320
6429
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6321
|
-
|
|
6430
|
+
if (Array.isArray(resultData200)) {
|
|
6431
|
+
result200 = [] as any;
|
|
6432
|
+
for (let item of resultData200)
|
|
6433
|
+
result200!.push(item);
|
|
6434
|
+
}
|
|
6322
6435
|
return result200;
|
|
6323
6436
|
});
|
|
6324
6437
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6326,165 +6439,262 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6326
6439
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6327
6440
|
});
|
|
6328
6441
|
}
|
|
6329
|
-
return Promise.resolve<
|
|
6442
|
+
return Promise.resolve<string[]>(null as any);
|
|
6330
6443
|
}
|
|
6331
6444
|
|
|
6332
|
-
|
|
6333
|
-
let url_ = this.baseUrl + "/
|
|
6445
|
+
deleteLink(id: string, scope: string | null | undefined): Promise<void> {
|
|
6446
|
+
let url_ = this.baseUrl + "/links/{id}?";
|
|
6334
6447
|
if (id === undefined || id === null)
|
|
6335
6448
|
throw new Error("The parameter 'id' must be defined.");
|
|
6336
6449
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6450
|
+
if (scope !== undefined && scope !== null)
|
|
6451
|
+
url_ += "scope=" + encodeURIComponent("" + scope) + "&";
|
|
6337
6452
|
url_ = url_.replace(/[?&]$/, "");
|
|
6338
6453
|
|
|
6339
|
-
const content_ = JSON.stringify(request);
|
|
6340
|
-
|
|
6341
6454
|
let options_: RequestInit = {
|
|
6342
|
-
|
|
6343
|
-
method: "PUT",
|
|
6455
|
+
method: "DELETE",
|
|
6344
6456
|
headers: {
|
|
6345
|
-
"Content-Type": "application/json",
|
|
6346
|
-
"Accept": "application/json"
|
|
6347
6457
|
}
|
|
6348
6458
|
};
|
|
6349
6459
|
|
|
6350
6460
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6351
6461
|
return this.http.fetch(url_, transformedOptions_);
|
|
6352
6462
|
}).then((_response: Response) => {
|
|
6353
|
-
return this.
|
|
6463
|
+
return this.processDeleteLink(_response);
|
|
6354
6464
|
});
|
|
6355
6465
|
}
|
|
6356
6466
|
|
|
6357
|
-
protected
|
|
6467
|
+
protected processDeleteLink(response: Response): Promise<void> {
|
|
6358
6468
|
const status = response.status;
|
|
6359
6469
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6360
|
-
if (status ===
|
|
6470
|
+
if (status === 204) {
|
|
6361
6471
|
return response.text().then((_responseText) => {
|
|
6362
|
-
|
|
6363
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6364
|
-
result200 = DocumentTypeDto.fromJS(resultData200);
|
|
6365
|
-
return result200;
|
|
6472
|
+
return;
|
|
6366
6473
|
});
|
|
6367
6474
|
} else if (status !== 200 && status !== 204) {
|
|
6368
6475
|
return response.text().then((_responseText) => {
|
|
6369
6476
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6370
6477
|
});
|
|
6371
6478
|
}
|
|
6372
|
-
return Promise.resolve<
|
|
6479
|
+
return Promise.resolve<void>(null as any);
|
|
6373
6480
|
}
|
|
6481
|
+
}
|
|
6374
6482
|
|
|
6375
|
-
|
|
6376
|
-
* Delete document type. Only allowed if not used.
|
|
6377
|
-
*/
|
|
6378
|
-
deleteDocumentType(id: string): Promise<void> {
|
|
6379
|
-
let url_ = this.baseUrl + "/documenttypes/{id}";
|
|
6380
|
-
if (id === undefined || id === null)
|
|
6381
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
6382
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6383
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
6483
|
+
export interface IExternalServicesClient {
|
|
6384
6484
|
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6485
|
+
getCredential(serviceName: ExternalServiceName): Promise<ExternalServiceCredentialDto>;
|
|
6486
|
+
}
|
|
6487
|
+
|
|
6488
|
+
export class ExternalServicesClient extends AuthorizedApiBase implements IExternalServicesClient {
|
|
6489
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
6490
|
+
private baseUrl: string;
|
|
6491
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
6492
|
+
|
|
6493
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
6494
|
+
super(configuration);
|
|
6495
|
+
this.http = http ? http : window as any;
|
|
6496
|
+
this.baseUrl = baseUrl ?? "";
|
|
6497
|
+
}
|
|
6498
|
+
|
|
6499
|
+
getCredential(serviceName: ExternalServiceName): Promise<ExternalServiceCredentialDto> {
|
|
6500
|
+
let url_ = this.baseUrl + "/externalservices/credentials/{serviceName}";
|
|
6501
|
+
if (serviceName === undefined || serviceName === null)
|
|
6502
|
+
throw new Error("The parameter 'serviceName' must be defined.");
|
|
6503
|
+
url_ = url_.replace("{serviceName}", encodeURIComponent("" + serviceName));
|
|
6504
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6505
|
+
|
|
6506
|
+
let options_: RequestInit = {
|
|
6507
|
+
method: "GET",
|
|
6508
|
+
headers: {
|
|
6509
|
+
"Accept": "application/json"
|
|
6388
6510
|
}
|
|
6389
6511
|
};
|
|
6390
6512
|
|
|
6391
6513
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6392
6514
|
return this.http.fetch(url_, transformedOptions_);
|
|
6393
6515
|
}).then((_response: Response) => {
|
|
6394
|
-
return this.
|
|
6516
|
+
return this.processGetCredential(_response);
|
|
6395
6517
|
});
|
|
6396
6518
|
}
|
|
6397
6519
|
|
|
6398
|
-
protected
|
|
6520
|
+
protected processGetCredential(response: Response): Promise<ExternalServiceCredentialDto> {
|
|
6399
6521
|
const status = response.status;
|
|
6400
6522
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6401
|
-
if (status ===
|
|
6523
|
+
if (status === 200) {
|
|
6402
6524
|
return response.text().then((_responseText) => {
|
|
6403
|
-
|
|
6525
|
+
let result200: any = null;
|
|
6526
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6527
|
+
result200 = ExternalServiceCredentialDto.fromJS(resultData200);
|
|
6528
|
+
return result200;
|
|
6404
6529
|
});
|
|
6405
6530
|
} else if (status !== 200 && status !== 204) {
|
|
6406
6531
|
return response.text().then((_responseText) => {
|
|
6407
6532
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6408
6533
|
});
|
|
6409
6534
|
}
|
|
6410
|
-
return Promise.resolve<
|
|
6535
|
+
return Promise.resolve<ExternalServiceCredentialDto>(null as any);
|
|
6411
6536
|
}
|
|
6537
|
+
}
|
|
6412
6538
|
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6539
|
+
export interface IDocumentsClient {
|
|
6540
|
+
|
|
6541
|
+
/**
|
|
6542
|
+
* Import document with revisions from other systems.
|
|
6543
|
+
*/
|
|
6544
|
+
importDocument(importDocument: ImportDocument): Promise<ImportDocumentResultDto>;
|
|
6545
|
+
|
|
6546
|
+
/**
|
|
6547
|
+
* Checks if a document exists with import reference. Returns document id if document exists.
|
|
6548
|
+
* @param importedReference (optional)
|
|
6549
|
+
*/
|
|
6550
|
+
checkIfImportedDocumentExists(importedReference: string | undefined): Promise<string>;
|
|
6551
|
+
}
|
|
6552
|
+
|
|
6553
|
+
export class DocumentsClient extends AuthorizedApiBase implements IDocumentsClient {
|
|
6554
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
6555
|
+
private baseUrl: string;
|
|
6556
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
6557
|
+
|
|
6558
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
6559
|
+
super(configuration);
|
|
6560
|
+
this.http = http ? http : window as any;
|
|
6561
|
+
this.baseUrl = baseUrl ?? "";
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
/**
|
|
6565
|
+
* Import document with revisions from other systems.
|
|
6566
|
+
*/
|
|
6567
|
+
importDocument(importDocument: ImportDocument): Promise<ImportDocumentResultDto> {
|
|
6568
|
+
let url_ = this.baseUrl + "/documents/import";
|
|
6418
6569
|
url_ = url_.replace(/[?&]$/, "");
|
|
6419
6570
|
|
|
6571
|
+
const content_ = JSON.stringify(importDocument);
|
|
6572
|
+
|
|
6420
6573
|
let options_: RequestInit = {
|
|
6574
|
+
body: content_,
|
|
6421
6575
|
method: "POST",
|
|
6422
6576
|
headers: {
|
|
6577
|
+
"Content-Type": "application/json",
|
|
6578
|
+
"Accept": "application/json"
|
|
6423
6579
|
}
|
|
6424
6580
|
};
|
|
6425
6581
|
|
|
6426
6582
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6427
6583
|
return this.http.fetch(url_, transformedOptions_);
|
|
6428
6584
|
}).then((_response: Response) => {
|
|
6429
|
-
return this.
|
|
6585
|
+
return this.processImportDocument(_response);
|
|
6430
6586
|
});
|
|
6431
6587
|
}
|
|
6432
6588
|
|
|
6433
|
-
protected
|
|
6589
|
+
protected processImportDocument(response: Response): Promise<ImportDocumentResultDto> {
|
|
6434
6590
|
const status = response.status;
|
|
6435
6591
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6436
|
-
if (status ===
|
|
6592
|
+
if (status === 200) {
|
|
6437
6593
|
return response.text().then((_responseText) => {
|
|
6438
|
-
|
|
6594
|
+
let result200: any = null;
|
|
6595
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6596
|
+
result200 = ImportDocumentResultDto.fromJS(resultData200);
|
|
6597
|
+
return result200;
|
|
6439
6598
|
});
|
|
6440
6599
|
} else if (status !== 200 && status !== 204) {
|
|
6441
6600
|
return response.text().then((_responseText) => {
|
|
6442
6601
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6443
6602
|
});
|
|
6444
6603
|
}
|
|
6445
|
-
return Promise.resolve<
|
|
6604
|
+
return Promise.resolve<ImportDocumentResultDto>(null as any);
|
|
6446
6605
|
}
|
|
6447
6606
|
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6607
|
+
/**
|
|
6608
|
+
* Checks if a document exists with import reference. Returns document id if document exists.
|
|
6609
|
+
* @param importedReference (optional)
|
|
6610
|
+
*/
|
|
6611
|
+
checkIfImportedDocumentExists(importedReference: string | undefined): Promise<string> {
|
|
6612
|
+
let url_ = this.baseUrl + "/documents/importedrevisionexists?";
|
|
6613
|
+
if (importedReference === null)
|
|
6614
|
+
throw new Error("The parameter 'importedReference' cannot be null.");
|
|
6615
|
+
else if (importedReference !== undefined)
|
|
6616
|
+
url_ += "importedReference=" + encodeURIComponent("" + importedReference) + "&";
|
|
6453
6617
|
url_ = url_.replace(/[?&]$/, "");
|
|
6454
6618
|
|
|
6455
6619
|
let options_: RequestInit = {
|
|
6456
|
-
method: "
|
|
6620
|
+
method: "GET",
|
|
6457
6621
|
headers: {
|
|
6622
|
+
"Accept": "application/json"
|
|
6458
6623
|
}
|
|
6459
6624
|
};
|
|
6460
6625
|
|
|
6461
6626
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6462
6627
|
return this.http.fetch(url_, transformedOptions_);
|
|
6463
6628
|
}).then((_response: Response) => {
|
|
6464
|
-
return this.
|
|
6629
|
+
return this.processCheckIfImportedDocumentExists(_response);
|
|
6465
6630
|
});
|
|
6466
6631
|
}
|
|
6467
6632
|
|
|
6468
|
-
protected
|
|
6633
|
+
protected processCheckIfImportedDocumentExists(response: Response): Promise<string> {
|
|
6469
6634
|
const status = response.status;
|
|
6470
6635
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6471
|
-
if (status ===
|
|
6636
|
+
if (status === 200) {
|
|
6472
6637
|
return response.text().then((_responseText) => {
|
|
6473
|
-
|
|
6638
|
+
let result200: any = null;
|
|
6639
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6640
|
+
result200 = resultData200;
|
|
6641
|
+
|
|
6642
|
+
return result200;
|
|
6474
6643
|
});
|
|
6475
6644
|
} else if (status !== 200 && status !== 204) {
|
|
6476
6645
|
return response.text().then((_responseText) => {
|
|
6477
6646
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6478
6647
|
});
|
|
6479
6648
|
}
|
|
6480
|
-
return Promise.resolve<
|
|
6649
|
+
return Promise.resolve<string>(null as any);
|
|
6481
6650
|
}
|
|
6651
|
+
}
|
|
6482
6652
|
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6653
|
+
export interface IDocumentTypesClient {
|
|
6654
|
+
|
|
6655
|
+
listDocumentTypes(includeInactive: boolean | undefined): Promise<DocumentTypeDto[]>;
|
|
6656
|
+
|
|
6657
|
+
createDocumentType(request: CreateDocumentTypeRequest): Promise<DocumentTypeDto>;
|
|
6658
|
+
|
|
6659
|
+
getDocumentType(id: string): Promise<DocumentTypeDto>;
|
|
6660
|
+
|
|
6661
|
+
updateDocumentType(id: string, request: UpdateDocumentTypeRequest): Promise<DocumentTypeDto>;
|
|
6662
|
+
|
|
6663
|
+
/**
|
|
6664
|
+
* Delete document type. Only allowed if not used.
|
|
6665
|
+
*/
|
|
6666
|
+
deleteDocumentType(id: string): Promise<void>;
|
|
6667
|
+
|
|
6668
|
+
activateDocumentType(id: string): Promise<void>;
|
|
6669
|
+
|
|
6670
|
+
deactivateDocumentType(id: string): Promise<void>;
|
|
6671
|
+
|
|
6672
|
+
listDocumentTypeRules(id: string): Promise<DocumentTypeRuleDto[]>;
|
|
6673
|
+
|
|
6674
|
+
updateDocumentTypeRules(id: string, request: UpdateDocumentTypeRuleRequest): Promise<void>;
|
|
6675
|
+
|
|
6676
|
+
listAllDocumentRuleTypes(): Promise<DocumentTypeRuleTypeDto[]>;
|
|
6677
|
+
|
|
6678
|
+
listDocumentGenerators(): Promise<DocumentGeneratorTypeDto[]>;
|
|
6679
|
+
}
|
|
6680
|
+
|
|
6681
|
+
export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentTypesClient {
|
|
6682
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
6683
|
+
private baseUrl: string;
|
|
6684
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
6685
|
+
|
|
6686
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
6687
|
+
super(configuration);
|
|
6688
|
+
this.http = http ? http : window as any;
|
|
6689
|
+
this.baseUrl = baseUrl ?? "";
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6692
|
+
listDocumentTypes(includeInactive: boolean | undefined): Promise<DocumentTypeDto[]> {
|
|
6693
|
+
let url_ = this.baseUrl + "/documenttypes?";
|
|
6694
|
+
if (includeInactive === null)
|
|
6695
|
+
throw new Error("The parameter 'includeInactive' cannot be null.");
|
|
6696
|
+
else if (includeInactive !== undefined)
|
|
6697
|
+
url_ += "includeInactive=" + encodeURIComponent("" + includeInactive) + "&";
|
|
6488
6698
|
url_ = url_.replace(/[?&]$/, "");
|
|
6489
6699
|
|
|
6490
6700
|
let options_: RequestInit = {
|
|
@@ -6497,11 +6707,11 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6497
6707
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6498
6708
|
return this.http.fetch(url_, transformedOptions_);
|
|
6499
6709
|
}).then((_response: Response) => {
|
|
6500
|
-
return this.
|
|
6710
|
+
return this.processListDocumentTypes(_response);
|
|
6501
6711
|
});
|
|
6502
6712
|
}
|
|
6503
6713
|
|
|
6504
|
-
protected
|
|
6714
|
+
protected processListDocumentTypes(response: Response): Promise<DocumentTypeDto[]> {
|
|
6505
6715
|
const status = response.status;
|
|
6506
6716
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6507
6717
|
if (status === 200) {
|
|
@@ -6511,7 +6721,7 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6511
6721
|
if (Array.isArray(resultData200)) {
|
|
6512
6722
|
result200 = [] as any;
|
|
6513
6723
|
for (let item of resultData200)
|
|
6514
|
-
result200!.push(
|
|
6724
|
+
result200!.push(DocumentTypeDto.fromJS(item));
|
|
6515
6725
|
}
|
|
6516
6726
|
return result200;
|
|
6517
6727
|
});
|
|
@@ -6520,50 +6730,54 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6520
6730
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6521
6731
|
});
|
|
6522
6732
|
}
|
|
6523
|
-
return Promise.resolve<
|
|
6733
|
+
return Promise.resolve<DocumentTypeDto[]>(null as any);
|
|
6524
6734
|
}
|
|
6525
6735
|
|
|
6526
|
-
|
|
6527
|
-
let url_ = this.baseUrl + "/documenttypes
|
|
6528
|
-
if (id === undefined || id === null)
|
|
6529
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
6530
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6736
|
+
createDocumentType(request: CreateDocumentTypeRequest): Promise<DocumentTypeDto> {
|
|
6737
|
+
let url_ = this.baseUrl + "/documenttypes";
|
|
6531
6738
|
url_ = url_.replace(/[?&]$/, "");
|
|
6532
6739
|
|
|
6533
6740
|
const content_ = JSON.stringify(request);
|
|
6534
6741
|
|
|
6535
6742
|
let options_: RequestInit = {
|
|
6536
6743
|
body: content_,
|
|
6537
|
-
method: "
|
|
6744
|
+
method: "POST",
|
|
6538
6745
|
headers: {
|
|
6539
6746
|
"Content-Type": "application/json",
|
|
6747
|
+
"Accept": "application/json"
|
|
6540
6748
|
}
|
|
6541
6749
|
};
|
|
6542
6750
|
|
|
6543
6751
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6544
6752
|
return this.http.fetch(url_, transformedOptions_);
|
|
6545
6753
|
}).then((_response: Response) => {
|
|
6546
|
-
return this.
|
|
6754
|
+
return this.processCreateDocumentType(_response);
|
|
6547
6755
|
});
|
|
6548
6756
|
}
|
|
6549
6757
|
|
|
6550
|
-
protected
|
|
6758
|
+
protected processCreateDocumentType(response: Response): Promise<DocumentTypeDto> {
|
|
6551
6759
|
const status = response.status;
|
|
6552
6760
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6553
|
-
if (status ===
|
|
6761
|
+
if (status === 200) {
|
|
6554
6762
|
return response.text().then((_responseText) => {
|
|
6555
|
-
|
|
6763
|
+
let result200: any = null;
|
|
6764
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6765
|
+
result200 = DocumentTypeDto.fromJS(resultData200);
|
|
6766
|
+
return result200;
|
|
6556
6767
|
});
|
|
6557
6768
|
} else if (status !== 200 && status !== 204) {
|
|
6558
6769
|
return response.text().then((_responseText) => {
|
|
6559
6770
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6560
6771
|
});
|
|
6561
6772
|
}
|
|
6562
|
-
return Promise.resolve<
|
|
6773
|
+
return Promise.resolve<DocumentTypeDto>(null as any);
|
|
6563
6774
|
}
|
|
6564
6775
|
|
|
6565
|
-
|
|
6566
|
-
let url_ = this.baseUrl + "/documenttypes/
|
|
6776
|
+
getDocumentType(id: string): Promise<DocumentTypeDto> {
|
|
6777
|
+
let url_ = this.baseUrl + "/documenttypes/{id}";
|
|
6778
|
+
if (id === undefined || id === null)
|
|
6779
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6780
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6567
6781
|
url_ = url_.replace(/[?&]$/, "");
|
|
6568
6782
|
|
|
6569
6783
|
let options_: RequestInit = {
|
|
@@ -6576,22 +6790,18 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6576
6790
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6577
6791
|
return this.http.fetch(url_, transformedOptions_);
|
|
6578
6792
|
}).then((_response: Response) => {
|
|
6579
|
-
return this.
|
|
6793
|
+
return this.processGetDocumentType(_response);
|
|
6580
6794
|
});
|
|
6581
6795
|
}
|
|
6582
6796
|
|
|
6583
|
-
protected
|
|
6797
|
+
protected processGetDocumentType(response: Response): Promise<DocumentTypeDto> {
|
|
6584
6798
|
const status = response.status;
|
|
6585
6799
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6586
6800
|
if (status === 200) {
|
|
6587
6801
|
return response.text().then((_responseText) => {
|
|
6588
6802
|
let result200: any = null;
|
|
6589
6803
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6590
|
-
|
|
6591
|
-
result200 = [] as any;
|
|
6592
|
-
for (let item of resultData200)
|
|
6593
|
-
result200!.push(DocumentTypeRuleTypeDto.fromJS(item));
|
|
6594
|
-
}
|
|
6804
|
+
result200 = DocumentTypeDto.fromJS(resultData200);
|
|
6595
6805
|
return result200;
|
|
6596
6806
|
});
|
|
6597
6807
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6599,16 +6809,23 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6599
6809
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6600
6810
|
});
|
|
6601
6811
|
}
|
|
6602
|
-
return Promise.resolve<
|
|
6812
|
+
return Promise.resolve<DocumentTypeDto>(null as any);
|
|
6603
6813
|
}
|
|
6604
6814
|
|
|
6605
|
-
|
|
6606
|
-
let url_ = this.baseUrl + "/documenttypes/
|
|
6815
|
+
updateDocumentType(id: string, request: UpdateDocumentTypeRequest): Promise<DocumentTypeDto> {
|
|
6816
|
+
let url_ = this.baseUrl + "/documenttypes/{id}";
|
|
6817
|
+
if (id === undefined || id === null)
|
|
6818
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6819
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6607
6820
|
url_ = url_.replace(/[?&]$/, "");
|
|
6608
6821
|
|
|
6822
|
+
const content_ = JSON.stringify(request);
|
|
6823
|
+
|
|
6609
6824
|
let options_: RequestInit = {
|
|
6610
|
-
|
|
6825
|
+
body: content_,
|
|
6826
|
+
method: "PUT",
|
|
6611
6827
|
headers: {
|
|
6828
|
+
"Content-Type": "application/json",
|
|
6612
6829
|
"Accept": "application/json"
|
|
6613
6830
|
}
|
|
6614
6831
|
};
|
|
@@ -6616,22 +6833,18 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6616
6833
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6617
6834
|
return this.http.fetch(url_, transformedOptions_);
|
|
6618
6835
|
}).then((_response: Response) => {
|
|
6619
|
-
return this.
|
|
6836
|
+
return this.processUpdateDocumentType(_response);
|
|
6620
6837
|
});
|
|
6621
6838
|
}
|
|
6622
6839
|
|
|
6623
|
-
protected
|
|
6840
|
+
protected processUpdateDocumentType(response: Response): Promise<DocumentTypeDto> {
|
|
6624
6841
|
const status = response.status;
|
|
6625
6842
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6626
6843
|
if (status === 200) {
|
|
6627
6844
|
return response.text().then((_responseText) => {
|
|
6628
6845
|
let result200: any = null;
|
|
6629
6846
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6630
|
-
|
|
6631
|
-
result200 = [] as any;
|
|
6632
|
-
for (let item of resultData200)
|
|
6633
|
-
result200!.push(DocumentGeneratorTypeDto.fromJS(item));
|
|
6634
|
-
}
|
|
6847
|
+
result200 = DocumentTypeDto.fromJS(resultData200);
|
|
6635
6848
|
return result200;
|
|
6636
6849
|
});
|
|
6637
6850
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6639,134 +6852,127 @@ export class DocumentTypesClient extends AuthorizedApiBase implements IDocumentT
|
|
|
6639
6852
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6640
6853
|
});
|
|
6641
6854
|
}
|
|
6642
|
-
return Promise.resolve<
|
|
6855
|
+
return Promise.resolve<DocumentTypeDto>(null as any);
|
|
6643
6856
|
}
|
|
6644
|
-
}
|
|
6645
|
-
|
|
6646
|
-
export interface IExternalAccessClient {
|
|
6647
|
-
|
|
6648
|
-
listUsers(companyId: string | null | undefined): Promise<CompanyUserDto[]>;
|
|
6649
6857
|
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6858
|
+
/**
|
|
6859
|
+
* Delete document type. Only allowed if not used.
|
|
6860
|
+
*/
|
|
6861
|
+
deleteDocumentType(id: string): Promise<void> {
|
|
6862
|
+
let url_ = this.baseUrl + "/documenttypes/{id}";
|
|
6863
|
+
if (id === undefined || id === null)
|
|
6864
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6865
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6866
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
6659
6867
|
|
|
6660
|
-
|
|
6661
|
-
|
|
6868
|
+
let options_: RequestInit = {
|
|
6869
|
+
method: "DELETE",
|
|
6870
|
+
headers: {
|
|
6871
|
+
}
|
|
6872
|
+
};
|
|
6662
6873
|
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6874
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6875
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
6876
|
+
}).then((_response: Response) => {
|
|
6877
|
+
return this.processDeleteDocumentType(_response);
|
|
6878
|
+
});
|
|
6879
|
+
}
|
|
6667
6880
|
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6881
|
+
protected processDeleteDocumentType(response: Response): Promise<void> {
|
|
6882
|
+
const status = response.status;
|
|
6883
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6884
|
+
if (status === 204) {
|
|
6885
|
+
return response.text().then((_responseText) => {
|
|
6886
|
+
return;
|
|
6887
|
+
});
|
|
6888
|
+
} else if (status !== 200 && status !== 204) {
|
|
6889
|
+
return response.text().then((_responseText) => {
|
|
6890
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6891
|
+
});
|
|
6892
|
+
}
|
|
6893
|
+
return Promise.resolve<void>(null as any);
|
|
6672
6894
|
}
|
|
6673
6895
|
|
|
6674
|
-
|
|
6675
|
-
let url_ = this.baseUrl + "/
|
|
6676
|
-
if (
|
|
6677
|
-
|
|
6896
|
+
activateDocumentType(id: string): Promise<void> {
|
|
6897
|
+
let url_ = this.baseUrl + "/documenttypes/{id}/activate";
|
|
6898
|
+
if (id === undefined || id === null)
|
|
6899
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6900
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6678
6901
|
url_ = url_.replace(/[?&]$/, "");
|
|
6679
6902
|
|
|
6680
6903
|
let options_: RequestInit = {
|
|
6681
|
-
method: "
|
|
6904
|
+
method: "POST",
|
|
6682
6905
|
headers: {
|
|
6683
|
-
"Accept": "application/json"
|
|
6684
6906
|
}
|
|
6685
6907
|
};
|
|
6686
6908
|
|
|
6687
6909
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6688
6910
|
return this.http.fetch(url_, transformedOptions_);
|
|
6689
6911
|
}).then((_response: Response) => {
|
|
6690
|
-
return this.
|
|
6912
|
+
return this.processActivateDocumentType(_response);
|
|
6691
6913
|
});
|
|
6692
6914
|
}
|
|
6693
6915
|
|
|
6694
|
-
protected
|
|
6916
|
+
protected processActivateDocumentType(response: Response): Promise<void> {
|
|
6695
6917
|
const status = response.status;
|
|
6696
6918
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6697
|
-
if (status ===
|
|
6919
|
+
if (status === 204) {
|
|
6698
6920
|
return response.text().then((_responseText) => {
|
|
6699
|
-
|
|
6700
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6701
|
-
if (Array.isArray(resultData200)) {
|
|
6702
|
-
result200 = [] as any;
|
|
6703
|
-
for (let item of resultData200)
|
|
6704
|
-
result200!.push(CompanyUserDto.fromJS(item));
|
|
6705
|
-
}
|
|
6706
|
-
return result200;
|
|
6921
|
+
return;
|
|
6707
6922
|
});
|
|
6708
6923
|
} else if (status !== 200 && status !== 204) {
|
|
6709
6924
|
return response.text().then((_responseText) => {
|
|
6710
6925
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6711
6926
|
});
|
|
6712
6927
|
}
|
|
6713
|
-
return Promise.resolve<
|
|
6928
|
+
return Promise.resolve<void>(null as any);
|
|
6714
6929
|
}
|
|
6715
6930
|
|
|
6716
|
-
|
|
6717
|
-
let url_ = this.baseUrl + "/
|
|
6931
|
+
deactivateDocumentType(id: string): Promise<void> {
|
|
6932
|
+
let url_ = this.baseUrl + "/documenttypes/{id}/deactivate";
|
|
6933
|
+
if (id === undefined || id === null)
|
|
6934
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
6935
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6718
6936
|
url_ = url_.replace(/[?&]$/, "");
|
|
6719
6937
|
|
|
6720
|
-
const content_ = JSON.stringify(request);
|
|
6721
|
-
|
|
6722
6938
|
let options_: RequestInit = {
|
|
6723
|
-
body: content_,
|
|
6724
6939
|
method: "POST",
|
|
6725
6940
|
headers: {
|
|
6726
|
-
"Content-Type": "application/json",
|
|
6727
|
-
"Accept": "application/json"
|
|
6728
6941
|
}
|
|
6729
6942
|
};
|
|
6730
6943
|
|
|
6731
6944
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6732
6945
|
return this.http.fetch(url_, transformedOptions_);
|
|
6733
6946
|
}).then((_response: Response) => {
|
|
6734
|
-
return this.
|
|
6947
|
+
return this.processDeactivateDocumentType(_response);
|
|
6735
6948
|
});
|
|
6736
6949
|
}
|
|
6737
6950
|
|
|
6738
|
-
protected
|
|
6951
|
+
protected processDeactivateDocumentType(response: Response): Promise<void> {
|
|
6739
6952
|
const status = response.status;
|
|
6740
6953
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6741
|
-
if (status ===
|
|
6954
|
+
if (status === 204) {
|
|
6742
6955
|
return response.text().then((_responseText) => {
|
|
6743
|
-
|
|
6744
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6745
|
-
result200 = CompanyUserDto.fromJS(resultData200);
|
|
6746
|
-
return result200;
|
|
6956
|
+
return;
|
|
6747
6957
|
});
|
|
6748
6958
|
} else if (status !== 200 && status !== 204) {
|
|
6749
6959
|
return response.text().then((_responseText) => {
|
|
6750
6960
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6751
6961
|
});
|
|
6752
6962
|
}
|
|
6753
|
-
return Promise.resolve<
|
|
6963
|
+
return Promise.resolve<void>(null as any);
|
|
6754
6964
|
}
|
|
6755
6965
|
|
|
6756
|
-
|
|
6757
|
-
let url_ = this.baseUrl + "/
|
|
6966
|
+
listDocumentTypeRules(id: string): Promise<DocumentTypeRuleDto[]> {
|
|
6967
|
+
let url_ = this.baseUrl + "/documenttypes/{id}/rules";
|
|
6758
6968
|
if (id === undefined || id === null)
|
|
6759
6969
|
throw new Error("The parameter 'id' must be defined.");
|
|
6760
6970
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6761
6971
|
url_ = url_.replace(/[?&]$/, "");
|
|
6762
6972
|
|
|
6763
|
-
const content_ = JSON.stringify(request);
|
|
6764
|
-
|
|
6765
6973
|
let options_: RequestInit = {
|
|
6766
|
-
|
|
6767
|
-
method: "PUT",
|
|
6974
|
+
method: "GET",
|
|
6768
6975
|
headers: {
|
|
6769
|
-
"Content-Type": "application/json",
|
|
6770
6976
|
"Accept": "application/json"
|
|
6771
6977
|
}
|
|
6772
6978
|
};
|
|
@@ -6774,18 +6980,22 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6774
6980
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6775
6981
|
return this.http.fetch(url_, transformedOptions_);
|
|
6776
6982
|
}).then((_response: Response) => {
|
|
6777
|
-
return this.
|
|
6983
|
+
return this.processListDocumentTypeRules(_response);
|
|
6778
6984
|
});
|
|
6779
6985
|
}
|
|
6780
6986
|
|
|
6781
|
-
protected
|
|
6987
|
+
protected processListDocumentTypeRules(response: Response): Promise<DocumentTypeRuleDto[]> {
|
|
6782
6988
|
const status = response.status;
|
|
6783
6989
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6784
6990
|
if (status === 200) {
|
|
6785
6991
|
return response.text().then((_responseText) => {
|
|
6786
6992
|
let result200: any = null;
|
|
6787
6993
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6788
|
-
|
|
6994
|
+
if (Array.isArray(resultData200)) {
|
|
6995
|
+
result200 = [] as any;
|
|
6996
|
+
for (let item of resultData200)
|
|
6997
|
+
result200!.push(DocumentTypeRuleDto.fromJS(item));
|
|
6998
|
+
}
|
|
6789
6999
|
return result200;
|
|
6790
7000
|
});
|
|
6791
7001
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -6793,32 +7003,34 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6793
7003
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6794
7004
|
});
|
|
6795
7005
|
}
|
|
6796
|
-
return Promise.resolve<
|
|
7006
|
+
return Promise.resolve<DocumentTypeRuleDto[]>(null as any);
|
|
6797
7007
|
}
|
|
6798
7008
|
|
|
6799
|
-
|
|
6800
|
-
let url_ = this.baseUrl + "/
|
|
7009
|
+
updateDocumentTypeRules(id: string, request: UpdateDocumentTypeRuleRequest): Promise<void> {
|
|
7010
|
+
let url_ = this.baseUrl + "/documenttypes/{id}/rules";
|
|
6801
7011
|
if (id === undefined || id === null)
|
|
6802
7012
|
throw new Error("The parameter 'id' must be defined.");
|
|
6803
7013
|
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6804
|
-
if (companyId !== undefined && companyId !== null)
|
|
6805
|
-
url_ += "companyId=" + encodeURIComponent("" + companyId) + "&";
|
|
6806
7014
|
url_ = url_.replace(/[?&]$/, "");
|
|
6807
7015
|
|
|
7016
|
+
const content_ = JSON.stringify(request);
|
|
7017
|
+
|
|
6808
7018
|
let options_: RequestInit = {
|
|
6809
|
-
|
|
7019
|
+
body: content_,
|
|
7020
|
+
method: "PUT",
|
|
6810
7021
|
headers: {
|
|
7022
|
+
"Content-Type": "application/json",
|
|
6811
7023
|
}
|
|
6812
7024
|
};
|
|
6813
7025
|
|
|
6814
7026
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6815
7027
|
return this.http.fetch(url_, transformedOptions_);
|
|
6816
7028
|
}).then((_response: Response) => {
|
|
6817
|
-
return this.
|
|
7029
|
+
return this.processUpdateDocumentTypeRules(_response);
|
|
6818
7030
|
});
|
|
6819
7031
|
}
|
|
6820
7032
|
|
|
6821
|
-
protected
|
|
7033
|
+
protected processUpdateDocumentTypeRules(response: Response): Promise<void> {
|
|
6822
7034
|
const status = response.status;
|
|
6823
7035
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6824
7036
|
if (status === 204) {
|
|
@@ -6833,8 +7045,8 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6833
7045
|
return Promise.resolve<void>(null as any);
|
|
6834
7046
|
}
|
|
6835
7047
|
|
|
6836
|
-
|
|
6837
|
-
let url_ = this.baseUrl + "/
|
|
7048
|
+
listAllDocumentRuleTypes(): Promise<DocumentTypeRuleTypeDto[]> {
|
|
7049
|
+
let url_ = this.baseUrl + "/documenttypes/ruletypes";
|
|
6838
7050
|
url_ = url_.replace(/[?&]$/, "");
|
|
6839
7051
|
|
|
6840
7052
|
let options_: RequestInit = {
|
|
@@ -6847,11 +7059,11 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6847
7059
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6848
7060
|
return this.http.fetch(url_, transformedOptions_);
|
|
6849
7061
|
}).then((_response: Response) => {
|
|
6850
|
-
return this.
|
|
7062
|
+
return this.processListAllDocumentRuleTypes(_response);
|
|
6851
7063
|
});
|
|
6852
7064
|
}
|
|
6853
7065
|
|
|
6854
|
-
protected
|
|
7066
|
+
protected processListAllDocumentRuleTypes(response: Response): Promise<DocumentTypeRuleTypeDto[]> {
|
|
6855
7067
|
const status = response.status;
|
|
6856
7068
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6857
7069
|
if (status === 200) {
|
|
@@ -6861,7 +7073,7 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6861
7073
|
if (Array.isArray(resultData200)) {
|
|
6862
7074
|
result200 = [] as any;
|
|
6863
7075
|
for (let item of resultData200)
|
|
6864
|
-
result200!.push(
|
|
7076
|
+
result200!.push(DocumentTypeRuleTypeDto.fromJS(item));
|
|
6865
7077
|
}
|
|
6866
7078
|
return result200;
|
|
6867
7079
|
});
|
|
@@ -6870,11 +7082,11 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6870
7082
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6871
7083
|
});
|
|
6872
7084
|
}
|
|
6873
|
-
return Promise.resolve<
|
|
7085
|
+
return Promise.resolve<DocumentTypeRuleTypeDto[]>(null as any);
|
|
6874
7086
|
}
|
|
6875
7087
|
|
|
6876
|
-
|
|
6877
|
-
let url_ = this.baseUrl + "/
|
|
7088
|
+
listDocumentGenerators(): Promise<DocumentGeneratorTypeDto[]> {
|
|
7089
|
+
let url_ = this.baseUrl + "/documenttypes/documentgenerators";
|
|
6878
7090
|
url_ = url_.replace(/[?&]$/, "");
|
|
6879
7091
|
|
|
6880
7092
|
let options_: RequestInit = {
|
|
@@ -6887,11 +7099,11 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6887
7099
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6888
7100
|
return this.http.fetch(url_, transformedOptions_);
|
|
6889
7101
|
}).then((_response: Response) => {
|
|
6890
|
-
return this.
|
|
7102
|
+
return this.processListDocumentGenerators(_response);
|
|
6891
7103
|
});
|
|
6892
7104
|
}
|
|
6893
7105
|
|
|
6894
|
-
protected
|
|
7106
|
+
protected processListDocumentGenerators(response: Response): Promise<DocumentGeneratorTypeDto[]> {
|
|
6895
7107
|
const status = response.status;
|
|
6896
7108
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6897
7109
|
if (status === 200) {
|
|
@@ -6901,7 +7113,7 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6901
7113
|
if (Array.isArray(resultData200)) {
|
|
6902
7114
|
result200 = [] as any;
|
|
6903
7115
|
for (let item of resultData200)
|
|
6904
|
-
result200!.push(
|
|
7116
|
+
result200!.push(DocumentGeneratorTypeDto.fromJS(item));
|
|
6905
7117
|
}
|
|
6906
7118
|
return result200;
|
|
6907
7119
|
});
|
|
@@ -6910,55 +7122,28 @@ export class ExternalAccessClient extends AuthorizedApiBase implements IExternal
|
|
|
6910
7122
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6911
7123
|
});
|
|
6912
7124
|
}
|
|
6913
|
-
return Promise.resolve<
|
|
7125
|
+
return Promise.resolve<DocumentGeneratorTypeDto[]>(null as any);
|
|
6914
7126
|
}
|
|
7127
|
+
}
|
|
6915
7128
|
|
|
6916
|
-
|
|
6917
|
-
let url_ = this.baseUrl + "/externalaccess/customers/{tenantId}";
|
|
6918
|
-
if (tenantId === undefined || tenantId === null)
|
|
6919
|
-
throw new Error("The parameter 'tenantId' must be defined.");
|
|
6920
|
-
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
6921
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
7129
|
+
export interface IExternalAccessClient {
|
|
6922
7130
|
|
|
6923
|
-
|
|
6924
|
-
method: "DELETE",
|
|
6925
|
-
headers: {
|
|
6926
|
-
}
|
|
6927
|
-
};
|
|
7131
|
+
listUsers(companyId: string | null | undefined): Promise<CompanyUserDto[]>;
|
|
6928
7132
|
|
|
6929
|
-
|
|
6930
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
6931
|
-
}).then((_response: Response) => {
|
|
6932
|
-
return this.processDeleteCompanyCustomer(_response);
|
|
6933
|
-
});
|
|
6934
|
-
}
|
|
7133
|
+
createCompanyUser(request: CreateCompanyUserRequest): Promise<CompanyUserDto>;
|
|
6935
7134
|
|
|
6936
|
-
|
|
6937
|
-
const status = response.status;
|
|
6938
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6939
|
-
if (status === 204) {
|
|
6940
|
-
return response.text().then((_responseText) => {
|
|
6941
|
-
return;
|
|
6942
|
-
});
|
|
6943
|
-
} else if (status !== 200 && status !== 204) {
|
|
6944
|
-
return response.text().then((_responseText) => {
|
|
6945
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6946
|
-
});
|
|
6947
|
-
}
|
|
6948
|
-
return Promise.resolve<void>(null as any);
|
|
6949
|
-
}
|
|
6950
|
-
}
|
|
7135
|
+
updateCompanyUser(id: string, request: UpdateCompanyUserRequest): Promise<CompanyUserDto>;
|
|
6951
7136
|
|
|
6952
|
-
|
|
7137
|
+
deleteCompanyUser(id: string, companyId: string | null | undefined): Promise<void>;
|
|
6953
7138
|
|
|
6954
|
-
|
|
7139
|
+
listRoles(): Promise<ExternalRoleDto[]>;
|
|
6955
7140
|
|
|
6956
|
-
|
|
7141
|
+
listCompanyCustomers(): Promise<CompanyCustomerDto[]>;
|
|
6957
7142
|
|
|
6958
|
-
|
|
7143
|
+
deleteCompanyCustomer(tenantId: string): Promise<void>;
|
|
6959
7144
|
}
|
|
6960
7145
|
|
|
6961
|
-
export class
|
|
7146
|
+
export class ExternalAccessClient extends AuthorizedApiBase implements IExternalAccessClient {
|
|
6962
7147
|
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
6963
7148
|
private baseUrl: string;
|
|
6964
7149
|
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
@@ -6969,8 +7154,10 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
6969
7154
|
this.baseUrl = baseUrl ?? "";
|
|
6970
7155
|
}
|
|
6971
7156
|
|
|
6972
|
-
|
|
6973
|
-
let url_ = this.baseUrl + "/
|
|
7157
|
+
listUsers(companyId: string | null | undefined): Promise<CompanyUserDto[]> {
|
|
7158
|
+
let url_ = this.baseUrl + "/externalaccess/users?";
|
|
7159
|
+
if (companyId !== undefined && companyId !== null)
|
|
7160
|
+
url_ += "companyId=" + encodeURIComponent("" + companyId) + "&";
|
|
6974
7161
|
url_ = url_.replace(/[?&]$/, "");
|
|
6975
7162
|
|
|
6976
7163
|
let options_: RequestInit = {
|
|
@@ -6983,11 +7170,11 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
6983
7170
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6984
7171
|
return this.http.fetch(url_, transformedOptions_);
|
|
6985
7172
|
}).then((_response: Response) => {
|
|
6986
|
-
return this.
|
|
7173
|
+
return this.processListUsers(_response);
|
|
6987
7174
|
});
|
|
6988
7175
|
}
|
|
6989
7176
|
|
|
6990
|
-
protected
|
|
7177
|
+
protected processListUsers(response: Response): Promise<CompanyUserDto[]> {
|
|
6991
7178
|
const status = response.status;
|
|
6992
7179
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
6993
7180
|
if (status === 200) {
|
|
@@ -6997,7 +7184,7 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
6997
7184
|
if (Array.isArray(resultData200)) {
|
|
6998
7185
|
result200 = [] as any;
|
|
6999
7186
|
for (let item of resultData200)
|
|
7000
|
-
result200!.push(
|
|
7187
|
+
result200!.push(CompanyUserDto.fromJS(item));
|
|
7001
7188
|
}
|
|
7002
7189
|
return result200;
|
|
7003
7190
|
});
|
|
@@ -7006,11 +7193,11 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
7006
7193
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7007
7194
|
});
|
|
7008
7195
|
}
|
|
7009
|
-
return Promise.resolve<
|
|
7196
|
+
return Promise.resolve<CompanyUserDto[]>(null as any);
|
|
7010
7197
|
}
|
|
7011
7198
|
|
|
7012
|
-
|
|
7013
|
-
let url_ = this.baseUrl + "/
|
|
7199
|
+
createCompanyUser(request: CreateCompanyUserRequest): Promise<CompanyUserDto> {
|
|
7200
|
+
let url_ = this.baseUrl + "/externalaccess/users";
|
|
7014
7201
|
url_ = url_.replace(/[?&]$/, "");
|
|
7015
7202
|
|
|
7016
7203
|
const content_ = JSON.stringify(request);
|
|
@@ -7027,18 +7214,18 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
7027
7214
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7028
7215
|
return this.http.fetch(url_, transformedOptions_);
|
|
7029
7216
|
}).then((_response: Response) => {
|
|
7030
|
-
return this.
|
|
7217
|
+
return this.processCreateCompanyUser(_response);
|
|
7031
7218
|
});
|
|
7032
7219
|
}
|
|
7033
7220
|
|
|
7034
|
-
protected
|
|
7221
|
+
protected processCreateCompanyUser(response: Response): Promise<CompanyUserDto> {
|
|
7035
7222
|
const status = response.status;
|
|
7036
7223
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7037
7224
|
if (status === 200) {
|
|
7038
7225
|
return response.text().then((_responseText) => {
|
|
7039
7226
|
let result200: any = null;
|
|
7040
7227
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7041
|
-
result200 =
|
|
7228
|
+
result200 = CompanyUserDto.fromJS(resultData200);
|
|
7042
7229
|
return result200;
|
|
7043
7230
|
});
|
|
7044
7231
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -7046,16 +7233,23 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
7046
7233
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7047
7234
|
});
|
|
7048
7235
|
}
|
|
7049
|
-
return Promise.resolve<
|
|
7236
|
+
return Promise.resolve<CompanyUserDto>(null as any);
|
|
7050
7237
|
}
|
|
7051
7238
|
|
|
7052
|
-
|
|
7053
|
-
let url_ = this.baseUrl + "/
|
|
7239
|
+
updateCompanyUser(id: string, request: UpdateCompanyUserRequest): Promise<CompanyUserDto> {
|
|
7240
|
+
let url_ = this.baseUrl + "/externalaccess/users/{id}";
|
|
7241
|
+
if (id === undefined || id === null)
|
|
7242
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7243
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7054
7244
|
url_ = url_.replace(/[?&]$/, "");
|
|
7055
7245
|
|
|
7246
|
+
const content_ = JSON.stringify(request);
|
|
7247
|
+
|
|
7056
7248
|
let options_: RequestInit = {
|
|
7057
|
-
|
|
7249
|
+
body: content_,
|
|
7250
|
+
method: "PUT",
|
|
7058
7251
|
headers: {
|
|
7252
|
+
"Content-Type": "application/json",
|
|
7059
7253
|
"Accept": "application/json"
|
|
7060
7254
|
}
|
|
7061
7255
|
};
|
|
@@ -7063,22 +7257,18 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
7063
7257
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7064
7258
|
return this.http.fetch(url_, transformedOptions_);
|
|
7065
7259
|
}).then((_response: Response) => {
|
|
7066
|
-
return this.
|
|
7260
|
+
return this.processUpdateCompanyUser(_response);
|
|
7067
7261
|
});
|
|
7068
7262
|
}
|
|
7069
7263
|
|
|
7070
|
-
protected
|
|
7264
|
+
protected processUpdateCompanyUser(response: Response): Promise<CompanyUserDto> {
|
|
7071
7265
|
const status = response.status;
|
|
7072
7266
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7073
7267
|
if (status === 200) {
|
|
7074
7268
|
return response.text().then((_responseText) => {
|
|
7075
7269
|
let result200: any = null;
|
|
7076
7270
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7077
|
-
|
|
7078
|
-
result200 = [] as any;
|
|
7079
|
-
for (let item of resultData200)
|
|
7080
|
-
result200!.push(CompanyDto.fromJS(item));
|
|
7081
|
-
}
|
|
7271
|
+
result200 = CompanyUserDto.fromJS(resultData200);
|
|
7082
7272
|
return result200;
|
|
7083
7273
|
});
|
|
7084
7274
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -7086,48 +7276,48 @@ export class ExternalClient extends AuthorizedApiBase implements IExternalClient
|
|
|
7086
7276
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7087
7277
|
});
|
|
7088
7278
|
}
|
|
7089
|
-
return Promise.resolve<
|
|
7279
|
+
return Promise.resolve<CompanyUserDto>(null as any);
|
|
7090
7280
|
}
|
|
7091
|
-
}
|
|
7092
|
-
|
|
7093
|
-
export interface ISuppliersClient {
|
|
7094
|
-
|
|
7095
|
-
listSupplierInvites(): Promise<SupplierInviteDto[]>;
|
|
7096
|
-
|
|
7097
|
-
createSupplierInvite(request: CreateSupplierInvite): Promise<SupplierInviteDto>;
|
|
7098
7281
|
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
/**
|
|
7108
|
-
* Creates a mapping between old supplier id and new supplier id.
|
|
7109
|
-
*/
|
|
7110
|
-
createSupplierMapping(request: CreateSupplierMapping): Promise<void>;
|
|
7282
|
+
deleteCompanyUser(id: string, companyId: string | null | undefined): Promise<void> {
|
|
7283
|
+
let url_ = this.baseUrl + "/externalaccess/users/{id}?";
|
|
7284
|
+
if (id === undefined || id === null)
|
|
7285
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7286
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7287
|
+
if (companyId !== undefined && companyId !== null)
|
|
7288
|
+
url_ += "companyId=" + encodeURIComponent("" + companyId) + "&";
|
|
7289
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7111
7290
|
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
}
|
|
7291
|
+
let options_: RequestInit = {
|
|
7292
|
+
method: "DELETE",
|
|
7293
|
+
headers: {
|
|
7294
|
+
}
|
|
7295
|
+
};
|
|
7117
7296
|
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7297
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7298
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7299
|
+
}).then((_response: Response) => {
|
|
7300
|
+
return this.processDeleteCompanyUser(_response);
|
|
7301
|
+
});
|
|
7302
|
+
}
|
|
7122
7303
|
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7304
|
+
protected processDeleteCompanyUser(response: Response): Promise<void> {
|
|
7305
|
+
const status = response.status;
|
|
7306
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7307
|
+
if (status === 204) {
|
|
7308
|
+
return response.text().then((_responseText) => {
|
|
7309
|
+
return;
|
|
7310
|
+
});
|
|
7311
|
+
} else if (status !== 200 && status !== 204) {
|
|
7312
|
+
return response.text().then((_responseText) => {
|
|
7313
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7314
|
+
});
|
|
7315
|
+
}
|
|
7316
|
+
return Promise.resolve<void>(null as any);
|
|
7127
7317
|
}
|
|
7128
7318
|
|
|
7129
|
-
|
|
7130
|
-
let url_ = this.baseUrl + "/
|
|
7319
|
+
listRoles(): Promise<ExternalRoleDto[]> {
|
|
7320
|
+
let url_ = this.baseUrl + "/externalaccess/roles";
|
|
7131
7321
|
url_ = url_.replace(/[?&]$/, "");
|
|
7132
7322
|
|
|
7133
7323
|
let options_: RequestInit = {
|
|
@@ -7140,11 +7330,11 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7140
7330
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7141
7331
|
return this.http.fetch(url_, transformedOptions_);
|
|
7142
7332
|
}).then((_response: Response) => {
|
|
7143
|
-
return this.
|
|
7333
|
+
return this.processListRoles(_response);
|
|
7144
7334
|
});
|
|
7145
7335
|
}
|
|
7146
7336
|
|
|
7147
|
-
protected
|
|
7337
|
+
protected processListRoles(response: Response): Promise<ExternalRoleDto[]> {
|
|
7148
7338
|
const status = response.status;
|
|
7149
7339
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7150
7340
|
if (status === 200) {
|
|
@@ -7154,7 +7344,7 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7154
7344
|
if (Array.isArray(resultData200)) {
|
|
7155
7345
|
result200 = [] as any;
|
|
7156
7346
|
for (let item of resultData200)
|
|
7157
|
-
result200!.push(
|
|
7347
|
+
result200!.push(ExternalRoleDto.fromJS(item));
|
|
7158
7348
|
}
|
|
7159
7349
|
return result200;
|
|
7160
7350
|
});
|
|
@@ -7163,20 +7353,16 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7163
7353
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7164
7354
|
});
|
|
7165
7355
|
}
|
|
7166
|
-
return Promise.resolve<
|
|
7356
|
+
return Promise.resolve<ExternalRoleDto[]>(null as any);
|
|
7167
7357
|
}
|
|
7168
7358
|
|
|
7169
|
-
|
|
7170
|
-
let url_ = this.baseUrl + "/
|
|
7359
|
+
listCompanyCustomers(): Promise<CompanyCustomerDto[]> {
|
|
7360
|
+
let url_ = this.baseUrl + "/externalaccess/customers";
|
|
7171
7361
|
url_ = url_.replace(/[?&]$/, "");
|
|
7172
7362
|
|
|
7173
|
-
const content_ = JSON.stringify(request);
|
|
7174
|
-
|
|
7175
7363
|
let options_: RequestInit = {
|
|
7176
|
-
|
|
7177
|
-
method: "POST",
|
|
7364
|
+
method: "GET",
|
|
7178
7365
|
headers: {
|
|
7179
|
-
"Content-Type": "application/json",
|
|
7180
7366
|
"Accept": "application/json"
|
|
7181
7367
|
}
|
|
7182
7368
|
};
|
|
@@ -7184,18 +7370,22 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7184
7370
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7185
7371
|
return this.http.fetch(url_, transformedOptions_);
|
|
7186
7372
|
}).then((_response: Response) => {
|
|
7187
|
-
return this.
|
|
7373
|
+
return this.processListCompanyCustomers(_response);
|
|
7188
7374
|
});
|
|
7189
7375
|
}
|
|
7190
7376
|
|
|
7191
|
-
protected
|
|
7377
|
+
protected processListCompanyCustomers(response: Response): Promise<CompanyCustomerDto[]> {
|
|
7192
7378
|
const status = response.status;
|
|
7193
7379
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7194
7380
|
if (status === 200) {
|
|
7195
7381
|
return response.text().then((_responseText) => {
|
|
7196
7382
|
let result200: any = null;
|
|
7197
7383
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7198
|
-
|
|
7384
|
+
if (Array.isArray(resultData200)) {
|
|
7385
|
+
result200 = [] as any;
|
|
7386
|
+
for (let item of resultData200)
|
|
7387
|
+
result200!.push(CompanyCustomerDto.fromJS(item));
|
|
7388
|
+
}
|
|
7199
7389
|
return result200;
|
|
7200
7390
|
});
|
|
7201
7391
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -7203,14 +7393,14 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7203
7393
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7204
7394
|
});
|
|
7205
7395
|
}
|
|
7206
|
-
return Promise.resolve<
|
|
7396
|
+
return Promise.resolve<CompanyCustomerDto[]>(null as any);
|
|
7207
7397
|
}
|
|
7208
7398
|
|
|
7209
|
-
|
|
7210
|
-
let url_ = this.baseUrl + "/
|
|
7211
|
-
if (
|
|
7212
|
-
throw new Error("The parameter '
|
|
7213
|
-
url_ = url_.replace("{
|
|
7399
|
+
deleteCompanyCustomer(tenantId: string): Promise<void> {
|
|
7400
|
+
let url_ = this.baseUrl + "/externalaccess/customers/{tenantId}";
|
|
7401
|
+
if (tenantId === undefined || tenantId === null)
|
|
7402
|
+
throw new Error("The parameter 'tenantId' must be defined.");
|
|
7403
|
+
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
7214
7404
|
url_ = url_.replace(/[?&]$/, "");
|
|
7215
7405
|
|
|
7216
7406
|
let options_: RequestInit = {
|
|
@@ -7222,11 +7412,11 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7222
7412
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7223
7413
|
return this.http.fetch(url_, transformedOptions_);
|
|
7224
7414
|
}).then((_response: Response) => {
|
|
7225
|
-
return this.
|
|
7415
|
+
return this.processDeleteCompanyCustomer(_response);
|
|
7226
7416
|
});
|
|
7227
7417
|
}
|
|
7228
7418
|
|
|
7229
|
-
protected
|
|
7419
|
+
protected processDeleteCompanyCustomer(response: Response): Promise<void> {
|
|
7230
7420
|
const status = response.status;
|
|
7231
7421
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7232
7422
|
if (status === 204) {
|
|
@@ -7240,9 +7430,30 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7240
7430
|
}
|
|
7241
7431
|
return Promise.resolve<void>(null as any);
|
|
7242
7432
|
}
|
|
7433
|
+
}
|
|
7243
7434
|
|
|
7244
|
-
|
|
7245
|
-
|
|
7435
|
+
export interface IExternalClient {
|
|
7436
|
+
|
|
7437
|
+
listInvites(): Promise<InviteDto[]>;
|
|
7438
|
+
|
|
7439
|
+
acceptSupplierInvite(request: AcceptSupplierInviteRequest): Promise<CompanyDto>;
|
|
7440
|
+
|
|
7441
|
+
listCompanies(): Promise<CompanyDto[]>;
|
|
7442
|
+
}
|
|
7443
|
+
|
|
7444
|
+
export class ExternalClient extends AuthorizedApiBase implements IExternalClient {
|
|
7445
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
7446
|
+
private baseUrl: string;
|
|
7447
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
7448
|
+
|
|
7449
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
7450
|
+
super(configuration);
|
|
7451
|
+
this.http = http ? http : window as any;
|
|
7452
|
+
this.baseUrl = baseUrl ?? "";
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7455
|
+
listInvites(): Promise<InviteDto[]> {
|
|
7456
|
+
let url_ = this.baseUrl + "/external/invites";
|
|
7246
7457
|
url_ = url_.replace(/[?&]$/, "");
|
|
7247
7458
|
|
|
7248
7459
|
let options_: RequestInit = {
|
|
@@ -7255,11 +7466,11 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7255
7466
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7256
7467
|
return this.http.fetch(url_, transformedOptions_);
|
|
7257
7468
|
}).then((_response: Response) => {
|
|
7258
|
-
return this.
|
|
7469
|
+
return this.processListInvites(_response);
|
|
7259
7470
|
});
|
|
7260
7471
|
}
|
|
7261
7472
|
|
|
7262
|
-
protected
|
|
7473
|
+
protected processListInvites(response: Response): Promise<InviteDto[]> {
|
|
7263
7474
|
const status = response.status;
|
|
7264
7475
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7265
7476
|
if (status === 200) {
|
|
@@ -7269,7 +7480,7 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7269
7480
|
if (Array.isArray(resultData200)) {
|
|
7270
7481
|
result200 = [] as any;
|
|
7271
7482
|
for (let item of resultData200)
|
|
7272
|
-
result200!.push(
|
|
7483
|
+
result200!.push(InviteDto.fromJS(item));
|
|
7273
7484
|
}
|
|
7274
7485
|
return result200;
|
|
7275
7486
|
});
|
|
@@ -7278,55 +7489,56 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7278
7489
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7279
7490
|
});
|
|
7280
7491
|
}
|
|
7281
|
-
return Promise.resolve<
|
|
7492
|
+
return Promise.resolve<InviteDto[]>(null as any);
|
|
7282
7493
|
}
|
|
7283
7494
|
|
|
7284
|
-
|
|
7285
|
-
let url_ = this.baseUrl + "/
|
|
7286
|
-
if (id === undefined || id === null)
|
|
7287
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
7288
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7495
|
+
acceptSupplierInvite(request: AcceptSupplierInviteRequest): Promise<CompanyDto> {
|
|
7496
|
+
let url_ = this.baseUrl + "/external/invites";
|
|
7289
7497
|
url_ = url_.replace(/[?&]$/, "");
|
|
7290
7498
|
|
|
7499
|
+
const content_ = JSON.stringify(request);
|
|
7500
|
+
|
|
7291
7501
|
let options_: RequestInit = {
|
|
7292
|
-
|
|
7502
|
+
body: content_,
|
|
7503
|
+
method: "POST",
|
|
7293
7504
|
headers: {
|
|
7505
|
+
"Content-Type": "application/json",
|
|
7506
|
+
"Accept": "application/json"
|
|
7294
7507
|
}
|
|
7295
7508
|
};
|
|
7296
7509
|
|
|
7297
7510
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7298
7511
|
return this.http.fetch(url_, transformedOptions_);
|
|
7299
7512
|
}).then((_response: Response) => {
|
|
7300
|
-
return this.
|
|
7513
|
+
return this.processAcceptSupplierInvite(_response);
|
|
7301
7514
|
});
|
|
7302
7515
|
}
|
|
7303
7516
|
|
|
7304
|
-
protected
|
|
7517
|
+
protected processAcceptSupplierInvite(response: Response): Promise<CompanyDto> {
|
|
7305
7518
|
const status = response.status;
|
|
7306
7519
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7307
|
-
if (status ===
|
|
7520
|
+
if (status === 200) {
|
|
7308
7521
|
return response.text().then((_responseText) => {
|
|
7309
|
-
|
|
7522
|
+
let result200: any = null;
|
|
7523
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7524
|
+
result200 = CompanyDto.fromJS(resultData200);
|
|
7525
|
+
return result200;
|
|
7310
7526
|
});
|
|
7311
7527
|
} else if (status !== 200 && status !== 204) {
|
|
7312
7528
|
return response.text().then((_responseText) => {
|
|
7313
7529
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7314
7530
|
});
|
|
7315
7531
|
}
|
|
7316
|
-
return Promise.resolve<
|
|
7532
|
+
return Promise.resolve<CompanyDto>(null as any);
|
|
7317
7533
|
}
|
|
7318
7534
|
|
|
7319
|
-
|
|
7320
|
-
let url_ = this.baseUrl + "/
|
|
7535
|
+
listCompanies(): Promise<CompanyDto[]> {
|
|
7536
|
+
let url_ = this.baseUrl + "/external/companies";
|
|
7321
7537
|
url_ = url_.replace(/[?&]$/, "");
|
|
7322
7538
|
|
|
7323
|
-
const content_ = JSON.stringify(importSupplier);
|
|
7324
|
-
|
|
7325
7539
|
let options_: RequestInit = {
|
|
7326
|
-
|
|
7327
|
-
method: "POST",
|
|
7540
|
+
method: "GET",
|
|
7328
7541
|
headers: {
|
|
7329
|
-
"Content-Type": "application/json",
|
|
7330
7542
|
"Accept": "application/json"
|
|
7331
7543
|
}
|
|
7332
7544
|
};
|
|
@@ -7334,18 +7546,22 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7334
7546
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7335
7547
|
return this.http.fetch(url_, transformedOptions_);
|
|
7336
7548
|
}).then((_response: Response) => {
|
|
7337
|
-
return this.
|
|
7549
|
+
return this.processListCompanies(_response);
|
|
7338
7550
|
});
|
|
7339
7551
|
}
|
|
7340
7552
|
|
|
7341
|
-
protected
|
|
7553
|
+
protected processListCompanies(response: Response): Promise<CompanyDto[]> {
|
|
7342
7554
|
const status = response.status;
|
|
7343
7555
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7344
7556
|
if (status === 200) {
|
|
7345
7557
|
return response.text().then((_responseText) => {
|
|
7346
7558
|
let result200: any = null;
|
|
7347
7559
|
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7348
|
-
|
|
7560
|
+
if (Array.isArray(resultData200)) {
|
|
7561
|
+
result200 = [] as any;
|
|
7562
|
+
for (let item of resultData200)
|
|
7563
|
+
result200!.push(CompanyDto.fromJS(item));
|
|
7564
|
+
}
|
|
7349
7565
|
return result200;
|
|
7350
7566
|
});
|
|
7351
7567
|
} else if (status !== 200 && status !== 204) {
|
|
@@ -7353,40 +7569,307 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
7353
7569
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7354
7570
|
});
|
|
7355
7571
|
}
|
|
7356
|
-
return Promise.resolve<
|
|
7572
|
+
return Promise.resolve<CompanyDto[]>(null as any);
|
|
7357
7573
|
}
|
|
7574
|
+
}
|
|
7575
|
+
|
|
7576
|
+
export interface ISuppliersClient {
|
|
7577
|
+
|
|
7578
|
+
listSupplierInvites(): Promise<SupplierInviteDto[]>;
|
|
7579
|
+
|
|
7580
|
+
createSupplierInvite(request: CreateSupplierInvite): Promise<SupplierInviteDto>;
|
|
7581
|
+
|
|
7582
|
+
deleteSupplierInvite(id: string): Promise<void>;
|
|
7583
|
+
|
|
7584
|
+
listSuppliers(): Promise<ExternalSupplierDto[]>;
|
|
7585
|
+
|
|
7586
|
+
deleteSupplier(id: string): Promise<void>;
|
|
7587
|
+
|
|
7588
|
+
importSupplier(importSupplier: ImportSupplier): Promise<ExternalSupplierDto>;
|
|
7358
7589
|
|
|
7359
7590
|
/**
|
|
7360
7591
|
* Creates a mapping between old supplier id and new supplier id.
|
|
7361
7592
|
*/
|
|
7362
|
-
createSupplierMapping(request: CreateSupplierMapping): Promise<void
|
|
7363
|
-
let url_ = this.baseUrl + "/suppliers/mappings";
|
|
7364
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
7593
|
+
createSupplierMapping(request: CreateSupplierMapping): Promise<void>;
|
|
7365
7594
|
|
|
7366
|
-
|
|
7595
|
+
/**
|
|
7596
|
+
* Delete all supplier mappings between old supplier ids and new supplier ids.
|
|
7597
|
+
*/
|
|
7598
|
+
deleteSupplierMappings(): Promise<void>;
|
|
7599
|
+
}
|
|
7600
|
+
|
|
7601
|
+
export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClient {
|
|
7602
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
7603
|
+
private baseUrl: string;
|
|
7604
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
7605
|
+
|
|
7606
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
7607
|
+
super(configuration);
|
|
7608
|
+
this.http = http ? http : window as any;
|
|
7609
|
+
this.baseUrl = baseUrl ?? "";
|
|
7610
|
+
}
|
|
7611
|
+
|
|
7612
|
+
listSupplierInvites(): Promise<SupplierInviteDto[]> {
|
|
7613
|
+
let url_ = this.baseUrl + "/suppliers/supplierinvites";
|
|
7614
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7367
7615
|
|
|
7368
7616
|
let options_: RequestInit = {
|
|
7369
|
-
|
|
7370
|
-
method: "POST",
|
|
7617
|
+
method: "GET",
|
|
7371
7618
|
headers: {
|
|
7372
|
-
"
|
|
7619
|
+
"Accept": "application/json"
|
|
7373
7620
|
}
|
|
7374
7621
|
};
|
|
7375
7622
|
|
|
7376
7623
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7377
7624
|
return this.http.fetch(url_, transformedOptions_);
|
|
7378
7625
|
}).then((_response: Response) => {
|
|
7379
|
-
return this.
|
|
7626
|
+
return this.processListSupplierInvites(_response);
|
|
7380
7627
|
});
|
|
7381
7628
|
}
|
|
7382
7629
|
|
|
7383
|
-
protected
|
|
7630
|
+
protected processListSupplierInvites(response: Response): Promise<SupplierInviteDto[]> {
|
|
7384
7631
|
const status = response.status;
|
|
7385
7632
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7386
|
-
if (status ===
|
|
7633
|
+
if (status === 200) {
|
|
7387
7634
|
return response.text().then((_responseText) => {
|
|
7388
|
-
|
|
7389
|
-
|
|
7635
|
+
let result200: any = null;
|
|
7636
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7637
|
+
if (Array.isArray(resultData200)) {
|
|
7638
|
+
result200 = [] as any;
|
|
7639
|
+
for (let item of resultData200)
|
|
7640
|
+
result200!.push(SupplierInviteDto.fromJS(item));
|
|
7641
|
+
}
|
|
7642
|
+
return result200;
|
|
7643
|
+
});
|
|
7644
|
+
} else if (status !== 200 && status !== 204) {
|
|
7645
|
+
return response.text().then((_responseText) => {
|
|
7646
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7647
|
+
});
|
|
7648
|
+
}
|
|
7649
|
+
return Promise.resolve<SupplierInviteDto[]>(null as any);
|
|
7650
|
+
}
|
|
7651
|
+
|
|
7652
|
+
createSupplierInvite(request: CreateSupplierInvite): Promise<SupplierInviteDto> {
|
|
7653
|
+
let url_ = this.baseUrl + "/suppliers/supplierinvites";
|
|
7654
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7655
|
+
|
|
7656
|
+
const content_ = JSON.stringify(request);
|
|
7657
|
+
|
|
7658
|
+
let options_: RequestInit = {
|
|
7659
|
+
body: content_,
|
|
7660
|
+
method: "POST",
|
|
7661
|
+
headers: {
|
|
7662
|
+
"Content-Type": "application/json",
|
|
7663
|
+
"Accept": "application/json"
|
|
7664
|
+
}
|
|
7665
|
+
};
|
|
7666
|
+
|
|
7667
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7668
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7669
|
+
}).then((_response: Response) => {
|
|
7670
|
+
return this.processCreateSupplierInvite(_response);
|
|
7671
|
+
});
|
|
7672
|
+
}
|
|
7673
|
+
|
|
7674
|
+
protected processCreateSupplierInvite(response: Response): Promise<SupplierInviteDto> {
|
|
7675
|
+
const status = response.status;
|
|
7676
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7677
|
+
if (status === 200) {
|
|
7678
|
+
return response.text().then((_responseText) => {
|
|
7679
|
+
let result200: any = null;
|
|
7680
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7681
|
+
result200 = SupplierInviteDto.fromJS(resultData200);
|
|
7682
|
+
return result200;
|
|
7683
|
+
});
|
|
7684
|
+
} else if (status !== 200 && status !== 204) {
|
|
7685
|
+
return response.text().then((_responseText) => {
|
|
7686
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7687
|
+
});
|
|
7688
|
+
}
|
|
7689
|
+
return Promise.resolve<SupplierInviteDto>(null as any);
|
|
7690
|
+
}
|
|
7691
|
+
|
|
7692
|
+
deleteSupplierInvite(id: string): Promise<void> {
|
|
7693
|
+
let url_ = this.baseUrl + "/suppliers/supplierinvites/{id}";
|
|
7694
|
+
if (id === undefined || id === null)
|
|
7695
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7696
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7697
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7698
|
+
|
|
7699
|
+
let options_: RequestInit = {
|
|
7700
|
+
method: "DELETE",
|
|
7701
|
+
headers: {
|
|
7702
|
+
}
|
|
7703
|
+
};
|
|
7704
|
+
|
|
7705
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7706
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7707
|
+
}).then((_response: Response) => {
|
|
7708
|
+
return this.processDeleteSupplierInvite(_response);
|
|
7709
|
+
});
|
|
7710
|
+
}
|
|
7711
|
+
|
|
7712
|
+
protected processDeleteSupplierInvite(response: Response): Promise<void> {
|
|
7713
|
+
const status = response.status;
|
|
7714
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7715
|
+
if (status === 204) {
|
|
7716
|
+
return response.text().then((_responseText) => {
|
|
7717
|
+
return;
|
|
7718
|
+
});
|
|
7719
|
+
} else if (status !== 200 && status !== 204) {
|
|
7720
|
+
return response.text().then((_responseText) => {
|
|
7721
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7722
|
+
});
|
|
7723
|
+
}
|
|
7724
|
+
return Promise.resolve<void>(null as any);
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
listSuppliers(): Promise<ExternalSupplierDto[]> {
|
|
7728
|
+
let url_ = this.baseUrl + "/suppliers";
|
|
7729
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7730
|
+
|
|
7731
|
+
let options_: RequestInit = {
|
|
7732
|
+
method: "GET",
|
|
7733
|
+
headers: {
|
|
7734
|
+
"Accept": "application/json"
|
|
7735
|
+
}
|
|
7736
|
+
};
|
|
7737
|
+
|
|
7738
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7739
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7740
|
+
}).then((_response: Response) => {
|
|
7741
|
+
return this.processListSuppliers(_response);
|
|
7742
|
+
});
|
|
7743
|
+
}
|
|
7744
|
+
|
|
7745
|
+
protected processListSuppliers(response: Response): Promise<ExternalSupplierDto[]> {
|
|
7746
|
+
const status = response.status;
|
|
7747
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7748
|
+
if (status === 200) {
|
|
7749
|
+
return response.text().then((_responseText) => {
|
|
7750
|
+
let result200: any = null;
|
|
7751
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7752
|
+
if (Array.isArray(resultData200)) {
|
|
7753
|
+
result200 = [] as any;
|
|
7754
|
+
for (let item of resultData200)
|
|
7755
|
+
result200!.push(ExternalSupplierDto.fromJS(item));
|
|
7756
|
+
}
|
|
7757
|
+
return result200;
|
|
7758
|
+
});
|
|
7759
|
+
} else if (status !== 200 && status !== 204) {
|
|
7760
|
+
return response.text().then((_responseText) => {
|
|
7761
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7762
|
+
});
|
|
7763
|
+
}
|
|
7764
|
+
return Promise.resolve<ExternalSupplierDto[]>(null as any);
|
|
7765
|
+
}
|
|
7766
|
+
|
|
7767
|
+
deleteSupplier(id: string): Promise<void> {
|
|
7768
|
+
let url_ = this.baseUrl + "/suppliers/{id}";
|
|
7769
|
+
if (id === undefined || id === null)
|
|
7770
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7771
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7772
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7773
|
+
|
|
7774
|
+
let options_: RequestInit = {
|
|
7775
|
+
method: "DELETE",
|
|
7776
|
+
headers: {
|
|
7777
|
+
}
|
|
7778
|
+
};
|
|
7779
|
+
|
|
7780
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7781
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7782
|
+
}).then((_response: Response) => {
|
|
7783
|
+
return this.processDeleteSupplier(_response);
|
|
7784
|
+
});
|
|
7785
|
+
}
|
|
7786
|
+
|
|
7787
|
+
protected processDeleteSupplier(response: Response): Promise<void> {
|
|
7788
|
+
const status = response.status;
|
|
7789
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7790
|
+
if (status === 204) {
|
|
7791
|
+
return response.text().then((_responseText) => {
|
|
7792
|
+
return;
|
|
7793
|
+
});
|
|
7794
|
+
} else if (status !== 200 && status !== 204) {
|
|
7795
|
+
return response.text().then((_responseText) => {
|
|
7796
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7797
|
+
});
|
|
7798
|
+
}
|
|
7799
|
+
return Promise.resolve<void>(null as any);
|
|
7800
|
+
}
|
|
7801
|
+
|
|
7802
|
+
importSupplier(importSupplier: ImportSupplier): Promise<ExternalSupplierDto> {
|
|
7803
|
+
let url_ = this.baseUrl + "/suppliers/import";
|
|
7804
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7805
|
+
|
|
7806
|
+
const content_ = JSON.stringify(importSupplier);
|
|
7807
|
+
|
|
7808
|
+
let options_: RequestInit = {
|
|
7809
|
+
body: content_,
|
|
7810
|
+
method: "POST",
|
|
7811
|
+
headers: {
|
|
7812
|
+
"Content-Type": "application/json",
|
|
7813
|
+
"Accept": "application/json"
|
|
7814
|
+
}
|
|
7815
|
+
};
|
|
7816
|
+
|
|
7817
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7818
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7819
|
+
}).then((_response: Response) => {
|
|
7820
|
+
return this.processImportSupplier(_response);
|
|
7821
|
+
});
|
|
7822
|
+
}
|
|
7823
|
+
|
|
7824
|
+
protected processImportSupplier(response: Response): Promise<ExternalSupplierDto> {
|
|
7825
|
+
const status = response.status;
|
|
7826
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7827
|
+
if (status === 200) {
|
|
7828
|
+
return response.text().then((_responseText) => {
|
|
7829
|
+
let result200: any = null;
|
|
7830
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7831
|
+
result200 = ExternalSupplierDto.fromJS(resultData200);
|
|
7832
|
+
return result200;
|
|
7833
|
+
});
|
|
7834
|
+
} else if (status !== 200 && status !== 204) {
|
|
7835
|
+
return response.text().then((_responseText) => {
|
|
7836
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7837
|
+
});
|
|
7838
|
+
}
|
|
7839
|
+
return Promise.resolve<ExternalSupplierDto>(null as any);
|
|
7840
|
+
}
|
|
7841
|
+
|
|
7842
|
+
/**
|
|
7843
|
+
* Creates a mapping between old supplier id and new supplier id.
|
|
7844
|
+
*/
|
|
7845
|
+
createSupplierMapping(request: CreateSupplierMapping): Promise<void> {
|
|
7846
|
+
let url_ = this.baseUrl + "/suppliers/mappings";
|
|
7847
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7848
|
+
|
|
7849
|
+
const content_ = JSON.stringify(request);
|
|
7850
|
+
|
|
7851
|
+
let options_: RequestInit = {
|
|
7852
|
+
body: content_,
|
|
7853
|
+
method: "POST",
|
|
7854
|
+
headers: {
|
|
7855
|
+
"Content-Type": "application/json",
|
|
7856
|
+
}
|
|
7857
|
+
};
|
|
7858
|
+
|
|
7859
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7860
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7861
|
+
}).then((_response: Response) => {
|
|
7862
|
+
return this.processCreateSupplierMapping(_response);
|
|
7863
|
+
});
|
|
7864
|
+
}
|
|
7865
|
+
|
|
7866
|
+
protected processCreateSupplierMapping(response: Response): Promise<void> {
|
|
7867
|
+
const status = response.status;
|
|
7868
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7869
|
+
if (status === 204) {
|
|
7870
|
+
return response.text().then((_responseText) => {
|
|
7871
|
+
return;
|
|
7872
|
+
});
|
|
7390
7873
|
} else if (status !== 200 && status !== 204) {
|
|
7391
7874
|
return response.text().then((_responseText) => {
|
|
7392
7875
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
@@ -20618,6 +21101,8 @@ export class MachineStateDatapoint implements IMachineStateDatapoint {
|
|
|
20618
21101
|
machineStateText!: string;
|
|
20619
21102
|
machineState!: MachineState;
|
|
20620
21103
|
timestamp!: number;
|
|
21104
|
+
isDowntime!: boolean;
|
|
21105
|
+
downtimePeriodReasons!: DowntimePeriodReasonDto[];
|
|
20621
21106
|
|
|
20622
21107
|
constructor(data?: IMachineStateDatapoint) {
|
|
20623
21108
|
if (data) {
|
|
@@ -20626,6 +21111,9 @@ export class MachineStateDatapoint implements IMachineStateDatapoint {
|
|
|
20626
21111
|
(<any>this)[property] = (<any>data)[property];
|
|
20627
21112
|
}
|
|
20628
21113
|
}
|
|
21114
|
+
if (!data) {
|
|
21115
|
+
this.downtimePeriodReasons = [];
|
|
21116
|
+
}
|
|
20629
21117
|
}
|
|
20630
21118
|
|
|
20631
21119
|
init(_data?: any) {
|
|
@@ -20633,6 +21121,12 @@ export class MachineStateDatapoint implements IMachineStateDatapoint {
|
|
|
20633
21121
|
this.machineStateText = _data["machineStateText"];
|
|
20634
21122
|
this.machineState = _data["machineState"];
|
|
20635
21123
|
this.timestamp = _data["timestamp"];
|
|
21124
|
+
this.isDowntime = _data["isDowntime"];
|
|
21125
|
+
if (Array.isArray(_data["downtimePeriodReasons"])) {
|
|
21126
|
+
this.downtimePeriodReasons = [] as any;
|
|
21127
|
+
for (let item of _data["downtimePeriodReasons"])
|
|
21128
|
+
this.downtimePeriodReasons!.push(DowntimePeriodReasonDto.fromJS(item));
|
|
21129
|
+
}
|
|
20636
21130
|
}
|
|
20637
21131
|
}
|
|
20638
21132
|
|
|
@@ -20648,6 +21142,12 @@ export class MachineStateDatapoint implements IMachineStateDatapoint {
|
|
|
20648
21142
|
data["machineStateText"] = this.machineStateText;
|
|
20649
21143
|
data["machineState"] = this.machineState;
|
|
20650
21144
|
data["timestamp"] = this.timestamp;
|
|
21145
|
+
data["isDowntime"] = this.isDowntime;
|
|
21146
|
+
if (Array.isArray(this.downtimePeriodReasons)) {
|
|
21147
|
+
data["downtimePeriodReasons"] = [];
|
|
21148
|
+
for (let item of this.downtimePeriodReasons)
|
|
21149
|
+
data["downtimePeriodReasons"].push(item.toJSON());
|
|
21150
|
+
}
|
|
20651
21151
|
return data;
|
|
20652
21152
|
}
|
|
20653
21153
|
}
|
|
@@ -20656,23 +21156,95 @@ export interface IMachineStateDatapoint {
|
|
|
20656
21156
|
machineStateText: string;
|
|
20657
21157
|
machineState: MachineState;
|
|
20658
21158
|
timestamp: number;
|
|
21159
|
+
isDowntime: boolean;
|
|
21160
|
+
downtimePeriodReasons: DowntimePeriodReasonDto[];
|
|
20659
21161
|
}
|
|
20660
21162
|
|
|
20661
|
-
export class
|
|
20662
|
-
|
|
20663
|
-
|
|
21163
|
+
export class DowntimePeriodReasonDto implements IDowntimePeriodReasonDto {
|
|
21164
|
+
id!: number;
|
|
21165
|
+
reason!: string;
|
|
21166
|
+
reasonType!: DowntimeReasonTypeDto;
|
|
21167
|
+
startTime!: Date;
|
|
21168
|
+
endTime!: Date;
|
|
21169
|
+
assetId!: number;
|
|
21170
|
+
comment?: string | null;
|
|
21171
|
+
companyId?: string | null;
|
|
21172
|
+
reasonId!: string;
|
|
20664
21173
|
|
|
20665
|
-
constructor(data?:
|
|
21174
|
+
constructor(data?: IDowntimePeriodReasonDto) {
|
|
20666
21175
|
if (data) {
|
|
20667
21176
|
for (var property in data) {
|
|
20668
21177
|
if (data.hasOwnProperty(property))
|
|
20669
21178
|
(<any>this)[property] = (<any>data)[property];
|
|
20670
21179
|
}
|
|
20671
21180
|
}
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
21181
|
+
}
|
|
21182
|
+
|
|
21183
|
+
init(_data?: any) {
|
|
21184
|
+
if (_data) {
|
|
21185
|
+
this.id = _data["id"];
|
|
21186
|
+
this.reason = _data["reason"];
|
|
21187
|
+
this.reasonType = _data["reasonType"];
|
|
21188
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
21189
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
21190
|
+
this.assetId = _data["assetId"];
|
|
21191
|
+
this.comment = _data["comment"];
|
|
21192
|
+
this.companyId = _data["companyId"];
|
|
21193
|
+
this.reasonId = _data["reasonId"];
|
|
21194
|
+
}
|
|
21195
|
+
}
|
|
21196
|
+
|
|
21197
|
+
static fromJS(data: any): DowntimePeriodReasonDto {
|
|
21198
|
+
data = typeof data === 'object' ? data : {};
|
|
21199
|
+
let result = new DowntimePeriodReasonDto();
|
|
21200
|
+
result.init(data);
|
|
21201
|
+
return result;
|
|
21202
|
+
}
|
|
21203
|
+
|
|
21204
|
+
toJSON(data?: any) {
|
|
21205
|
+
data = typeof data === 'object' ? data : {};
|
|
21206
|
+
data["id"] = this.id;
|
|
21207
|
+
data["reason"] = this.reason;
|
|
21208
|
+
data["reasonType"] = this.reasonType;
|
|
21209
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
21210
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
21211
|
+
data["assetId"] = this.assetId;
|
|
21212
|
+
data["comment"] = this.comment;
|
|
21213
|
+
data["companyId"] = this.companyId;
|
|
21214
|
+
data["reasonId"] = this.reasonId;
|
|
21215
|
+
return data;
|
|
21216
|
+
}
|
|
21217
|
+
}
|
|
21218
|
+
|
|
21219
|
+
export interface IDowntimePeriodReasonDto {
|
|
21220
|
+
id: number;
|
|
21221
|
+
reason: string;
|
|
21222
|
+
reasonType: DowntimeReasonTypeDto;
|
|
21223
|
+
startTime: Date;
|
|
21224
|
+
endTime: Date;
|
|
21225
|
+
assetId: number;
|
|
21226
|
+
comment?: string | null;
|
|
21227
|
+
companyId?: string | null;
|
|
21228
|
+
reasonId: string;
|
|
21229
|
+
}
|
|
21230
|
+
|
|
21231
|
+
export type DowntimeReasonTypeDto = "Unplanned" | "Planned";
|
|
21232
|
+
|
|
21233
|
+
export class MachineUptimesAggregateDto implements IMachineUptimesAggregateDto {
|
|
21234
|
+
machineUptimes!: MachineUptimeDto[];
|
|
21235
|
+
sum!: MachineUptimeSumDto;
|
|
21236
|
+
|
|
21237
|
+
constructor(data?: IMachineUptimesAggregateDto) {
|
|
21238
|
+
if (data) {
|
|
21239
|
+
for (var property in data) {
|
|
21240
|
+
if (data.hasOwnProperty(property))
|
|
21241
|
+
(<any>this)[property] = (<any>data)[property];
|
|
21242
|
+
}
|
|
21243
|
+
}
|
|
21244
|
+
if (!data) {
|
|
21245
|
+
this.machineUptimes = [];
|
|
21246
|
+
this.sum = new MachineUptimeSumDto();
|
|
21247
|
+
}
|
|
20676
21248
|
}
|
|
20677
21249
|
|
|
20678
21250
|
init(_data?: any) {
|
|
@@ -27506,82 +28078,435 @@ export interface IImportMeasuringTool {
|
|
|
27506
28078
|
updatedBy?: string | null;
|
|
27507
28079
|
}
|
|
27508
28080
|
|
|
27509
|
-
export class MeasuringToolCalibrationImportDto implements IMeasuringToolCalibrationImportDto {
|
|
27510
|
-
created!: Date;
|
|
27511
|
-
createdBy!: string;
|
|
27512
|
-
calibrationDate!: Date;
|
|
27513
|
-
nextCalibrationDate!: Date;
|
|
27514
|
-
reportType?: string | null;
|
|
27515
|
-
calibrationLocation?: string | null;
|
|
27516
|
-
calibrationCertificateNumber?: string | null;
|
|
27517
|
-
adjusted!: boolean;
|
|
27518
|
-
calibrationCertificateUrl?: string | null;
|
|
28081
|
+
export class MeasuringToolCalibrationImportDto implements IMeasuringToolCalibrationImportDto {
|
|
28082
|
+
created!: Date;
|
|
28083
|
+
createdBy!: string;
|
|
28084
|
+
calibrationDate!: Date;
|
|
28085
|
+
nextCalibrationDate!: Date;
|
|
28086
|
+
reportType?: string | null;
|
|
28087
|
+
calibrationLocation?: string | null;
|
|
28088
|
+
calibrationCertificateNumber?: string | null;
|
|
28089
|
+
adjusted!: boolean;
|
|
28090
|
+
calibrationCertificateUrl?: string | null;
|
|
28091
|
+
|
|
28092
|
+
constructor(data?: IMeasuringToolCalibrationImportDto) {
|
|
28093
|
+
if (data) {
|
|
28094
|
+
for (var property in data) {
|
|
28095
|
+
if (data.hasOwnProperty(property))
|
|
28096
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28097
|
+
}
|
|
28098
|
+
}
|
|
28099
|
+
}
|
|
28100
|
+
|
|
28101
|
+
init(_data?: any) {
|
|
28102
|
+
if (_data) {
|
|
28103
|
+
this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
|
|
28104
|
+
this.createdBy = _data["createdBy"];
|
|
28105
|
+
this.calibrationDate = _data["calibrationDate"] ? new Date(_data["calibrationDate"].toString()) : <any>undefined;
|
|
28106
|
+
this.nextCalibrationDate = _data["nextCalibrationDate"] ? new Date(_data["nextCalibrationDate"].toString()) : <any>undefined;
|
|
28107
|
+
this.reportType = _data["reportType"];
|
|
28108
|
+
this.calibrationLocation = _data["calibrationLocation"];
|
|
28109
|
+
this.calibrationCertificateNumber = _data["calibrationCertificateNumber"];
|
|
28110
|
+
this.adjusted = _data["adjusted"];
|
|
28111
|
+
this.calibrationCertificateUrl = _data["calibrationCertificateUrl"];
|
|
28112
|
+
}
|
|
28113
|
+
}
|
|
28114
|
+
|
|
28115
|
+
static fromJS(data: any): MeasuringToolCalibrationImportDto {
|
|
28116
|
+
data = typeof data === 'object' ? data : {};
|
|
28117
|
+
let result = new MeasuringToolCalibrationImportDto();
|
|
28118
|
+
result.init(data);
|
|
28119
|
+
return result;
|
|
28120
|
+
}
|
|
28121
|
+
|
|
28122
|
+
toJSON(data?: any) {
|
|
28123
|
+
data = typeof data === 'object' ? data : {};
|
|
28124
|
+
data["created"] = this.created ? this.created.toISOString() : <any>undefined;
|
|
28125
|
+
data["createdBy"] = this.createdBy;
|
|
28126
|
+
data["calibrationDate"] = this.calibrationDate ? this.calibrationDate.toISOString() : <any>undefined;
|
|
28127
|
+
data["nextCalibrationDate"] = this.nextCalibrationDate ? this.nextCalibrationDate.toISOString() : <any>undefined;
|
|
28128
|
+
data["reportType"] = this.reportType;
|
|
28129
|
+
data["calibrationLocation"] = this.calibrationLocation;
|
|
28130
|
+
data["calibrationCertificateNumber"] = this.calibrationCertificateNumber;
|
|
28131
|
+
data["adjusted"] = this.adjusted;
|
|
28132
|
+
data["calibrationCertificateUrl"] = this.calibrationCertificateUrl;
|
|
28133
|
+
return data;
|
|
28134
|
+
}
|
|
28135
|
+
}
|
|
28136
|
+
|
|
28137
|
+
export interface IMeasuringToolCalibrationImportDto {
|
|
28138
|
+
created: Date;
|
|
28139
|
+
createdBy: string;
|
|
28140
|
+
calibrationDate: Date;
|
|
28141
|
+
nextCalibrationDate: Date;
|
|
28142
|
+
reportType?: string | null;
|
|
28143
|
+
calibrationLocation?: string | null;
|
|
28144
|
+
calibrationCertificateNumber?: string | null;
|
|
28145
|
+
adjusted: boolean;
|
|
28146
|
+
calibrationCertificateUrl?: string | null;
|
|
28147
|
+
}
|
|
28148
|
+
|
|
28149
|
+
export class MeasuringToolImportResultDto implements IMeasuringToolImportResultDto {
|
|
28150
|
+
errors!: MeasuringToolImportInformationDto[];
|
|
28151
|
+
information!: MeasuringToolImportInformationDto[];
|
|
28152
|
+
importedCalibrations!: ImportedCalibration[];
|
|
28153
|
+
numberOfCalibrationsImported!: number;
|
|
28154
|
+
newestCalibration?: Date | null;
|
|
28155
|
+
|
|
28156
|
+
constructor(data?: IMeasuringToolImportResultDto) {
|
|
28157
|
+
if (data) {
|
|
28158
|
+
for (var property in data) {
|
|
28159
|
+
if (data.hasOwnProperty(property))
|
|
28160
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28161
|
+
}
|
|
28162
|
+
}
|
|
28163
|
+
if (!data) {
|
|
28164
|
+
this.errors = [];
|
|
28165
|
+
this.information = [];
|
|
28166
|
+
this.importedCalibrations = [];
|
|
28167
|
+
}
|
|
28168
|
+
}
|
|
28169
|
+
|
|
28170
|
+
init(_data?: any) {
|
|
28171
|
+
if (_data) {
|
|
28172
|
+
if (Array.isArray(_data["errors"])) {
|
|
28173
|
+
this.errors = [] as any;
|
|
28174
|
+
for (let item of _data["errors"])
|
|
28175
|
+
this.errors!.push(MeasuringToolImportInformationDto.fromJS(item));
|
|
28176
|
+
}
|
|
28177
|
+
if (Array.isArray(_data["information"])) {
|
|
28178
|
+
this.information = [] as any;
|
|
28179
|
+
for (let item of _data["information"])
|
|
28180
|
+
this.information!.push(MeasuringToolImportInformationDto.fromJS(item));
|
|
28181
|
+
}
|
|
28182
|
+
if (Array.isArray(_data["importedCalibrations"])) {
|
|
28183
|
+
this.importedCalibrations = [] as any;
|
|
28184
|
+
for (let item of _data["importedCalibrations"])
|
|
28185
|
+
this.importedCalibrations!.push(ImportedCalibration.fromJS(item));
|
|
28186
|
+
}
|
|
28187
|
+
this.numberOfCalibrationsImported = _data["numberOfCalibrationsImported"];
|
|
28188
|
+
this.newestCalibration = _data["newestCalibration"] ? new Date(_data["newestCalibration"].toString()) : <any>undefined;
|
|
28189
|
+
}
|
|
28190
|
+
}
|
|
28191
|
+
|
|
28192
|
+
static fromJS(data: any): MeasuringToolImportResultDto {
|
|
28193
|
+
data = typeof data === 'object' ? data : {};
|
|
28194
|
+
let result = new MeasuringToolImportResultDto();
|
|
28195
|
+
result.init(data);
|
|
28196
|
+
return result;
|
|
28197
|
+
}
|
|
28198
|
+
|
|
28199
|
+
toJSON(data?: any) {
|
|
28200
|
+
data = typeof data === 'object' ? data : {};
|
|
28201
|
+
if (Array.isArray(this.errors)) {
|
|
28202
|
+
data["errors"] = [];
|
|
28203
|
+
for (let item of this.errors)
|
|
28204
|
+
data["errors"].push(item.toJSON());
|
|
28205
|
+
}
|
|
28206
|
+
if (Array.isArray(this.information)) {
|
|
28207
|
+
data["information"] = [];
|
|
28208
|
+
for (let item of this.information)
|
|
28209
|
+
data["information"].push(item.toJSON());
|
|
28210
|
+
}
|
|
28211
|
+
if (Array.isArray(this.importedCalibrations)) {
|
|
28212
|
+
data["importedCalibrations"] = [];
|
|
28213
|
+
for (let item of this.importedCalibrations)
|
|
28214
|
+
data["importedCalibrations"].push(item.toJSON());
|
|
28215
|
+
}
|
|
28216
|
+
data["numberOfCalibrationsImported"] = this.numberOfCalibrationsImported;
|
|
28217
|
+
data["newestCalibration"] = this.newestCalibration ? this.newestCalibration.toISOString() : <any>undefined;
|
|
28218
|
+
return data;
|
|
28219
|
+
}
|
|
28220
|
+
}
|
|
28221
|
+
|
|
28222
|
+
export interface IMeasuringToolImportResultDto {
|
|
28223
|
+
errors: MeasuringToolImportInformationDto[];
|
|
28224
|
+
information: MeasuringToolImportInformationDto[];
|
|
28225
|
+
importedCalibrations: ImportedCalibration[];
|
|
28226
|
+
numberOfCalibrationsImported: number;
|
|
28227
|
+
newestCalibration?: Date | null;
|
|
28228
|
+
}
|
|
28229
|
+
|
|
28230
|
+
export class MeasuringToolImportInformationDto implements IMeasuringToolImportInformationDto {
|
|
28231
|
+
id!: string;
|
|
28232
|
+
message!: string;
|
|
28233
|
+
|
|
28234
|
+
constructor(data?: IMeasuringToolImportInformationDto) {
|
|
28235
|
+
if (data) {
|
|
28236
|
+
for (var property in data) {
|
|
28237
|
+
if (data.hasOwnProperty(property))
|
|
28238
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28239
|
+
}
|
|
28240
|
+
}
|
|
28241
|
+
}
|
|
28242
|
+
|
|
28243
|
+
init(_data?: any) {
|
|
28244
|
+
if (_data) {
|
|
28245
|
+
this.id = _data["id"];
|
|
28246
|
+
this.message = _data["message"];
|
|
28247
|
+
}
|
|
28248
|
+
}
|
|
28249
|
+
|
|
28250
|
+
static fromJS(data: any): MeasuringToolImportInformationDto {
|
|
28251
|
+
data = typeof data === 'object' ? data : {};
|
|
28252
|
+
let result = new MeasuringToolImportInformationDto();
|
|
28253
|
+
result.init(data);
|
|
28254
|
+
return result;
|
|
28255
|
+
}
|
|
28256
|
+
|
|
28257
|
+
toJSON(data?: any) {
|
|
28258
|
+
data = typeof data === 'object' ? data : {};
|
|
28259
|
+
data["id"] = this.id;
|
|
28260
|
+
data["message"] = this.message;
|
|
28261
|
+
return data;
|
|
28262
|
+
}
|
|
28263
|
+
}
|
|
28264
|
+
|
|
28265
|
+
export interface IMeasuringToolImportInformationDto {
|
|
28266
|
+
id: string;
|
|
28267
|
+
message: string;
|
|
28268
|
+
}
|
|
28269
|
+
|
|
28270
|
+
export class ImportedCalibration implements IImportedCalibration {
|
|
28271
|
+
toolId!: string;
|
|
28272
|
+
lastCalibrationDate!: Date;
|
|
28273
|
+
|
|
28274
|
+
constructor(data?: IImportedCalibration) {
|
|
28275
|
+
if (data) {
|
|
28276
|
+
for (var property in data) {
|
|
28277
|
+
if (data.hasOwnProperty(property))
|
|
28278
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28279
|
+
}
|
|
28280
|
+
}
|
|
28281
|
+
}
|
|
28282
|
+
|
|
28283
|
+
init(_data?: any) {
|
|
28284
|
+
if (_data) {
|
|
28285
|
+
this.toolId = _data["toolId"];
|
|
28286
|
+
this.lastCalibrationDate = _data["lastCalibrationDate"] ? new Date(_data["lastCalibrationDate"].toString()) : <any>undefined;
|
|
28287
|
+
}
|
|
28288
|
+
}
|
|
28289
|
+
|
|
28290
|
+
static fromJS(data: any): ImportedCalibration {
|
|
28291
|
+
data = typeof data === 'object' ? data : {};
|
|
28292
|
+
let result = new ImportedCalibration();
|
|
28293
|
+
result.init(data);
|
|
28294
|
+
return result;
|
|
28295
|
+
}
|
|
28296
|
+
|
|
28297
|
+
toJSON(data?: any) {
|
|
28298
|
+
data = typeof data === 'object' ? data : {};
|
|
28299
|
+
data["toolId"] = this.toolId;
|
|
28300
|
+
data["lastCalibrationDate"] = this.lastCalibrationDate ? this.lastCalibrationDate.toISOString() : <any>undefined;
|
|
28301
|
+
return data;
|
|
28302
|
+
}
|
|
28303
|
+
}
|
|
28304
|
+
|
|
28305
|
+
export interface IImportedCalibration {
|
|
28306
|
+
toolId: string;
|
|
28307
|
+
lastCalibrationDate: Date;
|
|
28308
|
+
}
|
|
28309
|
+
|
|
28310
|
+
export class UpdateMeasuringToolSettings implements IUpdateMeasuringToolSettings {
|
|
28311
|
+
disableUserDefinedIdentifiersForCalibratedTools!: boolean;
|
|
28312
|
+
disableUserDefinedIdentifiersForUncalibratedTools!: boolean;
|
|
28313
|
+
|
|
28314
|
+
constructor(data?: IUpdateMeasuringToolSettings) {
|
|
28315
|
+
if (data) {
|
|
28316
|
+
for (var property in data) {
|
|
28317
|
+
if (data.hasOwnProperty(property))
|
|
28318
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28319
|
+
}
|
|
28320
|
+
}
|
|
28321
|
+
}
|
|
28322
|
+
|
|
28323
|
+
init(_data?: any) {
|
|
28324
|
+
if (_data) {
|
|
28325
|
+
this.disableUserDefinedIdentifiersForCalibratedTools = _data["disableUserDefinedIdentifiersForCalibratedTools"];
|
|
28326
|
+
this.disableUserDefinedIdentifiersForUncalibratedTools = _data["disableUserDefinedIdentifiersForUncalibratedTools"];
|
|
28327
|
+
}
|
|
28328
|
+
}
|
|
28329
|
+
|
|
28330
|
+
static fromJS(data: any): UpdateMeasuringToolSettings {
|
|
28331
|
+
data = typeof data === 'object' ? data : {};
|
|
28332
|
+
let result = new UpdateMeasuringToolSettings();
|
|
28333
|
+
result.init(data);
|
|
28334
|
+
return result;
|
|
28335
|
+
}
|
|
28336
|
+
|
|
28337
|
+
toJSON(data?: any) {
|
|
28338
|
+
data = typeof data === 'object' ? data : {};
|
|
28339
|
+
data["disableUserDefinedIdentifiersForCalibratedTools"] = this.disableUserDefinedIdentifiersForCalibratedTools;
|
|
28340
|
+
data["disableUserDefinedIdentifiersForUncalibratedTools"] = this.disableUserDefinedIdentifiersForUncalibratedTools;
|
|
28341
|
+
return data;
|
|
28342
|
+
}
|
|
28343
|
+
}
|
|
28344
|
+
|
|
28345
|
+
export interface IUpdateMeasuringToolSettings {
|
|
28346
|
+
disableUserDefinedIdentifiersForCalibratedTools: boolean;
|
|
28347
|
+
disableUserDefinedIdentifiersForUncalibratedTools: boolean;
|
|
28348
|
+
}
|
|
28349
|
+
|
|
28350
|
+
export class MeasuringToolSettingsDto implements IMeasuringToolSettingsDto {
|
|
28351
|
+
disableUserDefinedIdentifiersForCalibratedTools!: boolean;
|
|
28352
|
+
disableUserDefinedIdentifiersForUncalibratedTools!: boolean;
|
|
28353
|
+
|
|
28354
|
+
constructor(data?: IMeasuringToolSettingsDto) {
|
|
28355
|
+
if (data) {
|
|
28356
|
+
for (var property in data) {
|
|
28357
|
+
if (data.hasOwnProperty(property))
|
|
28358
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28359
|
+
}
|
|
28360
|
+
}
|
|
28361
|
+
}
|
|
28362
|
+
|
|
28363
|
+
init(_data?: any) {
|
|
28364
|
+
if (_data) {
|
|
28365
|
+
this.disableUserDefinedIdentifiersForCalibratedTools = _data["disableUserDefinedIdentifiersForCalibratedTools"];
|
|
28366
|
+
this.disableUserDefinedIdentifiersForUncalibratedTools = _data["disableUserDefinedIdentifiersForUncalibratedTools"];
|
|
28367
|
+
}
|
|
28368
|
+
}
|
|
28369
|
+
|
|
28370
|
+
static fromJS(data: any): MeasuringToolSettingsDto {
|
|
28371
|
+
data = typeof data === 'object' ? data : {};
|
|
28372
|
+
let result = new MeasuringToolSettingsDto();
|
|
28373
|
+
result.init(data);
|
|
28374
|
+
return result;
|
|
28375
|
+
}
|
|
28376
|
+
|
|
28377
|
+
toJSON(data?: any) {
|
|
28378
|
+
data = typeof data === 'object' ? data : {};
|
|
28379
|
+
data["disableUserDefinedIdentifiersForCalibratedTools"] = this.disableUserDefinedIdentifiersForCalibratedTools;
|
|
28380
|
+
data["disableUserDefinedIdentifiersForUncalibratedTools"] = this.disableUserDefinedIdentifiersForUncalibratedTools;
|
|
28381
|
+
return data;
|
|
28382
|
+
}
|
|
28383
|
+
}
|
|
28384
|
+
|
|
28385
|
+
export interface IMeasuringToolSettingsDto {
|
|
28386
|
+
disableUserDefinedIdentifiersForCalibratedTools: boolean;
|
|
28387
|
+
disableUserDefinedIdentifiersForUncalibratedTools: boolean;
|
|
28388
|
+
}
|
|
28389
|
+
|
|
28390
|
+
export class DowntimeReasonDto implements IDowntimeReasonDto {
|
|
28391
|
+
id!: string;
|
|
28392
|
+
reason!: string;
|
|
28393
|
+
machineTypes!: string[];
|
|
28394
|
+
reasonType!: DowntimeReasonTypeDto;
|
|
28395
|
+
|
|
28396
|
+
constructor(data?: IDowntimeReasonDto) {
|
|
28397
|
+
if (data) {
|
|
28398
|
+
for (var property in data) {
|
|
28399
|
+
if (data.hasOwnProperty(property))
|
|
28400
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28401
|
+
}
|
|
28402
|
+
}
|
|
28403
|
+
if (!data) {
|
|
28404
|
+
this.machineTypes = [];
|
|
28405
|
+
}
|
|
28406
|
+
}
|
|
28407
|
+
|
|
28408
|
+
init(_data?: any) {
|
|
28409
|
+
if (_data) {
|
|
28410
|
+
this.id = _data["id"];
|
|
28411
|
+
this.reason = _data["reason"];
|
|
28412
|
+
if (Array.isArray(_data["machineTypes"])) {
|
|
28413
|
+
this.machineTypes = [] as any;
|
|
28414
|
+
for (let item of _data["machineTypes"])
|
|
28415
|
+
this.machineTypes!.push(item);
|
|
28416
|
+
}
|
|
28417
|
+
this.reasonType = _data["reasonType"];
|
|
28418
|
+
}
|
|
28419
|
+
}
|
|
28420
|
+
|
|
28421
|
+
static fromJS(data: any): DowntimeReasonDto {
|
|
28422
|
+
data = typeof data === 'object' ? data : {};
|
|
28423
|
+
let result = new DowntimeReasonDto();
|
|
28424
|
+
result.init(data);
|
|
28425
|
+
return result;
|
|
28426
|
+
}
|
|
28427
|
+
|
|
28428
|
+
toJSON(data?: any) {
|
|
28429
|
+
data = typeof data === 'object' ? data : {};
|
|
28430
|
+
data["id"] = this.id;
|
|
28431
|
+
data["reason"] = this.reason;
|
|
28432
|
+
if (Array.isArray(this.machineTypes)) {
|
|
28433
|
+
data["machineTypes"] = [];
|
|
28434
|
+
for (let item of this.machineTypes)
|
|
28435
|
+
data["machineTypes"].push(item);
|
|
28436
|
+
}
|
|
28437
|
+
data["reasonType"] = this.reasonType;
|
|
28438
|
+
return data;
|
|
28439
|
+
}
|
|
28440
|
+
}
|
|
28441
|
+
|
|
28442
|
+
export interface IDowntimeReasonDto {
|
|
28443
|
+
id: string;
|
|
28444
|
+
reason: string;
|
|
28445
|
+
machineTypes: string[];
|
|
28446
|
+
reasonType: DowntimeReasonTypeDto;
|
|
28447
|
+
}
|
|
27519
28448
|
|
|
27520
|
-
|
|
28449
|
+
export class CreateDowntimeReason implements ICreateDowntimeReason {
|
|
28450
|
+
reason!: string;
|
|
28451
|
+
machineTypes!: string[];
|
|
28452
|
+
reasonType!: DowntimeReasonTypeDto;
|
|
28453
|
+
|
|
28454
|
+
constructor(data?: ICreateDowntimeReason) {
|
|
27521
28455
|
if (data) {
|
|
27522
28456
|
for (var property in data) {
|
|
27523
28457
|
if (data.hasOwnProperty(property))
|
|
27524
28458
|
(<any>this)[property] = (<any>data)[property];
|
|
27525
28459
|
}
|
|
27526
28460
|
}
|
|
28461
|
+
if (!data) {
|
|
28462
|
+
this.machineTypes = [];
|
|
28463
|
+
}
|
|
27527
28464
|
}
|
|
27528
28465
|
|
|
27529
28466
|
init(_data?: any) {
|
|
27530
28467
|
if (_data) {
|
|
27531
|
-
this.
|
|
27532
|
-
|
|
27533
|
-
|
|
27534
|
-
|
|
27535
|
-
|
|
27536
|
-
|
|
27537
|
-
this.
|
|
27538
|
-
this.adjusted = _data["adjusted"];
|
|
27539
|
-
this.calibrationCertificateUrl = _data["calibrationCertificateUrl"];
|
|
28468
|
+
this.reason = _data["reason"];
|
|
28469
|
+
if (Array.isArray(_data["machineTypes"])) {
|
|
28470
|
+
this.machineTypes = [] as any;
|
|
28471
|
+
for (let item of _data["machineTypes"])
|
|
28472
|
+
this.machineTypes!.push(item);
|
|
28473
|
+
}
|
|
28474
|
+
this.reasonType = _data["reasonType"];
|
|
27540
28475
|
}
|
|
27541
28476
|
}
|
|
27542
28477
|
|
|
27543
|
-
static fromJS(data: any):
|
|
28478
|
+
static fromJS(data: any): CreateDowntimeReason {
|
|
27544
28479
|
data = typeof data === 'object' ? data : {};
|
|
27545
|
-
let result = new
|
|
28480
|
+
let result = new CreateDowntimeReason();
|
|
27546
28481
|
result.init(data);
|
|
27547
28482
|
return result;
|
|
27548
28483
|
}
|
|
27549
28484
|
|
|
27550
28485
|
toJSON(data?: any) {
|
|
27551
28486
|
data = typeof data === 'object' ? data : {};
|
|
27552
|
-
data["
|
|
27553
|
-
|
|
27554
|
-
|
|
27555
|
-
|
|
27556
|
-
|
|
27557
|
-
|
|
27558
|
-
data["
|
|
27559
|
-
data["adjusted"] = this.adjusted;
|
|
27560
|
-
data["calibrationCertificateUrl"] = this.calibrationCertificateUrl;
|
|
28487
|
+
data["reason"] = this.reason;
|
|
28488
|
+
if (Array.isArray(this.machineTypes)) {
|
|
28489
|
+
data["machineTypes"] = [];
|
|
28490
|
+
for (let item of this.machineTypes)
|
|
28491
|
+
data["machineTypes"].push(item);
|
|
28492
|
+
}
|
|
28493
|
+
data["reasonType"] = this.reasonType;
|
|
27561
28494
|
return data;
|
|
27562
28495
|
}
|
|
27563
28496
|
}
|
|
27564
28497
|
|
|
27565
|
-
export interface
|
|
27566
|
-
|
|
27567
|
-
|
|
27568
|
-
|
|
27569
|
-
nextCalibrationDate: Date;
|
|
27570
|
-
reportType?: string | null;
|
|
27571
|
-
calibrationLocation?: string | null;
|
|
27572
|
-
calibrationCertificateNumber?: string | null;
|
|
27573
|
-
adjusted: boolean;
|
|
27574
|
-
calibrationCertificateUrl?: string | null;
|
|
28498
|
+
export interface ICreateDowntimeReason {
|
|
28499
|
+
reason: string;
|
|
28500
|
+
machineTypes: string[];
|
|
28501
|
+
reasonType: DowntimeReasonTypeDto;
|
|
27575
28502
|
}
|
|
27576
28503
|
|
|
27577
|
-
export class
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
|
|
27581
|
-
numberOfCalibrationsImported!: number;
|
|
27582
|
-
newestCalibration?: Date | null;
|
|
28504
|
+
export class UpdateDowntimeReasonRequest implements IUpdateDowntimeReasonRequest {
|
|
28505
|
+
reason!: string;
|
|
28506
|
+
machineTypes!: string[];
|
|
28507
|
+
reasonType!: DowntimeReasonTypeDto;
|
|
27583
28508
|
|
|
27584
|
-
constructor(data?:
|
|
28509
|
+
constructor(data?: IUpdateDowntimeReasonRequest) {
|
|
27585
28510
|
if (data) {
|
|
27586
28511
|
for (var property in data) {
|
|
27587
28512
|
if (data.hasOwnProperty(property))
|
|
@@ -27589,77 +28514,92 @@ export class MeasuringToolImportResultDto implements IMeasuringToolImportResultD
|
|
|
27589
28514
|
}
|
|
27590
28515
|
}
|
|
27591
28516
|
if (!data) {
|
|
27592
|
-
this.
|
|
27593
|
-
this.information = [];
|
|
27594
|
-
this.importedCalibrations = [];
|
|
28517
|
+
this.machineTypes = [];
|
|
27595
28518
|
}
|
|
27596
28519
|
}
|
|
27597
28520
|
|
|
27598
28521
|
init(_data?: any) {
|
|
27599
28522
|
if (_data) {
|
|
27600
|
-
|
|
27601
|
-
|
|
27602
|
-
|
|
27603
|
-
|
|
27604
|
-
|
|
27605
|
-
if (Array.isArray(_data["information"])) {
|
|
27606
|
-
this.information = [] as any;
|
|
27607
|
-
for (let item of _data["information"])
|
|
27608
|
-
this.information!.push(MeasuringToolImportInformationDto.fromJS(item));
|
|
27609
|
-
}
|
|
27610
|
-
if (Array.isArray(_data["importedCalibrations"])) {
|
|
27611
|
-
this.importedCalibrations = [] as any;
|
|
27612
|
-
for (let item of _data["importedCalibrations"])
|
|
27613
|
-
this.importedCalibrations!.push(ImportedCalibration.fromJS(item));
|
|
28523
|
+
this.reason = _data["reason"];
|
|
28524
|
+
if (Array.isArray(_data["machineTypes"])) {
|
|
28525
|
+
this.machineTypes = [] as any;
|
|
28526
|
+
for (let item of _data["machineTypes"])
|
|
28527
|
+
this.machineTypes!.push(item);
|
|
27614
28528
|
}
|
|
27615
|
-
this.
|
|
27616
|
-
this.newestCalibration = _data["newestCalibration"] ? new Date(_data["newestCalibration"].toString()) : <any>undefined;
|
|
28529
|
+
this.reasonType = _data["reasonType"];
|
|
27617
28530
|
}
|
|
27618
28531
|
}
|
|
27619
28532
|
|
|
27620
|
-
static fromJS(data: any):
|
|
28533
|
+
static fromJS(data: any): UpdateDowntimeReasonRequest {
|
|
27621
28534
|
data = typeof data === 'object' ? data : {};
|
|
27622
|
-
let result = new
|
|
28535
|
+
let result = new UpdateDowntimeReasonRequest();
|
|
27623
28536
|
result.init(data);
|
|
27624
28537
|
return result;
|
|
27625
28538
|
}
|
|
27626
28539
|
|
|
27627
28540
|
toJSON(data?: any) {
|
|
27628
28541
|
data = typeof data === 'object' ? data : {};
|
|
27629
|
-
|
|
27630
|
-
|
|
27631
|
-
|
|
27632
|
-
|
|
28542
|
+
data["reason"] = this.reason;
|
|
28543
|
+
if (Array.isArray(this.machineTypes)) {
|
|
28544
|
+
data["machineTypes"] = [];
|
|
28545
|
+
for (let item of this.machineTypes)
|
|
28546
|
+
data["machineTypes"].push(item);
|
|
27633
28547
|
}
|
|
27634
|
-
|
|
27635
|
-
|
|
27636
|
-
|
|
27637
|
-
|
|
28548
|
+
data["reasonType"] = this.reasonType;
|
|
28549
|
+
return data;
|
|
28550
|
+
}
|
|
28551
|
+
}
|
|
28552
|
+
|
|
28553
|
+
export interface IUpdateDowntimeReasonRequest {
|
|
28554
|
+
reason: string;
|
|
28555
|
+
machineTypes: string[];
|
|
28556
|
+
reasonType: DowntimeReasonTypeDto;
|
|
28557
|
+
}
|
|
28558
|
+
|
|
28559
|
+
export class MachineTypeDto implements IMachineTypeDto {
|
|
28560
|
+
machineType!: string;
|
|
28561
|
+
|
|
28562
|
+
constructor(data?: IMachineTypeDto) {
|
|
28563
|
+
if (data) {
|
|
28564
|
+
for (var property in data) {
|
|
28565
|
+
if (data.hasOwnProperty(property))
|
|
28566
|
+
(<any>this)[property] = (<any>data)[property];
|
|
28567
|
+
}
|
|
27638
28568
|
}
|
|
27639
|
-
|
|
27640
|
-
|
|
27641
|
-
|
|
27642
|
-
|
|
28569
|
+
}
|
|
28570
|
+
|
|
28571
|
+
init(_data?: any) {
|
|
28572
|
+
if (_data) {
|
|
28573
|
+
this.machineType = _data["machineType"];
|
|
27643
28574
|
}
|
|
27644
|
-
|
|
27645
|
-
|
|
28575
|
+
}
|
|
28576
|
+
|
|
28577
|
+
static fromJS(data: any): MachineTypeDto {
|
|
28578
|
+
data = typeof data === 'object' ? data : {};
|
|
28579
|
+
let result = new MachineTypeDto();
|
|
28580
|
+
result.init(data);
|
|
28581
|
+
return result;
|
|
28582
|
+
}
|
|
28583
|
+
|
|
28584
|
+
toJSON(data?: any) {
|
|
28585
|
+
data = typeof data === 'object' ? data : {};
|
|
28586
|
+
data["machineType"] = this.machineType;
|
|
27646
28587
|
return data;
|
|
27647
28588
|
}
|
|
27648
28589
|
}
|
|
27649
28590
|
|
|
27650
|
-
export interface
|
|
27651
|
-
|
|
27652
|
-
information: MeasuringToolImportInformationDto[];
|
|
27653
|
-
importedCalibrations: ImportedCalibration[];
|
|
27654
|
-
numberOfCalibrationsImported: number;
|
|
27655
|
-
newestCalibration?: Date | null;
|
|
28591
|
+
export interface IMachineTypeDto {
|
|
28592
|
+
machineType: string;
|
|
27656
28593
|
}
|
|
27657
28594
|
|
|
27658
|
-
export class
|
|
27659
|
-
|
|
27660
|
-
|
|
28595
|
+
export class CreateDowntimePeriodReason implements ICreateDowntimePeriodReason {
|
|
28596
|
+
reasonId!: string;
|
|
28597
|
+
assetId!: number;
|
|
28598
|
+
startTime!: Date;
|
|
28599
|
+
endTime!: Date;
|
|
28600
|
+
comment?: string | null;
|
|
27661
28601
|
|
|
27662
|
-
constructor(data?:
|
|
28602
|
+
constructor(data?: ICreateDowntimePeriodReason) {
|
|
27663
28603
|
if (data) {
|
|
27664
28604
|
for (var property in data) {
|
|
27665
28605
|
if (data.hasOwnProperty(property))
|
|
@@ -27670,36 +28610,48 @@ export class MeasuringToolImportInformationDto implements IMeasuringToolImportIn
|
|
|
27670
28610
|
|
|
27671
28611
|
init(_data?: any) {
|
|
27672
28612
|
if (_data) {
|
|
27673
|
-
this.
|
|
27674
|
-
this.
|
|
28613
|
+
this.reasonId = _data["reasonId"];
|
|
28614
|
+
this.assetId = _data["assetId"];
|
|
28615
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
28616
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
28617
|
+
this.comment = _data["comment"];
|
|
27675
28618
|
}
|
|
27676
28619
|
}
|
|
27677
28620
|
|
|
27678
|
-
static fromJS(data: any):
|
|
28621
|
+
static fromJS(data: any): CreateDowntimePeriodReason {
|
|
27679
28622
|
data = typeof data === 'object' ? data : {};
|
|
27680
|
-
let result = new
|
|
28623
|
+
let result = new CreateDowntimePeriodReason();
|
|
27681
28624
|
result.init(data);
|
|
27682
28625
|
return result;
|
|
27683
28626
|
}
|
|
27684
28627
|
|
|
27685
28628
|
toJSON(data?: any) {
|
|
27686
28629
|
data = typeof data === 'object' ? data : {};
|
|
27687
|
-
data["
|
|
27688
|
-
data["
|
|
28630
|
+
data["reasonId"] = this.reasonId;
|
|
28631
|
+
data["assetId"] = this.assetId;
|
|
28632
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
28633
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
28634
|
+
data["comment"] = this.comment;
|
|
27689
28635
|
return data;
|
|
27690
28636
|
}
|
|
27691
28637
|
}
|
|
27692
28638
|
|
|
27693
|
-
export interface
|
|
27694
|
-
|
|
27695
|
-
|
|
28639
|
+
export interface ICreateDowntimePeriodReason {
|
|
28640
|
+
reasonId: string;
|
|
28641
|
+
assetId: number;
|
|
28642
|
+
startTime: Date;
|
|
28643
|
+
endTime: Date;
|
|
28644
|
+
comment?: string | null;
|
|
27696
28645
|
}
|
|
27697
28646
|
|
|
27698
|
-
export class
|
|
27699
|
-
|
|
27700
|
-
|
|
28647
|
+
export class UpdateDowntimePeriodReasonRequest implements IUpdateDowntimePeriodReasonRequest {
|
|
28648
|
+
reasonId?: string | null;
|
|
28649
|
+
assetId?: number | null;
|
|
28650
|
+
startTime?: Date | null;
|
|
28651
|
+
endTime?: Date | null;
|
|
28652
|
+
comment?: string | null;
|
|
27701
28653
|
|
|
27702
|
-
constructor(data?:
|
|
28654
|
+
constructor(data?: IUpdateDowntimePeriodReasonRequest) {
|
|
27703
28655
|
if (data) {
|
|
27704
28656
|
for (var property in data) {
|
|
27705
28657
|
if (data.hasOwnProperty(property))
|
|
@@ -27710,109 +28662,141 @@ export class ImportedCalibration implements IImportedCalibration {
|
|
|
27710
28662
|
|
|
27711
28663
|
init(_data?: any) {
|
|
27712
28664
|
if (_data) {
|
|
27713
|
-
this.
|
|
27714
|
-
this.
|
|
28665
|
+
this.reasonId = _data["reasonId"];
|
|
28666
|
+
this.assetId = _data["assetId"];
|
|
28667
|
+
this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : <any>undefined;
|
|
28668
|
+
this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : <any>undefined;
|
|
28669
|
+
this.comment = _data["comment"];
|
|
27715
28670
|
}
|
|
27716
28671
|
}
|
|
27717
28672
|
|
|
27718
|
-
static fromJS(data: any):
|
|
28673
|
+
static fromJS(data: any): UpdateDowntimePeriodReasonRequest {
|
|
27719
28674
|
data = typeof data === 'object' ? data : {};
|
|
27720
|
-
let result = new
|
|
28675
|
+
let result = new UpdateDowntimePeriodReasonRequest();
|
|
27721
28676
|
result.init(data);
|
|
27722
28677
|
return result;
|
|
27723
28678
|
}
|
|
27724
28679
|
|
|
27725
28680
|
toJSON(data?: any) {
|
|
27726
28681
|
data = typeof data === 'object' ? data : {};
|
|
27727
|
-
data["
|
|
27728
|
-
data["
|
|
28682
|
+
data["reasonId"] = this.reasonId;
|
|
28683
|
+
data["assetId"] = this.assetId;
|
|
28684
|
+
data["startTime"] = this.startTime ? this.startTime.toISOString() : <any>undefined;
|
|
28685
|
+
data["endTime"] = this.endTime ? this.endTime.toISOString() : <any>undefined;
|
|
28686
|
+
data["comment"] = this.comment;
|
|
27729
28687
|
return data;
|
|
27730
28688
|
}
|
|
27731
28689
|
}
|
|
27732
28690
|
|
|
27733
|
-
export interface
|
|
27734
|
-
|
|
27735
|
-
|
|
28691
|
+
export interface IUpdateDowntimePeriodReasonRequest {
|
|
28692
|
+
reasonId?: string | null;
|
|
28693
|
+
assetId?: number | null;
|
|
28694
|
+
startTime?: Date | null;
|
|
28695
|
+
endTime?: Date | null;
|
|
28696
|
+
comment?: string | null;
|
|
27736
28697
|
}
|
|
27737
28698
|
|
|
27738
|
-
export class
|
|
27739
|
-
|
|
27740
|
-
|
|
28699
|
+
export class TopDowntimeReasonsDto implements ITopDowntimeReasonsDto {
|
|
28700
|
+
planned!: DowntimeReasonCountDto[];
|
|
28701
|
+
unplanned!: DowntimeReasonCountDto[];
|
|
27741
28702
|
|
|
27742
|
-
constructor(data?:
|
|
28703
|
+
constructor(data?: ITopDowntimeReasonsDto) {
|
|
27743
28704
|
if (data) {
|
|
27744
28705
|
for (var property in data) {
|
|
27745
28706
|
if (data.hasOwnProperty(property))
|
|
27746
28707
|
(<any>this)[property] = (<any>data)[property];
|
|
27747
28708
|
}
|
|
27748
28709
|
}
|
|
28710
|
+
if (!data) {
|
|
28711
|
+
this.planned = [];
|
|
28712
|
+
this.unplanned = [];
|
|
28713
|
+
}
|
|
27749
28714
|
}
|
|
27750
28715
|
|
|
27751
28716
|
init(_data?: any) {
|
|
27752
28717
|
if (_data) {
|
|
27753
|
-
|
|
27754
|
-
|
|
28718
|
+
if (Array.isArray(_data["planned"])) {
|
|
28719
|
+
this.planned = [] as any;
|
|
28720
|
+
for (let item of _data["planned"])
|
|
28721
|
+
this.planned!.push(DowntimeReasonCountDto.fromJS(item));
|
|
28722
|
+
}
|
|
28723
|
+
if (Array.isArray(_data["unplanned"])) {
|
|
28724
|
+
this.unplanned = [] as any;
|
|
28725
|
+
for (let item of _data["unplanned"])
|
|
28726
|
+
this.unplanned!.push(DowntimeReasonCountDto.fromJS(item));
|
|
28727
|
+
}
|
|
27755
28728
|
}
|
|
27756
28729
|
}
|
|
27757
28730
|
|
|
27758
|
-
static fromJS(data: any):
|
|
28731
|
+
static fromJS(data: any): TopDowntimeReasonsDto {
|
|
27759
28732
|
data = typeof data === 'object' ? data : {};
|
|
27760
|
-
let result = new
|
|
28733
|
+
let result = new TopDowntimeReasonsDto();
|
|
27761
28734
|
result.init(data);
|
|
27762
28735
|
return result;
|
|
27763
28736
|
}
|
|
27764
28737
|
|
|
27765
28738
|
toJSON(data?: any) {
|
|
27766
28739
|
data = typeof data === 'object' ? data : {};
|
|
27767
|
-
|
|
27768
|
-
|
|
28740
|
+
if (Array.isArray(this.planned)) {
|
|
28741
|
+
data["planned"] = [];
|
|
28742
|
+
for (let item of this.planned)
|
|
28743
|
+
data["planned"].push(item.toJSON());
|
|
28744
|
+
}
|
|
28745
|
+
if (Array.isArray(this.unplanned)) {
|
|
28746
|
+
data["unplanned"] = [];
|
|
28747
|
+
for (let item of this.unplanned)
|
|
28748
|
+
data["unplanned"].push(item.toJSON());
|
|
28749
|
+
}
|
|
27769
28750
|
return data;
|
|
27770
28751
|
}
|
|
27771
28752
|
}
|
|
27772
28753
|
|
|
27773
|
-
export interface
|
|
27774
|
-
|
|
27775
|
-
|
|
28754
|
+
export interface ITopDowntimeReasonsDto {
|
|
28755
|
+
planned: DowntimeReasonCountDto[];
|
|
28756
|
+
unplanned: DowntimeReasonCountDto[];
|
|
27776
28757
|
}
|
|
27777
28758
|
|
|
27778
|
-
export class
|
|
27779
|
-
|
|
27780
|
-
|
|
28759
|
+
export class DowntimeReasonCountDto implements IDowntimeReasonCountDto {
|
|
28760
|
+
count!: number;
|
|
28761
|
+
downtimeReason!: DowntimeReasonDto;
|
|
27781
28762
|
|
|
27782
|
-
constructor(data?:
|
|
28763
|
+
constructor(data?: IDowntimeReasonCountDto) {
|
|
27783
28764
|
if (data) {
|
|
27784
28765
|
for (var property in data) {
|
|
27785
28766
|
if (data.hasOwnProperty(property))
|
|
27786
28767
|
(<any>this)[property] = (<any>data)[property];
|
|
27787
28768
|
}
|
|
27788
28769
|
}
|
|
28770
|
+
if (!data) {
|
|
28771
|
+
this.downtimeReason = new DowntimeReasonDto();
|
|
28772
|
+
}
|
|
27789
28773
|
}
|
|
27790
28774
|
|
|
27791
28775
|
init(_data?: any) {
|
|
27792
28776
|
if (_data) {
|
|
27793
|
-
this.
|
|
27794
|
-
this.
|
|
28777
|
+
this.count = _data["count"];
|
|
28778
|
+
this.downtimeReason = _data["downtimeReason"] ? DowntimeReasonDto.fromJS(_data["downtimeReason"]) : new DowntimeReasonDto();
|
|
27795
28779
|
}
|
|
27796
28780
|
}
|
|
27797
28781
|
|
|
27798
|
-
static fromJS(data: any):
|
|
28782
|
+
static fromJS(data: any): DowntimeReasonCountDto {
|
|
27799
28783
|
data = typeof data === 'object' ? data : {};
|
|
27800
|
-
let result = new
|
|
28784
|
+
let result = new DowntimeReasonCountDto();
|
|
27801
28785
|
result.init(data);
|
|
27802
28786
|
return result;
|
|
27803
28787
|
}
|
|
27804
28788
|
|
|
27805
28789
|
toJSON(data?: any) {
|
|
27806
28790
|
data = typeof data === 'object' ? data : {};
|
|
27807
|
-
data["
|
|
27808
|
-
data["
|
|
28791
|
+
data["count"] = this.count;
|
|
28792
|
+
data["downtimeReason"] = this.downtimeReason ? this.downtimeReason.toJSON() : <any>undefined;
|
|
27809
28793
|
return data;
|
|
27810
28794
|
}
|
|
27811
28795
|
}
|
|
27812
28796
|
|
|
27813
|
-
export interface
|
|
27814
|
-
|
|
27815
|
-
|
|
28797
|
+
export interface IDowntimeReasonCountDto {
|
|
28798
|
+
count: number;
|
|
28799
|
+
downtimeReason: DowntimeReasonDto;
|
|
27816
28800
|
}
|
|
27817
28801
|
|
|
27818
28802
|
export class MachineDto implements IMachineDto {
|
|
@@ -28929,6 +29913,58 @@ export interface IMachineUtilizationV2Dto {
|
|
|
28929
29913
|
utilization: UtilizationDto;
|
|
28930
29914
|
}
|
|
28931
29915
|
|
|
29916
|
+
export class CrossCompanyUtilizationSummaryDto implements ICrossCompanyUtilizationSummaryDto {
|
|
29917
|
+
crossCompany!: FactoryUtilizationDto;
|
|
29918
|
+
companies!: MachineGroupUtilizationDto[];
|
|
29919
|
+
|
|
29920
|
+
constructor(data?: ICrossCompanyUtilizationSummaryDto) {
|
|
29921
|
+
if (data) {
|
|
29922
|
+
for (var property in data) {
|
|
29923
|
+
if (data.hasOwnProperty(property))
|
|
29924
|
+
(<any>this)[property] = (<any>data)[property];
|
|
29925
|
+
}
|
|
29926
|
+
}
|
|
29927
|
+
if (!data) {
|
|
29928
|
+
this.crossCompany = new FactoryUtilizationDto();
|
|
29929
|
+
this.companies = [];
|
|
29930
|
+
}
|
|
29931
|
+
}
|
|
29932
|
+
|
|
29933
|
+
init(_data?: any) {
|
|
29934
|
+
if (_data) {
|
|
29935
|
+
this.crossCompany = _data["crossCompany"] ? FactoryUtilizationDto.fromJS(_data["crossCompany"]) : new FactoryUtilizationDto();
|
|
29936
|
+
if (Array.isArray(_data["companies"])) {
|
|
29937
|
+
this.companies = [] as any;
|
|
29938
|
+
for (let item of _data["companies"])
|
|
29939
|
+
this.companies!.push(MachineGroupUtilizationDto.fromJS(item));
|
|
29940
|
+
}
|
|
29941
|
+
}
|
|
29942
|
+
}
|
|
29943
|
+
|
|
29944
|
+
static fromJS(data: any): CrossCompanyUtilizationSummaryDto {
|
|
29945
|
+
data = typeof data === 'object' ? data : {};
|
|
29946
|
+
let result = new CrossCompanyUtilizationSummaryDto();
|
|
29947
|
+
result.init(data);
|
|
29948
|
+
return result;
|
|
29949
|
+
}
|
|
29950
|
+
|
|
29951
|
+
toJSON(data?: any) {
|
|
29952
|
+
data = typeof data === 'object' ? data : {};
|
|
29953
|
+
data["crossCompany"] = this.crossCompany ? this.crossCompany.toJSON() : <any>undefined;
|
|
29954
|
+
if (Array.isArray(this.companies)) {
|
|
29955
|
+
data["companies"] = [];
|
|
29956
|
+
for (let item of this.companies)
|
|
29957
|
+
data["companies"].push(item.toJSON());
|
|
29958
|
+
}
|
|
29959
|
+
return data;
|
|
29960
|
+
}
|
|
29961
|
+
}
|
|
29962
|
+
|
|
29963
|
+
export interface ICrossCompanyUtilizationSummaryDto {
|
|
29964
|
+
crossCompany: FactoryUtilizationDto;
|
|
29965
|
+
companies: MachineGroupUtilizationDto[];
|
|
29966
|
+
}
|
|
29967
|
+
|
|
28932
29968
|
export class OperatorAndMachineDto implements IOperatorAndMachineDto {
|
|
28933
29969
|
operator?: EmployeeDto | null;
|
|
28934
29970
|
lastWorkOrderEventStartTime?: Date;
|