@ignos/api-client 20250806.0.12308-alpha → 20250807.0.12317
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 +38 -102
- package/lib/ignosportal-api.js +207 -417
- package/package.json +1 -1
- package/src/ignosportal-api.ts +235 -508
package/src/ignosportal-api.ts
CHANGED
|
@@ -1155,6 +1155,12 @@ export interface IMeClient {
|
|
|
1155
1155
|
setIsBetaTester(request: SetIsBetaTesterRequest): Promise<UserDto>;
|
|
1156
1156
|
|
|
1157
1157
|
updateCurrentUserLastSeen(): Promise<void>;
|
|
1158
|
+
|
|
1159
|
+
getRoles(): Promise<string[]>;
|
|
1160
|
+
|
|
1161
|
+
setTestRoles(roles: string[]): Promise<void>;
|
|
1162
|
+
|
|
1163
|
+
removeAllTestRoles(): Promise<void>;
|
|
1158
1164
|
}
|
|
1159
1165
|
|
|
1160
1166
|
export class MeClient extends AuthorizedApiBase implements IMeClient {
|
|
@@ -1315,6 +1321,114 @@ export class MeClient extends AuthorizedApiBase implements IMeClient {
|
|
|
1315
1321
|
}
|
|
1316
1322
|
return Promise.resolve<void>(null as any);
|
|
1317
1323
|
}
|
|
1324
|
+
|
|
1325
|
+
getRoles(): Promise<string[]> {
|
|
1326
|
+
let url_ = this.baseUrl + "/me/roles";
|
|
1327
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1328
|
+
|
|
1329
|
+
let options_: RequestInit = {
|
|
1330
|
+
method: "GET",
|
|
1331
|
+
headers: {
|
|
1332
|
+
"Accept": "application/json"
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
1337
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
1338
|
+
}).then((_response: Response) => {
|
|
1339
|
+
return this.processGetRoles(_response);
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
protected processGetRoles(response: Response): Promise<string[]> {
|
|
1344
|
+
const status = response.status;
|
|
1345
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
1346
|
+
if (status === 200) {
|
|
1347
|
+
return response.text().then((_responseText) => {
|
|
1348
|
+
let result200: any = null;
|
|
1349
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
1350
|
+
if (Array.isArray(resultData200)) {
|
|
1351
|
+
result200 = [] as any;
|
|
1352
|
+
for (let item of resultData200)
|
|
1353
|
+
result200!.push(item);
|
|
1354
|
+
}
|
|
1355
|
+
return result200;
|
|
1356
|
+
});
|
|
1357
|
+
} else if (status !== 200 && status !== 204) {
|
|
1358
|
+
return response.text().then((_responseText) => {
|
|
1359
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
return Promise.resolve<string[]>(null as any);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
setTestRoles(roles: string[]): Promise<void> {
|
|
1366
|
+
let url_ = this.baseUrl + "/me/roles";
|
|
1367
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1368
|
+
|
|
1369
|
+
const content_ = JSON.stringify(roles);
|
|
1370
|
+
|
|
1371
|
+
let options_: RequestInit = {
|
|
1372
|
+
body: content_,
|
|
1373
|
+
method: "POST",
|
|
1374
|
+
headers: {
|
|
1375
|
+
"Content-Type": "application/json",
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
1380
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
1381
|
+
}).then((_response: Response) => {
|
|
1382
|
+
return this.processSetTestRoles(_response);
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
protected processSetTestRoles(response: Response): Promise<void> {
|
|
1387
|
+
const status = response.status;
|
|
1388
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
1389
|
+
if (status === 200) {
|
|
1390
|
+
return response.text().then((_responseText) => {
|
|
1391
|
+
return;
|
|
1392
|
+
});
|
|
1393
|
+
} else if (status !== 200 && status !== 204) {
|
|
1394
|
+
return response.text().then((_responseText) => {
|
|
1395
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
return Promise.resolve<void>(null as any);
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
removeAllTestRoles(): Promise<void> {
|
|
1402
|
+
let url_ = this.baseUrl + "/me/roles";
|
|
1403
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
1404
|
+
|
|
1405
|
+
let options_: RequestInit = {
|
|
1406
|
+
method: "DELETE",
|
|
1407
|
+
headers: {
|
|
1408
|
+
}
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1411
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
1412
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
1413
|
+
}).then((_response: Response) => {
|
|
1414
|
+
return this.processRemoveAllTestRoles(_response);
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
protected processRemoveAllTestRoles(response: Response): Promise<void> {
|
|
1419
|
+
const status = response.status;
|
|
1420
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
1421
|
+
if (status === 200) {
|
|
1422
|
+
return response.text().then((_responseText) => {
|
|
1423
|
+
return;
|
|
1424
|
+
});
|
|
1425
|
+
} else if (status !== 200 && status !== 204) {
|
|
1426
|
+
return response.text().then((_responseText) => {
|
|
1427
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
return Promise.resolve<void>(null as any);
|
|
1431
|
+
}
|
|
1318
1432
|
}
|
|
1319
1433
|
|
|
1320
1434
|
export interface IUsersClient {
|
|
@@ -6890,6 +7004,8 @@ export interface IMachinesClient {
|
|
|
6890
7004
|
|
|
6891
7005
|
getMachineErpData(id: number): Promise<MachineErpDataDto>;
|
|
6892
7006
|
|
|
7007
|
+
getWorkOrderTimeline(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<WorkOrderDatapoint[]>;
|
|
7008
|
+
|
|
6893
7009
|
getMachineUtilizationSummary(): Promise<UtilizationSummaryDto>;
|
|
6894
7010
|
|
|
6895
7011
|
getCrossCompanyUtilizationSummary(): Promise<CrossCompanyUtilizationSummaryDto>;
|
|
@@ -7407,6 +7523,53 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
|
|
|
7407
7523
|
return Promise.resolve<MachineErpDataDto>(null as any);
|
|
7408
7524
|
}
|
|
7409
7525
|
|
|
7526
|
+
getWorkOrderTimeline(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<WorkOrderDatapoint[]> {
|
|
7527
|
+
let url_ = this.baseUrl + "/machines/{id}/workorder/timeline?";
|
|
7528
|
+
if (id === undefined || id === null)
|
|
7529
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
7530
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
7531
|
+
if (startTime !== undefined && startTime !== null)
|
|
7532
|
+
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
7533
|
+
if (endTime !== undefined && endTime !== null)
|
|
7534
|
+
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
7535
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
7536
|
+
|
|
7537
|
+
let options_: RequestInit = {
|
|
7538
|
+
method: "GET",
|
|
7539
|
+
headers: {
|
|
7540
|
+
"Accept": "application/json"
|
|
7541
|
+
}
|
|
7542
|
+
};
|
|
7543
|
+
|
|
7544
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
7545
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
7546
|
+
}).then((_response: Response) => {
|
|
7547
|
+
return this.processGetWorkOrderTimeline(_response);
|
|
7548
|
+
});
|
|
7549
|
+
}
|
|
7550
|
+
|
|
7551
|
+
protected processGetWorkOrderTimeline(response: Response): Promise<WorkOrderDatapoint[]> {
|
|
7552
|
+
const status = response.status;
|
|
7553
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
7554
|
+
if (status === 200) {
|
|
7555
|
+
return response.text().then((_responseText) => {
|
|
7556
|
+
let result200: any = null;
|
|
7557
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
7558
|
+
if (Array.isArray(resultData200)) {
|
|
7559
|
+
result200 = [] as any;
|
|
7560
|
+
for (let item of resultData200)
|
|
7561
|
+
result200!.push(WorkOrderDatapoint.fromJS(item));
|
|
7562
|
+
}
|
|
7563
|
+
return result200;
|
|
7564
|
+
});
|
|
7565
|
+
} else if (status !== 200 && status !== 204) {
|
|
7566
|
+
return response.text().then((_responseText) => {
|
|
7567
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
7568
|
+
});
|
|
7569
|
+
}
|
|
7570
|
+
return Promise.resolve<WorkOrderDatapoint[]>(null as any);
|
|
7571
|
+
}
|
|
7572
|
+
|
|
7410
7573
|
getMachineUtilizationSummary(): Promise<UtilizationSummaryDto> {
|
|
7411
7574
|
let url_ = this.baseUrl + "/machines/utilization/summary";
|
|
7412
7575
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -23183,18 +23346,6 @@ export interface IWorkordersClient {
|
|
|
23183
23346
|
* Deleteds existing work order mappings.
|
|
23184
23347
|
*/
|
|
23185
23348
|
deleteWorkOrderMappings(): Promise<void>;
|
|
23186
|
-
|
|
23187
|
-
getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessageDto[]>;
|
|
23188
|
-
|
|
23189
|
-
addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessageDto>;
|
|
23190
|
-
|
|
23191
|
-
updateMessage(id: string, messageId: string, content: string): Promise<FileResponse>;
|
|
23192
|
-
|
|
23193
|
-
deleteMessage(id: string, messageId: string): Promise<FileResponse>;
|
|
23194
|
-
|
|
23195
|
-
getLastRead(id: string, operationId: string | null | undefined, resourceId: string | null | undefined): Promise<WorkorderDiscussionReadStatusDto>;
|
|
23196
|
-
|
|
23197
|
-
setLastRead(id: string, request: SetDiscussionLastRead): Promise<void>;
|
|
23198
23349
|
}
|
|
23199
23350
|
|
|
23200
23351
|
export class WorkordersClient extends AuthorizedApiBase implements IWorkordersClient {
|
|
@@ -24274,270 +24425,6 @@ export class WorkordersClient extends AuthorizedApiBase implements IWorkordersCl
|
|
|
24274
24425
|
}
|
|
24275
24426
|
return Promise.resolve<void>(null as any);
|
|
24276
24427
|
}
|
|
24277
|
-
|
|
24278
|
-
getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessageDto[]> {
|
|
24279
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
|
|
24280
|
-
if (id === undefined || id === null)
|
|
24281
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24282
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24283
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24284
|
-
|
|
24285
|
-
let options_: RequestInit = {
|
|
24286
|
-
method: "GET",
|
|
24287
|
-
headers: {
|
|
24288
|
-
"Accept": "application/json"
|
|
24289
|
-
}
|
|
24290
|
-
};
|
|
24291
|
-
|
|
24292
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24293
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24294
|
-
}).then((_response: Response) => {
|
|
24295
|
-
return this.processGetDiscussionMessages(_response);
|
|
24296
|
-
});
|
|
24297
|
-
}
|
|
24298
|
-
|
|
24299
|
-
protected processGetDiscussionMessages(response: Response): Promise<WorkorderDiscussionMessageDto[]> {
|
|
24300
|
-
const status = response.status;
|
|
24301
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24302
|
-
if (status === 200) {
|
|
24303
|
-
return response.text().then((_responseText) => {
|
|
24304
|
-
let result200: any = null;
|
|
24305
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
24306
|
-
if (Array.isArray(resultData200)) {
|
|
24307
|
-
result200 = [] as any;
|
|
24308
|
-
for (let item of resultData200)
|
|
24309
|
-
result200!.push(WorkorderDiscussionMessageDto.fromJS(item));
|
|
24310
|
-
}
|
|
24311
|
-
return result200;
|
|
24312
|
-
});
|
|
24313
|
-
} else if (status !== 200 && status !== 204) {
|
|
24314
|
-
return response.text().then((_responseText) => {
|
|
24315
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24316
|
-
});
|
|
24317
|
-
}
|
|
24318
|
-
return Promise.resolve<WorkorderDiscussionMessageDto[]>(null as any);
|
|
24319
|
-
}
|
|
24320
|
-
|
|
24321
|
-
addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessageDto> {
|
|
24322
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
|
|
24323
|
-
if (id === undefined || id === null)
|
|
24324
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24325
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24326
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24327
|
-
|
|
24328
|
-
const content_ = JSON.stringify(request);
|
|
24329
|
-
|
|
24330
|
-
let options_: RequestInit = {
|
|
24331
|
-
body: content_,
|
|
24332
|
-
method: "POST",
|
|
24333
|
-
headers: {
|
|
24334
|
-
"Content-Type": "application/json",
|
|
24335
|
-
"Accept": "application/json"
|
|
24336
|
-
}
|
|
24337
|
-
};
|
|
24338
|
-
|
|
24339
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24340
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24341
|
-
}).then((_response: Response) => {
|
|
24342
|
-
return this.processAddDiscussionMessage(_response);
|
|
24343
|
-
});
|
|
24344
|
-
}
|
|
24345
|
-
|
|
24346
|
-
protected processAddDiscussionMessage(response: Response): Promise<WorkorderDiscussionMessageDto> {
|
|
24347
|
-
const status = response.status;
|
|
24348
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24349
|
-
if (status === 201) {
|
|
24350
|
-
return response.text().then((_responseText) => {
|
|
24351
|
-
let result201: any = null;
|
|
24352
|
-
let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
24353
|
-
result201 = WorkorderDiscussionMessageDto.fromJS(resultData201);
|
|
24354
|
-
return result201;
|
|
24355
|
-
});
|
|
24356
|
-
} else if (status !== 200 && status !== 204) {
|
|
24357
|
-
return response.text().then((_responseText) => {
|
|
24358
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24359
|
-
});
|
|
24360
|
-
}
|
|
24361
|
-
return Promise.resolve<WorkorderDiscussionMessageDto>(null as any);
|
|
24362
|
-
}
|
|
24363
|
-
|
|
24364
|
-
updateMessage(id: string, messageId: string, content: string): Promise<FileResponse> {
|
|
24365
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
|
|
24366
|
-
if (id === undefined || id === null)
|
|
24367
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24368
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24369
|
-
if (messageId === undefined || messageId === null)
|
|
24370
|
-
throw new Error("The parameter 'messageId' must be defined.");
|
|
24371
|
-
url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
|
|
24372
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24373
|
-
|
|
24374
|
-
const content_ = JSON.stringify(content);
|
|
24375
|
-
|
|
24376
|
-
let options_: RequestInit = {
|
|
24377
|
-
body: content_,
|
|
24378
|
-
method: "PUT",
|
|
24379
|
-
headers: {
|
|
24380
|
-
"Content-Type": "application/json",
|
|
24381
|
-
"Accept": "application/octet-stream"
|
|
24382
|
-
}
|
|
24383
|
-
};
|
|
24384
|
-
|
|
24385
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24386
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24387
|
-
}).then((_response: Response) => {
|
|
24388
|
-
return this.processUpdateMessage(_response);
|
|
24389
|
-
});
|
|
24390
|
-
}
|
|
24391
|
-
|
|
24392
|
-
protected processUpdateMessage(response: Response): Promise<FileResponse> {
|
|
24393
|
-
const status = response.status;
|
|
24394
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24395
|
-
if (status === 200 || status === 206) {
|
|
24396
|
-
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
24397
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
24398
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
24399
|
-
if (fileName) {
|
|
24400
|
-
fileName = decodeURIComponent(fileName);
|
|
24401
|
-
} else {
|
|
24402
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
24403
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
24404
|
-
}
|
|
24405
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
24406
|
-
} else if (status !== 200 && status !== 204) {
|
|
24407
|
-
return response.text().then((_responseText) => {
|
|
24408
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24409
|
-
});
|
|
24410
|
-
}
|
|
24411
|
-
return Promise.resolve<FileResponse>(null as any);
|
|
24412
|
-
}
|
|
24413
|
-
|
|
24414
|
-
deleteMessage(id: string, messageId: string): Promise<FileResponse> {
|
|
24415
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
|
|
24416
|
-
if (id === undefined || id === null)
|
|
24417
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24418
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24419
|
-
if (messageId === undefined || messageId === null)
|
|
24420
|
-
throw new Error("The parameter 'messageId' must be defined.");
|
|
24421
|
-
url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
|
|
24422
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24423
|
-
|
|
24424
|
-
let options_: RequestInit = {
|
|
24425
|
-
method: "DELETE",
|
|
24426
|
-
headers: {
|
|
24427
|
-
"Accept": "application/octet-stream"
|
|
24428
|
-
}
|
|
24429
|
-
};
|
|
24430
|
-
|
|
24431
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24432
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24433
|
-
}).then((_response: Response) => {
|
|
24434
|
-
return this.processDeleteMessage(_response);
|
|
24435
|
-
});
|
|
24436
|
-
}
|
|
24437
|
-
|
|
24438
|
-
protected processDeleteMessage(response: Response): Promise<FileResponse> {
|
|
24439
|
-
const status = response.status;
|
|
24440
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24441
|
-
if (status === 200 || status === 206) {
|
|
24442
|
-
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
24443
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
24444
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
24445
|
-
if (fileName) {
|
|
24446
|
-
fileName = decodeURIComponent(fileName);
|
|
24447
|
-
} else {
|
|
24448
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
24449
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
24450
|
-
}
|
|
24451
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
24452
|
-
} else if (status !== 200 && status !== 204) {
|
|
24453
|
-
return response.text().then((_responseText) => {
|
|
24454
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24455
|
-
});
|
|
24456
|
-
}
|
|
24457
|
-
return Promise.resolve<FileResponse>(null as any);
|
|
24458
|
-
}
|
|
24459
|
-
|
|
24460
|
-
getLastRead(id: string, operationId: string | null | undefined, resourceId: string | null | undefined): Promise<WorkorderDiscussionReadStatusDto> {
|
|
24461
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read?";
|
|
24462
|
-
if (id === undefined || id === null)
|
|
24463
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24464
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24465
|
-
if (operationId !== undefined && operationId !== null)
|
|
24466
|
-
url_ += "operationId=" + encodeURIComponent("" + operationId) + "&";
|
|
24467
|
-
if (resourceId !== undefined && resourceId !== null)
|
|
24468
|
-
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
24469
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24470
|
-
|
|
24471
|
-
let options_: RequestInit = {
|
|
24472
|
-
method: "GET",
|
|
24473
|
-
headers: {
|
|
24474
|
-
"Accept": "application/json"
|
|
24475
|
-
}
|
|
24476
|
-
};
|
|
24477
|
-
|
|
24478
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24479
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24480
|
-
}).then((_response: Response) => {
|
|
24481
|
-
return this.processGetLastRead(_response);
|
|
24482
|
-
});
|
|
24483
|
-
}
|
|
24484
|
-
|
|
24485
|
-
protected processGetLastRead(response: Response): Promise<WorkorderDiscussionReadStatusDto> {
|
|
24486
|
-
const status = response.status;
|
|
24487
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24488
|
-
if (status === 200) {
|
|
24489
|
-
return response.text().then((_responseText) => {
|
|
24490
|
-
let result200: any = null;
|
|
24491
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
24492
|
-
result200 = WorkorderDiscussionReadStatusDto.fromJS(resultData200);
|
|
24493
|
-
return result200;
|
|
24494
|
-
});
|
|
24495
|
-
} else if (status !== 200 && status !== 204) {
|
|
24496
|
-
return response.text().then((_responseText) => {
|
|
24497
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24498
|
-
});
|
|
24499
|
-
}
|
|
24500
|
-
return Promise.resolve<WorkorderDiscussionReadStatusDto>(null as any);
|
|
24501
|
-
}
|
|
24502
|
-
|
|
24503
|
-
setLastRead(id: string, request: SetDiscussionLastRead): Promise<void> {
|
|
24504
|
-
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read";
|
|
24505
|
-
if (id === undefined || id === null)
|
|
24506
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
24507
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
24508
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
24509
|
-
|
|
24510
|
-
const content_ = JSON.stringify(request);
|
|
24511
|
-
|
|
24512
|
-
let options_: RequestInit = {
|
|
24513
|
-
body: content_,
|
|
24514
|
-
method: "POST",
|
|
24515
|
-
headers: {
|
|
24516
|
-
"Content-Type": "application/json",
|
|
24517
|
-
}
|
|
24518
|
-
};
|
|
24519
|
-
|
|
24520
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
24521
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
24522
|
-
}).then((_response: Response) => {
|
|
24523
|
-
return this.processSetLastRead(_response);
|
|
24524
|
-
});
|
|
24525
|
-
}
|
|
24526
|
-
|
|
24527
|
-
protected processSetLastRead(response: Response): Promise<void> {
|
|
24528
|
-
const status = response.status;
|
|
24529
|
-
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
24530
|
-
if (status === 204) {
|
|
24531
|
-
return response.text().then((_responseText) => {
|
|
24532
|
-
return;
|
|
24533
|
-
});
|
|
24534
|
-
} else if (status !== 200 && status !== 204) {
|
|
24535
|
-
return response.text().then((_responseText) => {
|
|
24536
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
24537
|
-
});
|
|
24538
|
-
}
|
|
24539
|
-
return Promise.resolve<void>(null as any);
|
|
24540
|
-
}
|
|
24541
24428
|
}
|
|
24542
24429
|
|
|
24543
24430
|
export class AzureRegionDto implements IAzureRegionDto {
|
|
@@ -35708,6 +35595,78 @@ export interface IWorkOrderProjectDto {
|
|
|
35708
35595
|
projectManager?: string | null;
|
|
35709
35596
|
}
|
|
35710
35597
|
|
|
35598
|
+
export class WorkOrderDatapoint implements IWorkOrderDatapoint {
|
|
35599
|
+
workOrder!: string;
|
|
35600
|
+
id!: number;
|
|
35601
|
+
externalId!: string;
|
|
35602
|
+
subType?: string | null;
|
|
35603
|
+
startTime!: number;
|
|
35604
|
+
endTime?: number | null;
|
|
35605
|
+
metaData?: { [key: string]: string; } | null;
|
|
35606
|
+
|
|
35607
|
+
constructor(data?: IWorkOrderDatapoint) {
|
|
35608
|
+
if (data) {
|
|
35609
|
+
for (var property in data) {
|
|
35610
|
+
if (data.hasOwnProperty(property))
|
|
35611
|
+
(<any>this)[property] = (<any>data)[property];
|
|
35612
|
+
}
|
|
35613
|
+
}
|
|
35614
|
+
}
|
|
35615
|
+
|
|
35616
|
+
init(_data?: any) {
|
|
35617
|
+
if (_data) {
|
|
35618
|
+
this.workOrder = _data["workOrder"];
|
|
35619
|
+
this.id = _data["id"];
|
|
35620
|
+
this.externalId = _data["externalId"];
|
|
35621
|
+
this.subType = _data["subType"];
|
|
35622
|
+
this.startTime = _data["startTime"];
|
|
35623
|
+
this.endTime = _data["endTime"];
|
|
35624
|
+
if (_data["metaData"]) {
|
|
35625
|
+
this.metaData = {} as any;
|
|
35626
|
+
for (let key in _data["metaData"]) {
|
|
35627
|
+
if (_data["metaData"].hasOwnProperty(key))
|
|
35628
|
+
(<any>this.metaData)![key] = _data["metaData"][key];
|
|
35629
|
+
}
|
|
35630
|
+
}
|
|
35631
|
+
}
|
|
35632
|
+
}
|
|
35633
|
+
|
|
35634
|
+
static fromJS(data: any): WorkOrderDatapoint {
|
|
35635
|
+
data = typeof data === 'object' ? data : {};
|
|
35636
|
+
let result = new WorkOrderDatapoint();
|
|
35637
|
+
result.init(data);
|
|
35638
|
+
return result;
|
|
35639
|
+
}
|
|
35640
|
+
|
|
35641
|
+
toJSON(data?: any) {
|
|
35642
|
+
data = typeof data === 'object' ? data : {};
|
|
35643
|
+
data["workOrder"] = this.workOrder;
|
|
35644
|
+
data["id"] = this.id;
|
|
35645
|
+
data["externalId"] = this.externalId;
|
|
35646
|
+
data["subType"] = this.subType;
|
|
35647
|
+
data["startTime"] = this.startTime;
|
|
35648
|
+
data["endTime"] = this.endTime;
|
|
35649
|
+
if (this.metaData) {
|
|
35650
|
+
data["metaData"] = {};
|
|
35651
|
+
for (let key in this.metaData) {
|
|
35652
|
+
if (this.metaData.hasOwnProperty(key))
|
|
35653
|
+
(<any>data["metaData"])[key] = (<any>this.metaData)[key];
|
|
35654
|
+
}
|
|
35655
|
+
}
|
|
35656
|
+
return data;
|
|
35657
|
+
}
|
|
35658
|
+
}
|
|
35659
|
+
|
|
35660
|
+
export interface IWorkOrderDatapoint {
|
|
35661
|
+
workOrder: string;
|
|
35662
|
+
id: number;
|
|
35663
|
+
externalId: string;
|
|
35664
|
+
subType?: string | null;
|
|
35665
|
+
startTime: number;
|
|
35666
|
+
endTime?: number | null;
|
|
35667
|
+
metaData?: { [key: string]: string; } | null;
|
|
35668
|
+
}
|
|
35669
|
+
|
|
35711
35670
|
export class UtilizationSummaryDto implements IUtilizationSummaryDto {
|
|
35712
35671
|
factory!: FactoryUtilizationDto;
|
|
35713
35672
|
groups!: MachineGroupUtilizationDto[];
|
|
@@ -60122,238 +60081,6 @@ export interface ICreateWorkOrderMapping {
|
|
|
60122
60081
|
newWorkOrderId: string;
|
|
60123
60082
|
}
|
|
60124
60083
|
|
|
60125
|
-
export class WorkorderDiscussionMessageDto implements IWorkorderDiscussionMessageDto {
|
|
60126
|
-
id?: string;
|
|
60127
|
-
workorderId?: string;
|
|
60128
|
-
companyId?: string;
|
|
60129
|
-
content?: string;
|
|
60130
|
-
senderUpn?: string;
|
|
60131
|
-
senderName?: string;
|
|
60132
|
-
operationId?: string | null;
|
|
60133
|
-
operationName?: string | null;
|
|
60134
|
-
resourceId?: string | null;
|
|
60135
|
-
created?: Date;
|
|
60136
|
-
|
|
60137
|
-
constructor(data?: IWorkorderDiscussionMessageDto) {
|
|
60138
|
-
if (data) {
|
|
60139
|
-
for (var property in data) {
|
|
60140
|
-
if (data.hasOwnProperty(property))
|
|
60141
|
-
(<any>this)[property] = (<any>data)[property];
|
|
60142
|
-
}
|
|
60143
|
-
}
|
|
60144
|
-
}
|
|
60145
|
-
|
|
60146
|
-
init(_data?: any) {
|
|
60147
|
-
if (_data) {
|
|
60148
|
-
this.id = _data["id"];
|
|
60149
|
-
this.workorderId = _data["workorderId"];
|
|
60150
|
-
this.companyId = _data["companyId"];
|
|
60151
|
-
this.content = _data["content"];
|
|
60152
|
-
this.senderUpn = _data["senderUpn"];
|
|
60153
|
-
this.senderName = _data["senderName"];
|
|
60154
|
-
this.operationId = _data["operationId"];
|
|
60155
|
-
this.operationName = _data["operationName"];
|
|
60156
|
-
this.resourceId = _data["resourceId"];
|
|
60157
|
-
this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
|
|
60158
|
-
}
|
|
60159
|
-
}
|
|
60160
|
-
|
|
60161
|
-
static fromJS(data: any): WorkorderDiscussionMessageDto {
|
|
60162
|
-
data = typeof data === 'object' ? data : {};
|
|
60163
|
-
let result = new WorkorderDiscussionMessageDto();
|
|
60164
|
-
result.init(data);
|
|
60165
|
-
return result;
|
|
60166
|
-
}
|
|
60167
|
-
|
|
60168
|
-
toJSON(data?: any) {
|
|
60169
|
-
data = typeof data === 'object' ? data : {};
|
|
60170
|
-
data["id"] = this.id;
|
|
60171
|
-
data["workorderId"] = this.workorderId;
|
|
60172
|
-
data["companyId"] = this.companyId;
|
|
60173
|
-
data["content"] = this.content;
|
|
60174
|
-
data["senderUpn"] = this.senderUpn;
|
|
60175
|
-
data["senderName"] = this.senderName;
|
|
60176
|
-
data["operationId"] = this.operationId;
|
|
60177
|
-
data["operationName"] = this.operationName;
|
|
60178
|
-
data["resourceId"] = this.resourceId;
|
|
60179
|
-
data["created"] = this.created ? this.created.toISOString() : <any>undefined;
|
|
60180
|
-
return data;
|
|
60181
|
-
}
|
|
60182
|
-
}
|
|
60183
|
-
|
|
60184
|
-
export interface IWorkorderDiscussionMessageDto {
|
|
60185
|
-
id?: string;
|
|
60186
|
-
workorderId?: string;
|
|
60187
|
-
companyId?: string;
|
|
60188
|
-
content?: string;
|
|
60189
|
-
senderUpn?: string;
|
|
60190
|
-
senderName?: string;
|
|
60191
|
-
operationId?: string | null;
|
|
60192
|
-
operationName?: string | null;
|
|
60193
|
-
resourceId?: string | null;
|
|
60194
|
-
created?: Date;
|
|
60195
|
-
}
|
|
60196
|
-
|
|
60197
|
-
export class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest {
|
|
60198
|
-
companyId?: string;
|
|
60199
|
-
message?: string;
|
|
60200
|
-
senderUpn?: string;
|
|
60201
|
-
senderName?: string;
|
|
60202
|
-
operationId?: string | null;
|
|
60203
|
-
operationName?: string | null;
|
|
60204
|
-
resourceId?: string | null;
|
|
60205
|
-
|
|
60206
|
-
constructor(data?: IAddDiscussionMessageRequest) {
|
|
60207
|
-
if (data) {
|
|
60208
|
-
for (var property in data) {
|
|
60209
|
-
if (data.hasOwnProperty(property))
|
|
60210
|
-
(<any>this)[property] = (<any>data)[property];
|
|
60211
|
-
}
|
|
60212
|
-
}
|
|
60213
|
-
}
|
|
60214
|
-
|
|
60215
|
-
init(_data?: any) {
|
|
60216
|
-
if (_data) {
|
|
60217
|
-
this.companyId = _data["companyId"];
|
|
60218
|
-
this.message = _data["message"];
|
|
60219
|
-
this.senderUpn = _data["senderUpn"];
|
|
60220
|
-
this.senderName = _data["senderName"];
|
|
60221
|
-
this.operationId = _data["operationId"];
|
|
60222
|
-
this.operationName = _data["operationName"];
|
|
60223
|
-
this.resourceId = _data["resourceId"];
|
|
60224
|
-
}
|
|
60225
|
-
}
|
|
60226
|
-
|
|
60227
|
-
static fromJS(data: any): AddDiscussionMessageRequest {
|
|
60228
|
-
data = typeof data === 'object' ? data : {};
|
|
60229
|
-
let result = new AddDiscussionMessageRequest();
|
|
60230
|
-
result.init(data);
|
|
60231
|
-
return result;
|
|
60232
|
-
}
|
|
60233
|
-
|
|
60234
|
-
toJSON(data?: any) {
|
|
60235
|
-
data = typeof data === 'object' ? data : {};
|
|
60236
|
-
data["companyId"] = this.companyId;
|
|
60237
|
-
data["message"] = this.message;
|
|
60238
|
-
data["senderUpn"] = this.senderUpn;
|
|
60239
|
-
data["senderName"] = this.senderName;
|
|
60240
|
-
data["operationId"] = this.operationId;
|
|
60241
|
-
data["operationName"] = this.operationName;
|
|
60242
|
-
data["resourceId"] = this.resourceId;
|
|
60243
|
-
return data;
|
|
60244
|
-
}
|
|
60245
|
-
}
|
|
60246
|
-
|
|
60247
|
-
export interface IAddDiscussionMessageRequest {
|
|
60248
|
-
companyId?: string;
|
|
60249
|
-
message?: string;
|
|
60250
|
-
senderUpn?: string;
|
|
60251
|
-
senderName?: string;
|
|
60252
|
-
operationId?: string | null;
|
|
60253
|
-
operationName?: string | null;
|
|
60254
|
-
resourceId?: string | null;
|
|
60255
|
-
}
|
|
60256
|
-
|
|
60257
|
-
export class WorkorderDiscussionReadStatusDto implements IWorkorderDiscussionReadStatusDto {
|
|
60258
|
-
workorderId?: string;
|
|
60259
|
-
operationId?: string | null;
|
|
60260
|
-
resourceId?: string | null;
|
|
60261
|
-
userUpn?: string;
|
|
60262
|
-
lastRead?: Date;
|
|
60263
|
-
|
|
60264
|
-
constructor(data?: IWorkorderDiscussionReadStatusDto) {
|
|
60265
|
-
if (data) {
|
|
60266
|
-
for (var property in data) {
|
|
60267
|
-
if (data.hasOwnProperty(property))
|
|
60268
|
-
(<any>this)[property] = (<any>data)[property];
|
|
60269
|
-
}
|
|
60270
|
-
}
|
|
60271
|
-
}
|
|
60272
|
-
|
|
60273
|
-
init(_data?: any) {
|
|
60274
|
-
if (_data) {
|
|
60275
|
-
this.workorderId = _data["workorderId"];
|
|
60276
|
-
this.operationId = _data["operationId"];
|
|
60277
|
-
this.resourceId = _data["resourceId"];
|
|
60278
|
-
this.userUpn = _data["userUpn"];
|
|
60279
|
-
this.lastRead = _data["lastRead"] ? new Date(_data["lastRead"].toString()) : <any>undefined;
|
|
60280
|
-
}
|
|
60281
|
-
}
|
|
60282
|
-
|
|
60283
|
-
static fromJS(data: any): WorkorderDiscussionReadStatusDto {
|
|
60284
|
-
data = typeof data === 'object' ? data : {};
|
|
60285
|
-
let result = new WorkorderDiscussionReadStatusDto();
|
|
60286
|
-
result.init(data);
|
|
60287
|
-
return result;
|
|
60288
|
-
}
|
|
60289
|
-
|
|
60290
|
-
toJSON(data?: any) {
|
|
60291
|
-
data = typeof data === 'object' ? data : {};
|
|
60292
|
-
data["workorderId"] = this.workorderId;
|
|
60293
|
-
data["operationId"] = this.operationId;
|
|
60294
|
-
data["resourceId"] = this.resourceId;
|
|
60295
|
-
data["userUpn"] = this.userUpn;
|
|
60296
|
-
data["lastRead"] = this.lastRead ? this.lastRead.toISOString() : <any>undefined;
|
|
60297
|
-
return data;
|
|
60298
|
-
}
|
|
60299
|
-
}
|
|
60300
|
-
|
|
60301
|
-
export interface IWorkorderDiscussionReadStatusDto {
|
|
60302
|
-
workorderId?: string;
|
|
60303
|
-
operationId?: string | null;
|
|
60304
|
-
resourceId?: string | null;
|
|
60305
|
-
userUpn?: string;
|
|
60306
|
-
lastRead?: Date;
|
|
60307
|
-
}
|
|
60308
|
-
|
|
60309
|
-
export class SetDiscussionLastRead implements ISetDiscussionLastRead {
|
|
60310
|
-
workorderId?: string;
|
|
60311
|
-
operationId?: string | null;
|
|
60312
|
-
resourceId?: string | null;
|
|
60313
|
-
userUpn?: string;
|
|
60314
|
-
|
|
60315
|
-
constructor(data?: ISetDiscussionLastRead) {
|
|
60316
|
-
if (data) {
|
|
60317
|
-
for (var property in data) {
|
|
60318
|
-
if (data.hasOwnProperty(property))
|
|
60319
|
-
(<any>this)[property] = (<any>data)[property];
|
|
60320
|
-
}
|
|
60321
|
-
}
|
|
60322
|
-
}
|
|
60323
|
-
|
|
60324
|
-
init(_data?: any) {
|
|
60325
|
-
if (_data) {
|
|
60326
|
-
this.workorderId = _data["workorderId"];
|
|
60327
|
-
this.operationId = _data["operationId"];
|
|
60328
|
-
this.resourceId = _data["resourceId"];
|
|
60329
|
-
this.userUpn = _data["userUpn"];
|
|
60330
|
-
}
|
|
60331
|
-
}
|
|
60332
|
-
|
|
60333
|
-
static fromJS(data: any): SetDiscussionLastRead {
|
|
60334
|
-
data = typeof data === 'object' ? data : {};
|
|
60335
|
-
let result = new SetDiscussionLastRead();
|
|
60336
|
-
result.init(data);
|
|
60337
|
-
return result;
|
|
60338
|
-
}
|
|
60339
|
-
|
|
60340
|
-
toJSON(data?: any) {
|
|
60341
|
-
data = typeof data === 'object' ? data : {};
|
|
60342
|
-
data["workorderId"] = this.workorderId;
|
|
60343
|
-
data["operationId"] = this.operationId;
|
|
60344
|
-
data["resourceId"] = this.resourceId;
|
|
60345
|
-
data["userUpn"] = this.userUpn;
|
|
60346
|
-
return data;
|
|
60347
|
-
}
|
|
60348
|
-
}
|
|
60349
|
-
|
|
60350
|
-
export interface ISetDiscussionLastRead {
|
|
60351
|
-
workorderId?: string;
|
|
60352
|
-
operationId?: string | null;
|
|
60353
|
-
resourceId?: string | null;
|
|
60354
|
-
userUpn?: string;
|
|
60355
|
-
}
|
|
60356
|
-
|
|
60357
60084
|
function formatDate(d: Date) {
|
|
60358
60085
|
return d.getFullYear() + '-' +
|
|
60359
60086
|
(d.getMonth() < 9 ? ('0' + (d.getMonth()+1)) : (d.getMonth()+1)) + '-' +
|